Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to exclude an assignee from a complex query?

Kateryna Pron
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!
August 3, 2022

Hi. 

I need to see the issues with specific label or in specific epics:

project = NameOfTheProject and labels = LabelName OR "Epic Link" in (CODE-1234, CODE-2345, CODE-3456)

 

It works correctly, but now over to that I want to exclude specific assignee, the options I tried (none of them worked correctly, as I would like to):

project = NameOfTheProject and assignee not in (1234CodeOfTheAssignee5678) and labels = LabelName OR "Epic Link" in (CODE-1234, CODE-2345, CODE-3456)

 

project = NameOfTheProject and labels = LabelName OR "Epic Link" in (CODE-1234, CODE-2345, CODE-3456) and assignee != (1234CodeOfTheAssignee)

 

I tried (it does not work for me):

variations with order of label, epic, assignee,

and/or changes all over,

!= / not in / is not changes all over.

 

The issues of the assignee belong to one of the epics, but I need all the issues of the epic, except those ones that are assigned to the person.

 

How could I get that?

1 answer

1 vote
Nic Brough -Adaptavist-
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.
August 3, 2022

Welcome to the Atlassian Community!

The problem here is the mixing of AND and OR to join the clauses.

When you do that, you have to tell Jira exactly what you mean, otherwise it has no choice but to read left to right.  In this case, you've told Jira to produce a list of issues that match either of these two queries:

  • project = NameOfTheProject and labels = LabelName
  • "Epic Link" in (CODE-1234, CODE-2345, CODE-3456) and assignee != (1234CodeOfTheAssignee)

I think what you need to add is:

project = NameOfTheProject and labels = LabelName OR "Epic Link" in (CODE-1234, CODE-2345, CODE-3456) and assignee != (1234CodeOfTheAssignee)

project = NameOfTheProject and labels = LabelName OR "Epic Link" in (CODE-1234, CODE-2345, CODE-3456) )  and assignee != (1234CodeOfTheAssignee)

 

 

 

Kateryna Pron
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!
August 8, 2022

Hi. Thank you for your reply. Don't know why but it still does not work.

Nic Brough -Adaptavist-
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.
August 8, 2022

Could you show us your query and the detail of an issue it does not work for?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events