You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I am trying to write JQL that will allow me to select all those Jira tickets for the current active sprint that are not done and excludes certain epic (A-123) and label (XZY).
This is what I have and it is not working.
Project = ABC AND Status != Done AND 'Epic Link' != A-123 OR Labels != XZY
Hey, try this:
Project = ABC AND Status != Done AND (('Epic Link' != A-123) OR (Labels != XZY)) AND sprint in openSprints () ORDER by Rank DESC
You had the OR part not but in brackets so it could give weird results - you specify you want issues from active sprints by telling JQL - get me issues in openSprints only :)
Let me know if it works.
(project = ABC and status != Done and sprint = '<your sprint id>' AND (('Epic Link' != 'A-123') OR (Labels != 'XZY')))
I am surprised that the suggestion from @Marta Woźniak-Semeniuk above didn't work. Looking at your request, I would then search with the above structure.
If you still do not get what you want, then my suspicion is either, you have tickets that you believe match a specific parameter but do not and in this case, searching phase by phase (adding the next set of parameters after validating the prior returns the list of issues expected first) would be the way to go.
Thank you @Ismael Jimoh
Jira version I am using, a free version online, converts the query to this and gives the wrong result as mentioned above. It removes the brackets.
I don't add project as it is a quick filter on a Jira board.
status != Done AND sprint in openSprints() AND ("Epic Link" != HTS-5 OR Labels != Client)
Okay if you are using it as a quick filter for the board then the “sprint in openSprints()” part is obsolete as by default only current sprint tickets are visible.
Then it would leave
“status != Done AND “Epic Link” !=HTS-5 AND labels not in (Client)”
If the above is till giving wrong results, what is wrong with the results - does it show the done tickets too or the problem is with the epic/label?
If this is failing, then it could mean the logic you have in mind and what you expect are not matching.
As we have no access to the tickets, I will go with my original suggestion of adding the next condition after validating that what you currently see is what you expect to see.
The question is which ones are failing. For example, with the current search, you will not get issues where Epic link is empty.
Here is a sample query I built that you can adjust:
project = "Sample scrum project" and Sprint in openSprints() and status != done and (("Epic Link" != SSP-7 or "Epic Link" is EMPTY) or labels != l1)
I had 3 issues, where one had the label mentioned, the other had the epic link mentioned and the 3rd had neither.
I successfully get just one ticket back.