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
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I am hoping someone can assist. I am trying to use a search rule/syntax in JIRA Server to find where a custom field is empty but does not include a sequence of other options. The rule is below, but it't not working as it seems to be weeding out all issues, instead of only those without the status, issuetype and component options. Is someone able to assist?
The rule is:
project in ("Project Name") AND "Custom Field" is EMPTY AND status not in (Completed, Review) AND issuetype not in (Epic, Activity) AND component != "Component name" ORDER BY created ASC
Try trimming the search to just the empty field first.
Also, use resolution is empty if you're looking for issues that are not done.
With components you want to add syntax to find issues where component is also empty so you'll need to wrap that in an OR statement.
The best way to debug searches is to break them into parts and verify they give expected results. Then join them together to narrow down further.
I'm on my phone so not easy for me to give examples. Sorry.
What Tany said ...
Try this JQL instead:
project in ("Project Name") AND "Custom Field" is EMPTY AND status not in (Completed, Review) AND issuetype not in (Epic, Activity) AND (component is empty OR component != "Component name") ORDER BY created ASC
Ohh wow this worked!!! Thank you so much, I really appreciate your help with this @Peter-Dave Sheehan and @Tanya L Christensen
FYI @Mykenna Cepek the above rule worked :)
project in ("Project Name") AND "Custom Field" is EMPTY AND status not in (Completed, Review) AND issuetype not in (Epic, Activity) AND (component is empty OR component not in ("Component name")) ORDER BY created ASC
I would suggest you use this JQL.
Otherwise you will also get issues which have two (or more) components (say "Component name" & "Other Component") and that does not match "Component name", so you will see it in your query result.
Your JQL looks fine and should return issues. So now the pain part, I would break down the JQL into parts and compare. Start with project name and the custom field part and then build off of that. Maybe there aren't any issues that match your long JQL statement :)
If you remove this part:
AND "Custom Field" is EMPTY
and run your query, do some issues show?
Like @Tanya L Christensen was saying, try your query in pieces, to narrow down the bit that is not behaving as expected.
Hi @Tanya L Christensen @Tim Perrault @Klára Zikešová
Thank you so much for coming back to me. The rule is definitely not working as I have created some test issues which should appear and they aren't. Basically, the rule works when I have removed either the status, issuetype or component part and when I add one of them back in, the rule breaks, so i wondered if it's because it's too long.
Basically, I need to find all issues where the custom field (which is a team field) is empty, but not including those which have a specific component tagged, are in completed or review status or an epic or activity issuetype.
@Tanya L Christensen I tried resolution is EMPTY which didn't work, and I also need to weed out those in 'review' status too. When you say components need to be wrapped in an OR statement, what do you mean by that?
Try using this instead:
project = "Project name" AND "Custom field" is EMPTY AND status not in (Completed, Review) AND issuetype not in (Epic, Activity) And component != "Component name" ORDER BY created ASC
If it doesn't work, debug by first taking out Component and orderind and see if the rest filters something. Then you can add. You also want to leave out the part of ordering in ascending order for starters.
Here is an example of a JQR I use in searching for issuetypes in a particular project, of a particular issuetype and not estimated.
project = "Project name" AND "Story Points[Number]" is EMPTY AND status not in (Done, Abandoned) AND issuetype in (Story, Bug, Research, Spec, Testing)
hope this helps.
you can try
("Custom Field" is EMPTY and component not in ("Given the components"))
it is critical to play with and/or conditions properly enclosed in braces.
If you query for things that can be empty, you must always add the empty case:
(component != "Component name" OR component IS EMPTY)
Have you made any configurations or added the customfield? I found if something like "customfield is not empty" doesn't work for JQL, it is typically because the project/instance hasn't been a re-indexed after field has been configured.