Forums

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

Automation new task when current task moved to DONE

Steve Dillon May 9, 2024

I have tasks that need to repeat weekly and monthly. I can clone a task when moved to DONE using the trigger. I need to be able to add the future date to the clone each time the clone task moves to DONE and the new one is added to TO DO I would like the new date to keep adding the week from the previous task not the first, tried using {{now.plusBusinessDays(14)}} for 14 days and this works on first task but the second task cloned is same as if taking Due Date from master task and not the 1st clone.

 

IS this the best way to do this or should I be using if/else...a better way? basically task moves to DONE and new task is added TO DO with all details of main task with always date set in future based on previous clone.

 

Also, can this be done for all tasks individually or would this be all tasks would clone with same future date, they are not all same and dont see where to add to the task a rule on its own merit.

 

Any help much appreciated.

2 answers

1 accepted

1 vote
Answer accepted
Katie Nix May 9, 2024

It sounds like your cloning operation is keeping the original due date, rather than resetting it. And the new date should be based on the date the issue is cloned (not on some other field on the original ticket)? Is that right? 

The simplest solution would be to use Jira automation -- 

1. Trigger when: Issue created

2. Continue IF: linked issues with type "clones" are present

3. Update issue fields > set due date {{now.plusDays(7)}}

If that's not working, check the audit log for the rule to see if it's triggering and what it's populating, and share more detail here.

0 votes
Steve Dillon May 9, 2024

Hi Katei thanks for reply. At the moment I amusing this not very much automation but I am sure It can be a lot better than my first attempt :)

 

Are you saying use if/else to get the date set for the new clone?

 

Jauto1.PNG

Katie Nix May 9, 2024

I was imagining you were manually cloning the ticket.

For where you're starting in that screenshot, you shouldn't need an IF block at all. The Due Date field should set correctly in the Clone Issue step. 

Is it not working? What do you see in the audit log when you test it? 

Steve Dillon May 9, 2024

No using above. So I added screenshots and the 7 days is being added to the first clone but not the second. Its taking same date from main task still and adding the 7 and not from the 20th on the clone making the new clone 7 days later. Also, task name keeps appending CLONE to the new CLONES how do I stop that...thanksclone1.PNGclone2.PNG

Katie Nix May 9, 2024

I would advise using the automation in your screenshot, rather than what you are using now. If you'd like help troubleshooting what you are using now, please add detail or screenshots of the actual workflow, it's impossible to guess what's happening just from the results :) 

In the automation you posted above, you can modify the Summary field so it doesn't add CLONE each time. 

Steve Dillon May 9, 2024

Hello, I am using the first screenshot trigger, the output above is the result of that trigger.

Steve Dillon May 9, 2024

This works by remove the CLONE at start of summary, would be good if I can add an appending 2 for clone 2, 3 for clone 3...and so on? Also I think the trigger applies to all tasks, if I wanted different Due Dates would I use the add a branch.

Trigger1.PNG

Katie Nix May 9, 2024

There's not an easy way I know of to increment the number. I would personally do something like add a date in the subject of the ticket (like "Task X - week of May 9 2024")

Yes, you could add branches to set different actions. Like: IF task priority = high, clone with due date X; IF task priority = medium, clone with due date Y; ELSE clone with due date Z 

Like Steve Dillon likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events