need help with my JQL query

(assignee = robind AND status not in (Closed, Received, Reviewing, "In Committee")) OR (assignee = robind AND labels not in (PSG, Triage))

I'm still getting tickets that have the labels indicated above.

Thanks.

3 answers

Why do you have to specify "assignee = robind twice"? Just use:

 

assignee = robind AND status not in (Closed, Received, Reviewing, "In Committee")) AND labels not in (PSG, Triage)

This is not working either, unfortunately. Maybe if I explain in non query language what I'm trying to do, a proper query can be written by someone who knows what to do. smile

I want to see two types of tickets:

  • Tickets assigned to me that have a project type of business analysis and the status is not in closed, received, reviewing or in committee
  • Tickets assigned to me that have a project type of client support and labels do not contain PSG or Triage.

Also, if I try to query just on the second bullet assignee = robind and project = "Client Support" and labels not in (PSG, Triage) I don't get the proper results. There's something about this second part that I can't get right.

There are some discussions here about the "Labels" part https://confluence.atlassian.com/display/JIRA/Advanced+Searching Searching labels is yes, a bit tricky.

I think you're missing brackets, try adding some to the whole query

0 vote
Best to break these down and build the query from component (Note that "project type" isn't a lot of use here, I've assumed you mean "issue type"
  • Tickets assigned to me
    • assignee = robind
  • have a project type of business analysis and the status is not in closed, received, reviewing or in committee
    • issuetype = "business analysis" and status not in (Closed, Received, Reviewing, "In Committee")
  • have a project type of client support and labels do not contain PSG or Triage.
    • issuetype = "client support" and labels not in (PSG, Triage)

To combine them back together, use lots of braces to force the correct reading:

assignee = robind and (

 ( issuetype = "business analysis" and status not in (Closed, Received, Reviewing, "In Committee") )

or

( issuetype = "client support" and labels not in (PSG, Triage) )

)

 

If that doesn't work, then you need to do some debugging on what is going wrong - what issues are missing when they should be selected, and what are left out when they should be there?

Nic is close, if you try to exclude labels you need also to include empty labels.So the part ( issuetype = "client support" and labels not in (PSG, Triage) ) should be ( issuetype = "client support" and (labels not in (PSG, Triage) or labels is empty) )

Yes, sorry, I'm very fuzzy on searching labels because I tend to use labels in a really simple way. When I'm searching labels, the clause is almost always "label = x", and I forget that searching for negative labels is possible.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

Meet the AUG leaders of Northern Virginia

@Rachel Wright (Jira Genie), @Billy Poggi (AUG NOVA, DC), and @Dana Jansen (Confluence Queen) are just some of the folks that lead one of the world's most active Atlassian User Group (AUG)....

148 views 5 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you