1
votes

please I want to create a filter of custom statuses, but somehow when I press search I will get no results. When I search only for one status all is fine, but I want to merge that somehow into one filter. Or is there any way to get a exact number of tasks in any kind of status, assigned to the user? Im using the pie chart and want to see the number of all tasks assigned for any guy in the team, no matter the status. And I want to have it in a gadget. Thanks

Code Im using is:

project = "XYZ" AND status = "To Do" AND status = "Awaiting Approval" AND status = "In Progress"

3
FYI: A status can't A and B and C at the same time! You need to use 'project = XYZ AND (status = a or status = b or status = c) Or see my answer belowGuy
Yes, your answer did the trick. Thank youuser1868774

3 Answers

1
votes

Have you looked at the 'in' operator?

...AND status IN ('To Do','Awaiting Approval','In Progress')
1
votes

A Jira ticket cannot have more than one status at the time. I would do something like this

project = "XYZ" AND status IN ("To Do", "Awaiting Approval", "In Progress")
0
votes

The other answers are definitely the correct way to write the JQL you were aiming to write, however I believe there is a better solution to your actual aim.

From what I understand, you want to see any Jira issue which is not closed and is assigned to a particular user. In this case I think the best solution would not to find all issues in the specific "open" statuses, but instead to find all which are not closed.

The best way to do this is by filtering by the status-category, as this will ensure the JQL works for all workflows, regardless of what their done/closed statuses are called.

statuscategory != done AND assignee=<user>

Replace <user> with the user you want to filter for, or currentUser() to automatically get the user who is running the query.

Documentation (only mentioned briefly): https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-fields/#Advancedsearchingfieldsreference-ResolutionResolution