Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

RESOLVED: Long search term/syntax in JIRA Server not working

Amy Likoravec February 8, 2022

Hi there,

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

Thank you!

7 comments

Klára Zikešová
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 8, 2022

It looks just fine to me. What part of the string is not working? I mean isn' t there some fields you don' t have on a screen for example, but they are fulfilled, so not really empty?

Tanya L Christensen February 8, 2022

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.

Like # people like this
Peter-Dave Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 8, 2022

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
Like # people like this
Amy Likoravec February 8, 2022

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 :) 

Like # people like this
Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 10, 2022
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.

Like Tom Lister likes this
Tim Perrault
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 8, 2022

Hi @Amy Likoravec 

 

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 :)

 

Thanks,

Tim

Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2022

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.

Amy Likoravec February 8, 2022

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? 

Thanks again!

Victor February 8, 2022

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.

Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 8, 2022

@Amy Likoravec 

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.

Christof Hurst February 8, 2022

If you query for things that can be empty, you must always add the empty case:

(component != "Component name" OR component IS EMPTY)
Matthew Patton February 14, 2022

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. 

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events