Automation: Transition Issues to Archive after Done for 3 Days
Asked by Donna Benton:

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](https://community.atlassian.com/t5/image/serverpage/image-id/289181i0D6DD43E978E01AA/image-size/large?v=v2&px=999 "Snag_144127e7.png")


Answers:
author: Bill Sheboy
body: Hi [@Donna Benton](/t5/user/viewprofilepage/user-id/2420418)

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

comments: author: Donna Benton
body: Thanks, Bill. That makes sense. I'll give it shot!

Donna


author: Donna Benton
body: Well, I am still not finding success. Here is what I've got.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/289369iF6B02C63BC704EC1/image-size/large?v=v2&px=999 "image.png")


author: Bill Sheboy
body: 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.


author: Donna Benton
body: Hi Bill,

**I am using Jira Cloud. Audit Log:**

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/289396i459DD557AC6BB8E8/image-size/large?v=v2&px=999 "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](https://community.atlassian.com/t5/image/serverpage/image-id/289403iCC8B345332FA38D2/image-size/large?v=v2&px=999 "image.png")  
**Audit log after running this new rule:**

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/289402iE9655806CFE65621/image-size/large?v=v2&px=999 "image.png")

Thank you for the tips.


author: Donna Benton
body: I GOT IT! Thank you!


author: Bill Sheboy
body: 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.


author: Donna Benton
body: ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/289411i3BC07063763D24E1/image-size/large?v=v2&px=999 "image.png")

Thanks again, Bill for your help! :)