Forums

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

Automation Time based

Andre Menezes
Contributor
August 12, 2021

Hello All,

 

I am trying to create an automation to move a Task to another status after a period of time. For instance, after 2 days a Task has been completed move to status archived.

Have you ever accomplished something like it? I did not find a time condition.

3 answers

3 accepted

3 votes
Answer accepted
Alex Koxaras _Relational_
Community Champion
August 12, 2021

Hi @Andre Menezes and welcome,

Jira do not have such a functionality, out of the box. However you could achieve that with automation and by some custom work on your workflows:

  • I would create a custom date/time field
  • Whenever my issue moved to completed status, this field would be populated by that date
  • I would then create a schedule automation which would run e.g. every night, and I would cross check tonight's date with the date on the custom field.
    • If that date is less than 2, then do nothing
    • If that date is equal/greater than 2, transition the current issue to the next status

Let me know if that helps.

Regards,
Alex

Andre Menezes
Contributor
August 12, 2021

Hello @Alex Koxaras _Relational_ Thanks for responding. 

 

Just one question, this second step would be done manually? 

  • Whenever my issue moved to completed status, this field would be populated by that date
Alex Koxaras _Relational_
Community Champion
August 12, 2021

No @Andre Menezes , this will be on your workflow, on the transition from anywhere to  "completed". If you have only one transition which leads to completed, then you will add a post function to set the value of this field equal to now() (or similar).

Like Andre Menezes likes this
0 votes
Answer accepted
Laurens Coppens
Community Champion
August 12, 2021

Hi Andre and welcome to the community,

You can do calculations with jql on for example updated date or resolution date.

If you want to move them to archived after they are resolved for 2 days i would do something like this:

resolved <= -2d and status = done

you can run this jql on a time based cycle (cron job) within your project.

 

Hope this helps,

Laurens

Andre Menezes
Contributor
August 12, 2021

Thanks a lot, @Laurens Coppens 

Alex Koxaras _Relational_
Community Champion
August 12, 2021

@Andre Menezes the solution that @Laurens Coppens provides will be valid, only if you set the resolution on the completed status. Then this would be a quite good solution.

Like Andre Menezes likes this
Laurens Coppens
Community Champion
August 12, 2021

@Alex Koxaras _Relational_  Great remark, i am hoping that the fact that he wants to go from completed to archived, he is setting the resolution on the completed state.

If not, than switching to update date could be an option, but obviously not a fail safe option.

Andre Menezes
Contributor
August 12, 2021

Thanks a lot, @Laurens Coppens  and @Alex Koxaras _Relational_ 

 

The goal is to move the completed tasks automatically to archived. I will work with the schedule condition and then an action.

0 votes
Answer accepted
Mark Jestings
Contributor
August 12, 2021

There isn't such function in JQL, only function that deals with SLAs

Suggest an answer

Log in or Sign up to answer