Cloning with automation doesn't clone
Asked by Ivan Guillermo Seligmann:

Hi

I have many user stories with several links (let's say, LA, LB, LC, where link types are all different), If I clone a US-1, the new cloned US-2 has exactly the same links ( LA-1, LB-1 , LC-1) , and the linked issues are linked to both USs, the original and the new one, US-1 and US-2

(My goal is that in the end, US-1 will be linked lo LA-1, and US-2 will e linked to LB-1 and LC-1)

I want to do that in bulk for many US at once, hence, I wrote an automation, when I set a specific value for a label, then the issue is cloned. When I set the value for the label, the new User Story it not linked to the other issues, nor vice-versa., all the 3 Lx-1 are still linked only to US-1

I need either

* At least: All the issues to be linked to both User Stories (so then I can remove manually the ones I don't need from each US)
* Optimal: at cloning time, to change LB-1 from US-1 to US-2, and LC-1 from, keeping of course the link types

Any clue how to make it happen, please?   

Thanks a lot in advance!


Answers:
author: Bill Sheboy
body: Hi [@Ivan Guillermo Seligmann](/t5/user/viewprofilepage/user-id/5462227) -- Welcome to the Atlassian Community!

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!

Until we see those...

By default, the clone issue action does not clone the links.

You can add the Linked Issues from the field selection, and at the right-side ... then select to copy them from the current issue. That would meet your first scenario.

Regardless of that...how would your rule know which links to keep / change (for your second scenario)? If you clarify that the community may be able to offer additional suggestions. Thanks!

Kind regards,  
Bill

comments: author: Ivan Guillermo Seligmann
body: Hi Bill !

Thanks so much !!  

The rule is super easy and with zero mystery, I was simply expecting the same behavior as with the manual cloning

another issue I saw, when i tried to run it for 350 user stories, that only 100 where processed , and the other failed with "some errors" in general "no action performed", "Actor does not have permission to view one or more issues, or the issue was deleted (please check permissions and issue security levels):" "CAnnot create issue" , or "execution limit reached"

**million dollar question... how do I select to copy the links from the current issue? I didn't see the option**

bellow is the log for a successful one

I am the project admin, by the way

![clone ok.png](https://community.atlassian.com/t5/image/serverpage/image-id/329010i651269D88A16343E/image-size/large?v=v2&px=999 "clone ok.png")![clone rule.png](https://community.atlassian.com/t5/image/serverpage/image-id/329011iA28BEF1A804F1D09/image-size/large?v=v2&px=999 "clone rule.png")


author: Ivan Guillermo Seligmann
body: About the second scenario.

it could be

* Status, I might want to keep with the original US, the issues that are already closed, and to change the others to the cloned one
* Component, issues belonging to 1 component stay with the original US, the others change to the cloned one


author: Ivan Guillermo Seligmann
body: hi [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)

Found the configuration option, however, it is still not working, and the message is very weird, since I am cloning into the same project and issue type...

![clone error.png](https://community.atlassian.com/t5/image/serverpage/image-id/329084i00AB76D440C5F883/image-size/large?v=v2&px=999 "clone error.png")![clone rule.png](https://community.atlassian.com/t5/image/serverpage/image-id/329085iC54A78AEFE07DAA9/image-size/large?v=v2&px=999 "clone rule.png")


author: Bill Sheboy
body: Thanks for the additional information, Ivan. If I miss responding to one of your questions / ideas, please let me know...

First thing, I would not assume when an automation rule action does something that it is identical to the Jira UX features. This is certainly true for issue create, clone, move, etc.

Next, automation triggers, branches, and actions are [limited to 100 issues](https://support.atlassian.com/cloud-automation/docs/automation-service-limits/), although there are exceptions when those are nested. This is another difference from the UX, which can apparently loop over things in chunks (such as 100). To get the same behavior with rules, they need to either process multiple chunks in the rule or build a rule which can run repeatedly until done (such as with a scheduled trigger).

When you need to clone and have lots of links, the only options may be the built-in Jira clone or a marketplace app that has more configuration for issue cloning options.

Finally for that automation log error shown, I wonder: are all of the linked issues in the same Jira project? If not, this could be an rule scope problem...

Issue linking changes both issues linked, and *automation rules running in one project may only update issues in that project*. To update issues in multiple projects, a rule must be global or multiple project in scope. That may not be a good idea for your scenario, but please ask your Jira Site Admin what they think.


author: Ivan Guillermo Seligmann
body: Hi [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)

Thanks so much for your answers, the issue is solved not and your comments were very helpful!

I ended changing the automation, and some Branches gave me the exact result I was looking for, though I have to do it in 100 issues chunks, it still works

An additional problem was related to some project configuration, apparently, even when I had linked issues, some "linked issues fields" were not present in the project, our internal support team managed to fix that

In case it could be helpful for someone else, I am including here the final version of the automation

have a nice weekend!

![split rule 1.png](https://community.atlassian.com/t5/image/serverpage/image-id/329998iC25E2316DA8B63AC/image-size/large?v=v2&px=999 "split rule 1.png")![split rule 2.png](https://community.atlassian.com/t5/image/serverpage/image-id/329999iB0814C5E1631AC09/image-size/large?v=v2&px=999 "split rule 2.png")![split rule 3.png](https://community.atlassian.com/t5/image/serverpage/image-id/330000i9BC177F5BFF41BD9/image-size/large?v=v2&px=999 "split rule 3.png")


author: Luka Hummel - codefortynine
body: Hi [@Ivan Guillermo Seligmann](/t5/user/viewprofilepage/user-id/5462227)

I'm Luka from codefortynine.

If you are willing to use a third-party app, you can try our [Deep Clone for Jira](https://marketplace.atlassian.com/apps/1218652?utm_source=atlassian&utm_medium=referral&utm_campaign=deepj-new-reach-com-2722884).

Deep Clone can clone up to 100,000 issues at once and his highly customizable. You can decide how Deep Clone should handle your issue links and can edit custom field values dynamically while cloning with our [Field Editor](https://documentation.codefortynine.com/deep-clone-for-jira/field-editor?utm_source=atlassian&utm_medium=referral&utm_campaign=deepj-new-reach-com-2722884).

![2024-06-12 16-00.png](https://community.atlassian.com/t5/image/serverpage/image-id/329485iE454E31B2BA048BC/image-size/large?v=v2&px=999 "2024-06-12 16-00.png")


Tags: automation

cloning

cloud

jira-cloud