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
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
In JIRA I would like to show the last updated tickets (ORDER BY updated DESC) that were updated by someone that isn't me (filter).
Is there a way to do it?
Thanks in advance.
There no way to do this with JQL. Only update date is stored.
The closest you can get is using "was" which can be used with status changes or resolution, for example to query something like: status was closed by bob
If you use scriptrunner you also get a similar function for comments: issueFunction in commented("after -4w by jbloggs")
And for work logged: issueFunction in workLogged(on "2015/07/28" by admin)
But probably this would be the closest to what you are looking for:
lastUpdated (by / inRole / inGroup) Finds issues by the user who last
updated them. Example, find all issues that were last updated by
members of the Developers role:
issueFunction in lastUpdated('inRole Administrators')
Hope it helps you
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.
Using JIRA 4.4.3,
I've created a filter that list all the tasks that:
- The current user is assigned to;
- are Open;
- are not blocked by any other task.
To make it clear: the task that are ready for a user to work on.
We've installed the Craftforge JQL Functions plugin, and I've come with the following JQL query:
assignee = currentUser()
AND status in (Open)
AND issue NOT IN linkedIssuesFromFilter("All Issues", "Blocks", "Outward")
The problem is that when an issue that was blocking another issue is resolved, the "Blocks" link still exist -- and I don't want to delete it. But my query doesn't check if the linked issue is closed/resolved or not.
How can I add a condition "inside the IN statement" that will only return queries that are blocking the current task AND that are still OPEN.
Use this clause from http://www.j-tricks.com/jqlt-links-functions.html:
issue not in linkedIssuesInQuery("status = Open", "is blocked by")
If you have the ScriptRunner add-on, you can use it to do this:
resolution = unresolved AND assignee = currentUser() AND (issueFunction in linkedIssuesOf("resolution is not empty", blocks) OR issueFunction not in hasLinks("is blocked by"))
I've created a new filter named "All active issues" that list all issues that are open, in progress or re-openned.
And I've used that new filter in my query instead of "All Issues".
Seems solved :)
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;