4
votes

I am looking for a query that lets me search through JIRA for all issues that belonged to a user at any point while in a specific status.

For example, say that when work is finished, issues get set to a "Code Review" status and assigned to user X who is responsible for performing the code review. After code review is completed, the issue is assigned to someone else.

If I at some point want to know all issues that were ever reviewed by user X, how can I accomplish this?

I have found solutions to this problem if you don't care about what status the issue was in when it was assigned to a user, but not if you care about the status.

How to find issues that at some point has been assigned to you?

Find issues that were ever assigned to me

The closest query that I am aware of is

assignee was 'user X'

but this will get all issues that were assigned to the user in any status.

Can I accomplish this without adding an extra field for storing the code reviewer?

1

1 Answers

4
votes

I have found a solution that doesn't meet the question exactly as asked, but is relatively close.

Say there are two transitions out of the "Code Review" status, one that leads to a status called "Failed Code Review" and another that leads to a status called "Passed Code Review". The following query gets all issues that have been set to either of these statuses by a given user.x:

(status WAS "Failed Code Review" BY user.x) OR (status WAS "Passed Code Review" BY user.x)

This does not work perfectly however, as it will

  • also get all issues set to those statuses by user.x from any other transition
  • not get any issues that were assigned to user.x in "Code Review", but transitioned to another status by another user