Advanced search filter for more than one 'exclusion'

Saengrawee Klamdam October 7, 2019

Hi all, hope you had a great weekend, 

I was wondering if you could help me in terms of filter.

I am aware that we can exclude certain field by using '!~'

However, if I would like to exclude more than one item. I tried for example !~ xxxx !~ aaaa but it does not work

Is there any way we can achieve that? 

project = yyyy AND summary !~ xxxx AND issuetype = zzzzz AND status in (xyz, "abc", "12345") AND "6789" in cascadeOption(00000, 00000) ORDER BY priority DESC, updated DESC

Thanks so much and kind regards.

Saengrawee

1 answer

0 votes
Jack Nolddor _Sweet Bananas_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
October 7, 2019

Hi Saengrawee Klamdam

Why don't replace:

summary !~ xxxx

With:

summary !~ "xxxx" AND summary !~ "aaaa"

 

Does it work for you?

Regards

Saengrawee Klamdam October 7, 2019

Hello,

Thanks for your help.

Unfortunately it does not work as I got the following feedback

Error in the JQL Query: Expecting a field name but got 'AND'. You must surround 'AND' in quotation marks to use it as a field name. (line 1, character 47)

Any futher suggestion?

Thank you

Jack Nolddor _Sweet Bananas_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
October 7, 2019

Uops! I made a typo and write a double AND in my response.
Check it out again

Saengrawee Klamdam October 7, 2019

I tried both, with a double AND, with one AND, both lead to the same error response.

thank you.

Jack Nolddor _Sweet Bananas_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
October 7, 2019

Could you share with us your final JQL query using my proposal? I believe there is something incorrect on it.

Saengrawee Klamdam October 7, 2019

sorry, it does not work still.

Thank you

Jack Nolddor _Sweet Bananas_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
October 7, 2019

Could you share with us an image to see where error are you getting?

Regards

Saengrawee Klamdam October 7, 2019

JIRA more than one exclusion.PNG

Saengrawee Klamdam October 7, 2019

Query:

project = yyyy summary !~ "xxxx" AND summary !~ "aaaa" AND issuetype = zzzzz AND status in (xyz, "abc", "12345") AND "6789" in cascadeOption(00000, 00000) ORDER BY priority DESC, updated DESC

Jack Nolddor _Sweet Bananas_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
October 7, 2019

Hi,
You need to add the 'AND' word between project = yyy and the first summary !~ "xxxx"

 

See:

project = yyyy AND summary !~ "xxxx" AND summary !~ "aaaa" AND issuetype = zzzzz AND status in (xyz, "abc", "12345") AND "6789" in cascadeOption(00000, 00000) ORDER BY priority DESC, updated DESC

 

Thanks in advance :)

Suggest an answer

Log in or Sign up to answer