Forums

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

Close/transtion tickets after a certain date

Nadeem Zakir February 24, 2022

Hi,

can anyone help with the jql to close or transition tickets a year after a value on a date field please?

for example, we have the field approval date set to 1/3/2023.  We want issues to automatically transtion once a year has past from 1/3/2023, so the issue has to transition on 1/3/2024

And if that works, then we want to test it for 2 years and so on.

thanks

Nadeem

1 answer

1 vote
Cristian Yuste February 24, 2022

Hello!

You can do it using Automation for Jira and making a rule to execute a cron trigger everyday with the JQL like "ApprovalDate >= startOfDay(-1y) AND ApprovalDate <= endOfDay(-1y)". It will return the issues if are in the next year from approval. After that you can execute a transition acction choosing the transition that you want to perform.

Also you can do it with Script Runner using the Jobs function, but you will need to use a groovy script to do all acctions (get issues from jql, execute transitions...).

I hope that helps you.

Regards.

Radek Dostál
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.
February 24, 2022

I'd note that ScriptRunner jobs has "Escalation service" and you do not need any groovy to do those things, just jql and select transition from a dropdown menu.

Cristian Yuste February 24, 2022

That's true! You don't need any groovy with that. I were thinking in a custom one when i was writing.

Regards.

Suggest an answer

Log in or Sign up to answer