need help with my JQL query

Robin DiNunzio April 30, 2015

(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

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 30, 2015
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?

Udo Brand
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.
April 30, 2015

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

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 30, 2015

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.

0 votes
Mala Benn April 30, 2015

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

0 votes
GabrielleJ
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.
April 30, 2015

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)

Robin DiNunzio April 30, 2015

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.
Robin DiNunzio April 30, 2015

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.

GabrielleJ
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.
April 30, 2015

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

Suggest an answer

Log in or Sign up to answer