Forums

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

Closing issues after they have stayed 20 days in a status. Sheduled trigger JQL problem

Stanislav Kotakov August 15, 2024

Hello All,

We are struggling with an automation rule that is supposed to check certain projects with specific issue types that have been in their current status for 20 days. The goal is to determine whether the issue has not been updated by our customers for 20 days while in the 'In Verification' or 'Waiting for customer' statuses, and if so, to transition the issue to 'Done' with an 'Expired' resolution. Occurrence every day 06:00AM in the morning.

However, I am having difficulty setting it up correctly.

Here is an example of the JQL that I am currently trying to make work:

category = "Client Support" AND issuetype IN ("Pre-Paid Support Service Request", "T&M Support Service Request","Emergency Support Service Request","Warranty Support Service Request", "Consultancy Support Service Request", "Standard Support Service Request") AND status IN ("In Verification", "Waiting for customer") AND updated <= -20d

2 answers

0 votes
Stanislav Kotakov August 19, 2024

I should have provided more information about the topic. We have a field called All Time Spent, which is automatically populated by Automation for Jira (system user), and this counts as an update.

Marc - Devoteam
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 19, 2024

Hi @Stanislav Kotakov 

Then this is the culprit indeed.

Then you would require to exclude all your projects in the category Client Support.

0 votes
Marc - Devoteam
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 15, 2024

Hi @Stanislav Kotakov 

It might be in the clause "issuetype IN", I think you have specified Request Types, then the clause should be "Request Type" in ()

Are all the projects your a trying to tackle in the JQL set with the project category "Client Support"?

Other wise try to break down your JQL.

Does the JQL category = "Client Support" AND issuetype IN ("Pre-Paid Support Service Request", "T&M Support Service Request","Emergency Support Service Request","Warranty Support Service Request", "Consultancy Support Service Request", "Standard Support Service Request") give the correct results?

Then extend the JQL and check the results any time on adding clauses.

Other option is the automation set to global or multiple projects?

Stanislav Kotakov August 15, 2024

Hi @Marc - Devoteam ,

They are issue types named 'Requests,' and yes, all of the projects that this JQL is meant to check are in the 'Client Support' category. It does bring almost correct results, but the core problem is that it does not filter the aforementioned issue types that have been in the 'In Verification' or 'Waiting for customer' statuses for 20 or more days.

Marc - Devoteam
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 15, 2024

Hi @Stanislav Kotakov 

Break you JQL down and add clauses one by one, every time check if the results are correct.

So you say the 20 days is not correct.

Does 

category = "Client Support" AND issuetype IN ("Pre-Paid Support Service Request", "T&M Support Service Request","Emergency Support Service Request","Warranty Support Service Request", "Consultancy Support Service Request", "Standard Support Service Request") AND status IN ("In Verification", "Waiting for customer")

provide all the right issues, or are there wrong issues as well?

I expect that you checked this and the answer is Yes.

Then I think the issue is in the notation of updated, can you modify it to: updated <= "-20d"

Stanislav Kotakov August 15, 2024

@Marc - Devoteam,

Thank you for your responses, but I have already tried that. After your comment, I changed it to 'updated <= "-20d",' but the result shows 0 issues found, which is not accurate.

Marc - Devoteam
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 15, 2024

Hi @Stanislav Kotakov ,

Your JQL  like this works and gives results

category = "Client Support" AND issuetype IN ("Pre-Paid Support Service Request", "T&M Support Service Request","Emergency Support Service Request","Warranty Support Service Request", "Consultancy Support Service Request", "Standard Support Service Request") AND status IN ("In Verification", "Waiting for customer")

Are there any issues in the list with an updated date earlier then 20 days ago?

Stanislav Kotakov August 16, 2024

Yes, there are.

Marc - Devoteam
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 16, 2024

Hi @Stanislav Kotakov 

Can you share a screenshot.

I tried the same now: category = JSM and type in (Support,task, "[System] Service request") and status in ("In Progress", "Waiting for support") AND updated <= -20d

This gives issues that have not been updated 20 days ago. Most recent update issue os from 24 of July.

Ran the JQL today on the 16 of August, so this is correct.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events