Automation: Transition Issues to Archive after Done for 3 Days

Donna Benton
Contributor
October 30, 2023

I cannot understand why these simple rules are not working for the automation I'm trying to accomplish. I merely want to transition issues to Archive after they have been transitioned to Done for 3 days. This should be so easy and I know I'm going to kick myself after one of you tell me what is missing here...   Ideas?

Snag_144127e7.png

1 answer

1 accepted

2 votes
Answer accepted
Bill Sheboy
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.
October 30, 2023

Hi @Donna Benton 

You are trying to do something 3 days after the transition to done, but your trigger is on the transition to done now.  That happens at that moment in time.

To do what you ask, you could change to use a scheduled trigger (e.g., running once per day), and use JQL to identify any Done issues to move to Archived on that day.

  • trigger: scheduled daily, with JQL to find the issues
  • action: transition to Archived

Kind regards,
Bill

Donna Benton
Contributor
October 30, 2023

Thanks, Bill. That makes sense. I'll give it shot!

Donna

Like Bill Sheboy likes this
Donna Benton
Contributor
October 31, 2023

Well, I am still not finding success. Here is what I've got.

 

image.png

Bill Sheboy
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.
October 31, 2023

Are you using Jira Cloud, Server, or Data Center version?

Would you please post an image of the audit log details, showing what happened when the rule executed?  That may indicate what is happening.

 

And...some tips:

  • For a rule like yours, the separate branch is not needed.  Instead you may put that JQL in the scheduled trigger directly.  The advantage of that approach is the rule will not run unless there are issues to process.
  • One great thing about scheduled triggers is we can test them immediately, without waiting until the schedule happens (i.e., 5pm in your rule).  You can select the button Run Rule to immediately try them, speeding up the development and testing cycle.
Donna Benton
Contributor
October 31, 2023

Hi Bill,

I am using Jira Cloud. Audit Log:

image.png

New Automation using your suggested JQL statement move to Schedule (note that the query has validated 1 issue to match the condition):

image.png
Audit log after running this new rule:

 

image.png

Thank you for the tips.

Donna Benton
Contributor
October 31, 2023

I GOT IT! Thank you!

Bill Sheboy
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.
October 31, 2023

Those results show there are no issues found.  If you try that JQL stand-alone with View All Issues, adding the project information, what do you see?

project = yourProjectName AND status = Done AND NOT status CHANGED AFTER -1d

If there are no results, then there are no issues yet ready to transition.

Also...please note the default for the trigger is to "Only include issues that have changed since the last time this rule executed".  That may not be what you want, so consider disabling that option.

Donna Benton
Contributor
October 31, 2023

image.png

 

Thanks again, Bill for your help!  :)

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events