Forums

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

automation rule to clone one specific task

Ivan Andrieiev
Contributor
January 12, 2023

how to run an automation rule to clone one specific task?

3 answers

3 accepted

0 votes
Answer accepted
Ste Wright
Community Champion
January 12, 2023

Hi @Ivan Andrieiev 

You could do this using a Scheduled Trigger

You have two options in terms of creating the Task:

  1. Clone an existing Task or...
  2. Create a Task from the Automation Rule (this would not require a Task to exist).

Is the Task you're cloning one specific Task? Or is there some other logic to identify it? I've assumed it's one specific Task below.

---

Option 1 - Clone Task

  • Trigger: Scheduled
    • Run Rule every = 1 days
    • Run a JQL Search = check to TRUE
    • JQL = key = <Task Key>
    • Only include issues that have changed since the last time this rule executed = Uncheck to FALSE
  • Action: Clone Issue
    • Set Field Details

---

Option 2 - Create New Task

  • Trigger: Scheduled
    • Run Rule every = 1 days
  • Action: Create Issue
    • Set Field Details

---

Let us know if either of these work for you!

Ste

Ivan Andrieiev
Contributor
January 16, 2023

@Ste Wright 

In second variant I have mistake

Scheduled
No related issues that have been updated since the last time this rule executed could be found. To include all issues, un-check the 'Only include issues that have changed since the last time this rule executed' checkbox.
Ste Wright
Community Champion
January 16, 2023

Hi @Ivan Andrieiev 

In Option 2 you're seeing that warning? Not Option 1? 

Have you got JQL set in Option 2? If yes, what is it?

Perhaps provide a screenshot of the Scheduled Trigger so we can review further :)

Ste

Ivan Andrieiev
Contributor
January 16, 2023

@Ste Wright 

I cannot understand this JQL, this line triggers the creation of a task according to the corresponding filter, if the JQL filter is executed only for one created task, then only one task is created, the JQL feature is valid for 25 completed tasks, then 25 tasks will be created?
Example
JQL priorities = Medium
There are 25 tasks in the project, so automation will do 25 tasks?

Ste Wright
Community Champion
January 16, 2023

Hi @Ivan Andrieiev 

Yes - the way a Scheduled Trigger works is it will take action against all the Issues it finds in the JQL query.

So you can use the JQL to locate one specific Task - eg. using the Issue Key, or a unique identifier - or multiple Tasks, if you prefer.

Ste

Ivan Andrieiev
Contributor
January 16, 2023

@Ste Wright  

if I make such JQL
issuekey = SUPPORT-231
issue Support-231 is closed, will the rule work.

Ste Wright
Community Champion
January 16, 2023

Hi @Ivan Andrieiev 

Yes - it would clone SUPPORT-231 - although it would set the Status to the first Status in your Workflow, rather than closing it.

Ste

Ivan Andrieiev
Contributor
January 16, 2023

And if I wand use Scheduled Trigger with this JQL, will it work?

Ste Wright
Community Champion
January 16, 2023

Hi @Ivan Andrieiev 

It would need the Scheduled Trigger to work, unless you're triggering it some other way?

I'd recommend testing what I've suggested above, and seeing if you're happy with the outcome :)

Ste

Ivan Andrieiev
Contributor
January 17, 2023

okey, I will test this two rules, and write to you or accepted task

Like Ste Wright likes this
0 votes
Answer accepted
Walter Buggenhout
Community Champion
January 12, 2023

Hi @Ivan Andrieiev,

Create an automation rule with a manual trigger. As automation action, select clone issue and define the fields you want to copy.

Screenshot 2023-01-12 at 15.34.41.png

You should be able to trigger that rule from an issue, by selecting the Automation rules link in the details panel of an issue you open.

Hope this helps! 

Walter Buggenhout
Community Champion
January 12, 2023

@Ivan Andrieiev,

You are basically saying that you want to create a recurring task that needs to be generated every single day. That was not really clear from your initial question, but if that's what you need, a scheduled solution as offered by @Ste Wright here should be able to deliver what you need. 

Like Ste Wright likes this
0 votes
Answer accepted
John Funk
Community Champion
January 12, 2023

Hi @Ivan Andrieiev 

We need more information, as always.  :-)

What is the task? How are you identifying it? 

Quick answer is that you would add a Condition or a Branch to identify the task, and then add a new action after that to Clone Issue. 

Ivan Andrieiev
Contributor
January 12, 2023

@Walter Buggenhout @John Funk 

There is one specific task that needs to be done every day. I know how to completely clone for tasks due to status change. But you need to do this action for one separate task. Identification is mainly based on the name of the task.

John Funk
Community Champion
January 13, 2023

Are you creating the task everyday no matter what happens to the task the day before? Or are you only creating the new task when the first task gets finished? 

If you are creating it no matter what, then create a rule with a Scheduled Trigger. It should be fairly easy to do. 

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