Im trying to search for all the issues assigned to an user, but no results are being returned and i cant figure out why.
My JQL is the following:
project = MYPROJECT and assignee was joaoalves
In the docs it says:
The "WAS" operator is used to find issues that currently have, or previously had, the specified value for the specified field.
(Note: This operator can be used with the Assignee, Fix Version, Priority, Reporter, Resolution and Status fields only.)
I have an issue assigned to the user joaoalves, but when i search with the JQL above no issues are returned.
But if run the following JQL the issue is returned:
project = MYPROJECT and assignee = joaoalves
Am i missing anything?
It works in my instance, and return issues that currently or previously assign to me. Which version of JIRA are you using?
Assignee was will return the issues which were previously assignee to tat user and current tickets which are present on that user.
Try in conjunction with the "DURING" clause and specify a timeframe. Like this -
project = MYPROJECT and assignee was joaoalves DURING ('2017-04-16 23:59', '2017-04-19 23:59')
See: https://confluence.atlassian.com/jiracore/blog/2015/07/search-jira-like-a-boss-with-jql
The was operator is looking for issues where the assignee was joaoalves but is currently not that user.
Related
How do I query issues that have sub-tasks assigned to me?
Resulting issues may or may not be assigned to me but they must contain sub-tasks within them which are assigned to me (currentUser()).
issueFunction in parentsOf("assignee = currentUser()")
This requires Adaptavist Scriptrunner to be installed.
You can find the documentation of further advanced JQL queries here: https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html
You can use the below JQL for getting all the sub-tasks assgined to you, even though the main task is assigned to someone else.
assignee = currentUser() AND type = Sub-task
The Issue link will be in the Summary field.
Summary field will be something like below
Issue-1234 / Sub Task Summary
"Number of open Subtasks" =0
Error: the field does not exist or you don't have permission to view it.
JIRA don't apply Field level security permissions: see https://jira.atlassian.com/browse/JRA-1330
even then this error.
this query was working on JIRA 4.1 but after transition to JIRA 5.1, its throws that errors.
project=PROJECT_KEY AND resolution = Unresolved AND
issuefunction not in parentsOf("project=PROJECT_KEY AND resolution = Unresolved") AND
issuefunction in parentsOf("project=PROJECT_KEY")
It's quite complicated but it will find all issues that have some subtasks and all of these subtasks are closed. If you want it to find open issues without subtasks as well, delete last line.
I need a way to get all the issues (which are not resolved or closed) of a particular project for which no user has logged work in last week.
For example, let's say I have a project = 'abc' with five issues 'i1', 'i2', 'i3', 'i4' and 'i5' and there are two users 'u1' and 'u2' who can log work in these issues.
Last week - 'u1' logged work in issues 'i2' and 'u2' logged work in issues 'i2' and 'i3'.
So the desired result is - 'i1' and 'i4'.
Something like
project = ABC and status not in (Resolved, Closed) and worklogDate > startOfDay(-7)
should work.
You can do this by installing the Script Runner plugin and using JQL to query for workLogged information:
project=ABC and status not in (Resolved, Closed) and issuefunction not in worklogged("after -7d")
If you need to do fancier queries based on the attributes of the users and so forth, see the commented() documentation for reference.
How to write query that will select only issues resolved by me.
I have found some old post that says its no possible, but it might have changed.
Use next JQL:
status was resolved by "username"
In 4.4 this seems to work:
status was "Resolved" by currentUser()
More details can be found here.
The answer most often given is to use JQL for something like
status was Resolved BY currentUser()
While all fine and good, this will give you back all the issues that you have ever resolved. That is, if you resolved issue FOO-1966 and then it got reopened and someone else resolved it again it is still an issue that was resolved by you.
Here's a better way to do this in JIRA 6 and later (including JIRA onDemand).
Create a custom field called "Resolver". Make it a person field but do not add it to any forms (unless you really want to).
Edit your workflow and add a post function to the resolve issue transition in your workflow. Make the action "Update custom field" and set the Resolver to %%CURRENT_USER%%.
Publish your workflow.
Now whenever someone resolves an issue using that workflow, the Resolver field will get set to the current user. Now the Resolver field is semantically "last resolved by".
As an added bonus, you can use the value in the Resolver field to reassign issues back to the person who resolved them when they get reopened. I'll leave this as an exercise to the reader. :-)
You can use this JQL query:
"Resolved by" = currentUser()
(I just verified this in v4.1.2#531 on a standalone version)
There is also a plug in you can use in older versions:
https://studio.plugins.atlassian.com/wiki/display/JQLT/Home
None of the above worked for me on JIRA (v4.1.2#531)
However, his works:
"Resource" = currentUser() AND (status = Fixed OR status = Closed OR status = "No Change Required") ORDER BY updated
You can use the WAS operator:
JIRA - Advanced Searching : "The "WAS" operator is used to find issues that currently have, or previously had, the specified value for the specified field"
Example: status WAS "Resolved" BY currentUser()
For JIRA v6.3.4, this worked for me:
"Resolved By" = currentUser()
As far as I can tell, search for resolved by me and more generally, for status changes, is not possible until at least JIRA 4.2.1 (the version I'm using now).
Search and JQL enhancements outlined in 4.3 and 4.4 release notes look like the move in the right direction (WAS operator) but I'm not holding my breath.
None of the above solutions worked for me. I started adding a label to all my issues to resolved_by_kishore, then in advanced search, I'm using lables=resolved_by_kishore. It's working fine.
project = prohjectname AND status was "Resolved" by username and resolutiondate >= '2014/01/08'
and its variants exists in jql now
i am not sure whether they existed at the time question was asked.
i am adding this answer so that if anyone comes here can find the answer
I guess you can use this
status in (resolved) AND component = COMPONENT_NAME AND assignee in (currentUser()) AND resolved > -1d
but the new thing here resolved > -1d this to get the issues that are resolved me in this day
resourses: https://community.atlassian.com/t5/Jira-questions/JIRA-4-4-search-filter-how-to-find-issues-resolved-in-last-seven/qaq-p/77326
The values used in Status can vary (e.g. Resolved, Closed, Done, ...) so it is not reliable to use.
Instead, use resolution:
resolution changed from EMPTY by currentUser()
Using = EMPTY seems to work for searching for empty custom fields with newer versions of Jira
As per JIRA documentation
http://www.atlassian.com/software/jira/docs/latest
The following filter will show the issues opned by me (Current User).
reporter = currentUser()
Is there a filer that will show issues commented by me? something like the following does not work...
comment by = currentUser()
if you know the name of the user (lets assume the name is Tom you can do:
issueFunction in commented("by Tom")
you can also filter it by date of the comment like:
issueFunction in commented("after -1d by Tom")
UPDATE: this requires ScriptRunner being installed in JIRA server (as JBert pointed out)
You can use the Activity Stream gadget with a filter configured by username and activity type. Note that this requires a case-sensitive username, not the friendly Display Name.
Activity Stream gadget configuration:
Filtered Activity Stream display:
(I posted a variation of this answer elsewhere but have improved my filter since then and the new filter is more salient to this question anyhow.)
You could also follow the approach presented by Matt Doar:
Use a participants field from the JIRA Toolkit plugin and query that
http://confluence.atlassian.com/display/JIRA/Advanced+Searching?focusedCommentId=229838922#comment-229838922
It's not a a complete answer but maybe a step in the right direction...
Francis
I had the same problem and
issueFunction in commented("by username")
worked for me
The following query identifies tickets in which current (or some other particular) user was mentioned in comments:
comment ~ currentUser()
The new scriptrunner can do lots of things e.g. find issues with comments issueFunction in hasComments(), find issues with comments that are not older than 7 days issueFunction in commented("after -7d") and also issue comments from users or groups.
Details can be found here:
https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+JQL+Functions#ScriptedJQLFunctions-commented(commentquery)
You can try that workaround I am current using this expression on my saved search:
comment ~ "your.username.here"
This in fact catch the comments where I was mentioned, but if you mention yourself probably should works. I have not tried by myself.
My current Jira is a cloud based one, so I can't tell you exactly which version is.
In JIRA v7.3.0, the watcher field works well, if autowatch is enabled:
watcher = currentUser()
How to enable
Profile > Preferences > Autowatch : [inhert, disabled, enabled]
Issues that you create or comment on will automatically be watched for future changes.
For filtering issues in which you have been mentioned, try comment ~ currentUser()
This (to my knowledge) cannot be completed using JQL, even with a plugin. If you have DB access, the query is simple:
SELECT pkey, summary FROM jiraissue, jiraaction WHERE jiraissue.id = jiraaction.issueid AND author = '<insert_jira_username>';
If you're talking only about the current user, there is a personal Activity Stream in your profile
https://xxx.atlassian.net/secure/ViewProfile.jspa
It includes actions other than comments, but does provide an RSS feed which you could filter only comments with:
<category term="comment"/>
This is the query to know the issues I am involved in:
SELECT a.pkey, a.summary FROM jiraissue AS a left join jiraaction AS b on a.id = b.issueid
where b.author = 'jira_username' OR a.REPORTER = 'jira_username' OR a.ASSIGNEE = 'jira_username'
group by a.pkey order by a.CREATED
This is the query to know all issues raised in the last 24 hours.
select REPORTER, SUMMARY from jiraissue
WHERE CREATED > DATE_SUB(CURDATE(), INTERVAL 1 DAY) order by CREATED DESC;