1

Is there a way I can use JQL to find all Jira issues, that I assigned to someone else?

I see the assignee field, but I want to find a JQL, where I assigned a Jira issue to someone else other than me.

Ayusman
  • 8,509
  • 21
  • 79
  • 132

2 Answers2

1

The CHANGED BY operator is what you are looking for.

Assignee CHANGED BY currentUser() will return any issue the current user has ever assigned to anyone, including themselves. This gets a bit tricky, as you want to only show issues which you have assigned to anyone other than yourself.

If you have never been the assignee of the issues, then simply adding Assignee WAS NOT currentUser() will return all issues which you have assigned to someone. However if you have ever been assigned to the issues, then they will not be returned.

I had a long think about this and couldn't come up with a perfect solution for if you had ever been assigned to the issues, just some crude approximations which had many exceptions. I suggest taking a look at the JQL Advanced Search Reference and playing around with it to see what works for you.

Tom Gionfriddo
  • 410
  • 2
  • 8
  • A very good answer. You can combine various JQLs to achieve (almost) what you want. E.g `assignee CHANGED BY currentUser() AND assignee WAS NOT currentUser()` (as Tom suggested). Or `assignee CHANGED BY currentUser() AND NOT assignee CHANGED BY currentUser() TO currentUser()` (finds also issues where you were assignee but didn't assign issue to yourself). But the latter JQL unfortunately excludes issue reassigned twice (to you and to someone else). – CraZ Sep 15 '22 at 22:27
0

It's simple. Use the not-equal sign != instead of equal sign =.

assignee != currentUser()

or

assignee != currentUser() OR assignee is EMPTY (to include also unassigned issues)

CraZ
  • 1,669
  • 15
  • 24
  • 1
    I don't think it makes sense. For example, I want to find all jira issues where I changed the assignment of the issue any time in the past to someone else in the team. What you gave me above can find jira issues that I am not the assignee as of today. – Ayusman Jul 05 '22 at 01:08
  • You're right. I've misunderstood the question. – CraZ Sep 15 '22 at 22:21