JQL Query Issue: Trouble with 'WAS' Operator in Jira

I’m having trouble with a JQL query in Jira. I want to find all issues that were ever assigned to a specific user. My query looks like this:

project = OURPROJECT and assignee was janesmith

But it’s not returning any results even though I know there’s at least one issue assigned to janesmith. When I use the regular equals sign instead of ‘was’, like this:

project = OURPROJECT and assignee = janesmith

It works fine and shows the issue. I thought ‘was’ would show current and past assignments. Am I using it wrong? Or is there a setting I’m missing? I’ve checked the docs but I’m still confused. Any help would be great!

I’ve run into this issue before, and it can be frustrating. The ‘WAS’ operator in JQL is tricky because it doesn’t work quite like you’d expect. It actually looks at the history of changes to the field, not just the current and past values.

Here’s what I’ve found works better:

project = OURPROJECT AND assignee CHANGED

This query will return all issues where the assignee field has been changed at any point. You can then filter the results manually to find the ones that were assigned to janesmith.

If you need to be more specific, you can try:

project = OURPROJECT AND assignee CHANGED FROM janesmith

This will show issues where janesmith was previously the assignee but isn’t anymore.

Hope this helps! Jira’s JQL can be powerful but it definitely has its quirks.

hey, i’ve had similar probs. a cool workaround is using ‘EVER’: try project = OURPROJECT and assignee EVER janesmith. it should fetch every issue ever assigned to janesmith. hope it helps!

The ‘WAS’ operator in JQL can indeed be confusing. It’s designed to search the issue history, but it has limitations. One key thing to note is that ‘WAS’ only works if the field has an explicit history tracked. Not all Jira instances are configured to track assignee history by default.

A more reliable approach might be to use:

project = OURPROJECT AND (assignee = janesmith OR assignee WAS janesmith)

This query combines both current and historical assignments. If that still doesn’t work, you might need to check with your Jira admin about how field history is being tracked in your instance.

Another option is to use the ‘CHANGED’ operator as mentioned earlier, but be aware this can potentially return a lot of results if there have been many assignee changes.