Forums

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

Need a JQL to exclude existing JQL from changes I want to make for anything else

Tomasz Bis
Contributor
September 6, 2022

HI,

I have created a JQL that triggers our Opsgenie notifications.

I would like to to create an automation that would change priority level from whatever it is to 'Medium' excluding JQL I have mentioned above from this automation.

It is specifically to change priority level from 'Highest' to 'Medium' for issuetype (when issue triggered) 'email request' and exclude my automation. Am I able to add some JQL rule that excludes the one that I am referring to please?

For instance, JQL > 'project = ISD AND issuetype = "Email request" AND JQL excluded = (I WOULD ADD ENTIRE CONTENT OF MY EXISTING JQL)'

In summary, the JQL for the automation would include any "Email request" tickets apart from whatever is in the JQL

 

PLease advise

Many Thanks

Tomasz

1 answer

1 accepted

0 votes
Answer accepted
Rilwan Ahmed
Community Champion
September 6, 2022

Hi @Tomasz Bis 

Imagining your existing JQL is 
project = ISD AND issuetype = "Email request" AND (Status = Open OR Reporter = XYZ)

Then the expected JQL would be
project = ISD AND issuetype = "Email request" AND (Status != Open OR Reporter != XYZ)
Make use of ( ) appropriately. 

If you can give your full JQL and exact requirement, I can suggest a solution if possible. 

Tomasz Bis
Contributor
September 6, 2022

Thank you @Rilwan Ahmed 

Lets say my current JQL is:

project = ISD AND summary ~ "Amzorders low compared to salesholding" AND status not in (done, completed) OR summary ~ "[Platforms P1]" OR summary ~ "[Monitor Alert] [P1] Triggered: No response" AND status not in (done, completed, Canceled) OR summary ~ "EBYUS system time 3 hours behind" AND issuetype = "Email request" AND issuetype = "Email request"

Rilwan Ahmed
Community Champion
September 6, 2022

Hi @Tomasz Bis ,

I see you are not using a correct format in JQL. not making use of ( ) while using AND/OR keywords. 

1. project = ISD AND summary ~ "Amzorders low compared to salesholding" AND status not in (done, completed) OR summary ~ "[Platforms P1]" OR summary ~ "[Monitor Alert] [P1] Triggered: No response" AND status not in (done, completed, Canceled) OR summary ~ "EBYUS system time 3 hours behind" AND issuetype = "Email request" AND issuetype = "Email request"

Above should actually be like 

project = ISD AND issuetype = "Email request"
AND (summary ~ "Amzorders low compared to salesholding" OR summary ~ "\\[Platforms P1\\]" OR summary ~ "\\[Platforms P1\\]" OR summary ~ "\\[Monitor Alert\\] \\[P1\\] Triggered: No response" OR summary ~ "EBYUS system time 3 hours behind")
AND status not in (done, completed, Canceled)

2. And if you want to list tickets which are not in above JQL, then use

project = ISD AND issuetype = "Email request"
AND (summary !~ "Amzorders low compared to salesholding" OR summary !~ "\\[Platforms P1\\]" OR summary !~ "\\[Platforms P1\\]" OR summary !~ "\\[Monitor Alert\\] \\[P1\\] Triggered: No response" OR summary !~ "EBYUS system time 3 hours behind")
AND status in (done, completed, Canceled)

 

Please note:
To search text "[Platforms P1]" in summary, then you need to modify it as 
"\\[Platforms P1\\]".  
[ ] are special characters.

More details about it in 
https://support.atlassian.com/jira-software-cloud/docs/search-syntax-for-text-fields/

https://support.atlassian.com/jira-work-management/docs/use-advanced-search-with-jira-query-language-jql/
Checked "Reserved characters" section

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events