Forums

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

Querying for resolved issues, with exceptions.

Jakob KN
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 12, 2019

Hi folks, 

I have a project where issues in the status Verified should be automatically closed if all linked issues have been resolved for more than 4 days, except issues in 2 specific projects.

The exception is that linked issues in the 2 projects does not have to be resolved in order for the automation to close the parent issue.

I have a project automation set up, which does the following:

Trigger:
Scheduled every 12 hours, with JQL:

project = SCR AND issuetype = "System Change Request" AND status = verified

IF related issues condition:
All linked issues (any link type) match JQL:

project not in ("Incident Reports", "Compliance Documentation") AND resolved <= -96h OR project in ("Incident Reports", "Compliance Documentation")

Then:
Transition issue to status Closed

 

I'm quite sure that there is something regarding the OR statement in the JQL that I'm doing wrong, but can not seem to get it configured correctly.
I have also tried the following JQL without any luck: 

project not in ("Incident Reports", "Compliance Documentation") AND resolved <= -96h OR (project in ("Incident Reports", "Compliance Documentation"))

Hopefully one of you can see where it goes wrong.

2 answers

1 vote
Alex Gallien
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 12, 2019

Have you tried

(project not in ("Incident Reports", "Compliance Documentation") AND resolved <= -96h) OR project in ("Incident Reports", "Compliance Documentation")

I always try to be explicit as possible with the parenthesis for JQL to ensure execution order  is correct.

0 votes
Deleted user April 14, 2019

Hey there Jakob,

Yeah, I'd try Alex's advice above and put the parenthesis around both blocks of the JQL. I'd run that normally without the Automation to see if the issues that matches that are the ones you expect.

Other than that, make sure that your Automation Rule is scoped globally or at the very least has all the projects that you're using in your JQL.

If that doesn't work, send through a screenshot of your Audit Log and we can see if we can help out

Cheers,

Mark C

PS Feel free to raise a ticket at https://codebarrel.atlassian.net/servicedesk/customer/portal/1 if you don't want to share your screenshots publicly. 

Suggest an answer

Log in or Sign up to answer