Forums

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

Clone plus options used for automation

Alicia Pena
Contributor
October 14, 2024

I'm trying to use automation to clone jira's weekly, instead of manually using clone plus for these tasks.  The problem I'm having is that when we use clone plus manually we can deselect and select clone option boxes ; specifically we can deselect the "copy parent issue's fix and affects versions to each cloned subtask" and select "Copy Subtasks" removing the "copy subtasks estimates to cloned subtasks" check boxes. 

Using automation to do the cloning, automatically uses preset clone option selections that won't work for this process.  I haven't been able to figure out if there's a way to change those clone option check boxes in automation cloning.  Does anyone know if this is possible and how to do this?Screenshot 2024-10-14 at 12.07.00 PM.pngScreenshot 2024-10-14 at 12.07.14 PM.png

3 answers

0 votes
Alicia Pena
Contributor
October 14, 2024

The clone plus options automatically copy with the box selected to "Copy Parent issue's fix and affects versions to each cloned subtask".  See the pictures that  I posted above.  If I manually select clone plus from a jira then the clone options appear and I can deselect that one and select only Copy Subtasks box.  Whenever Subtasks box is checked it automatically selects "copy subtask estimates", so I also have to  deselect that one.
How would I automate with code to ignore all of those options and only select "Copy Subtasks"?

0 votes
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 14, 2024

Hi @Alicia Pena 

I believe the clone issue action tries to clone most fields, and only the ones you select will replace the values: for example, select the Fix Versions field and leave it empty to clear the values rather than copy them.  Yet, there are several things not supported by the clone action, as described in suggestions like this one: https://jira.atlassian.com/browse/JIRAAUTOSERVER-741

To re-implement those options you describe, your rule will need logic to handle them...and given the limits on the maximum number of rule steps, you may not be able to have all of the possible combinations in a single rule (because the rule with if / else conditions would become too long.

 

How would you like to select the "options" for what is / is not cloned by the rule?

Let's assume your rule was manually triggered.  In that case, you could create different rules to handle some of the paths by running the rule needed.

 

Kind regards,
Bill

Alicia Pena
Contributor
October 14, 2024

I want a jira created once every 14 days that is cloned from a template jira.  When we do that manually we must deselect the clone options "Copy Parent issue's fix and affects versions to each cloned subtask".  Then we need to select "Copy Subtasks" box.  Whenever "Copy Subtasks" box is checked, it automatically selects "copy subtask estimates", so we also have to  deselect that one as well.

Final cloned jira should be cloning with the copy subtasks option only.  I can figure out how to copy jira fields from the template to the cloned jira.  But I can't figure out how to indicate how to only select "Copy Subtasks" option and no other.

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 15, 2024

You are trying to implement some of the selection options that the Clone Issue dialog provides using a rule, and so the rule logic will need to handle it.

As I noted, to prevent copying data for a field, select the field in the Clone Issue action and leave the value empty.  You may need to experiment a bit to learn what can / cannot be cleared using these methods.

An alternative is to not use the Clone Issue action.  Instead use Create Issue and explicitly copy the fields needed.  For the creation of the subtasks, the rule would branch over the existing subtasks (i.e., your template) and then set the parent field, likely using JSON.

0 votes
Shawn Doyle - ReleaseTEAM
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2024

Hi @Alicia Pena 

In Automation there is a different set of options to achieve the same results.

clone.png

clone2.png

clone3.png

You have the option to clone all fields or you can select ones you want.  

This is the doc if you want to do this via JSON, https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/

 

Alicia Pena
Contributor
October 14, 2024

How would I code to only "Copy Subtasks", which is the only Clone options box we manually select when cloning the template jira?

Shawn Doyle - ReleaseTEAM
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2024

I would think you would need to branch to also clone all subtasks.

If you just want to link to the Subtask, then "linked Issues" is the field to select.

Alicia Pena
Contributor
October 14, 2024

Makes sense.  Now I  have to figure out how to clone all of the subtasks from the template jira to the new cloned jira each time.  I'll dig into that now.  Thanks for the tip.

Alicia Pena
Contributor
October 14, 2024

I attempted to follow this https://confluence.atlassian.com/jirakb/automation-how-to-clone-tasks-stories-along-with-their-sub-tasks-1235853548.html , but jira datacenter doesn't have a Parent field to select (shown in step 4).  I created teh variable, branched, but not sure what to do from there since I can't select Parent as a field option.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.20.29&9.4.26
TAGS
AUG Leaders

Atlassian Community Events