I am using the Automation for Jira add-on, and cannot figure out how to set an epic link for cloned stories in this scenario:
I have an Epic, "Epic 1" and two stories that are linked to this epic, "Story 1" and "Story 2". I want to clone all of these issues, and set the epic link of the cloned stories to the cloned epic. For example, I clone Epic 1 to create Epic 2, and I clone Stories 1 and 2 to create Stories 3 and 4. Is there a way to set the epic link of Stories 3 and 4 to Epic 2?
Currently the epic link just carries over to the clones, so Stories 3 and 4 maintain an epic link of Epic 1. I've looked through as many actions/ways to link as I could and I can't find a way to set the epic link in that manner. There doesn't seem to be a way to look at the original epic, and then look at that epic's clones, and then set the epic link.
I've tried just about everything I can think of in the actual rules, I am not too familiar with JQL/JSON but thought there may be a way to do this via that kind of customization? Any help would be appreciated. Thank you!
Hi, I'm Luka from codefortynine 👋
I just want to add that our app Deep Clone for Jira can clone whole issue hierarchies (Initiative ⇒ Epic ⇒ Task/Story ⇒ Subtask) with Epic/Tree Clone.
Navigate to the issue you want to clone
Click Action menu ••• > Deep Clone
Select Epic/Tree Clone
Configure and create your Epic/Tree Clone
As long as the parent and child issues are part of the clone, our app will keep the parent links. You can also decide to have Deep Clone link to parents that are not part of the clone.
This is super helpful. Thank you so much for sharing. You have saved me quite some time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For the Epic link, use the smartvalue:
{{#createdIssues.get(0)}}{{key}}{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This clones a new epic, and the stories underneath that epic but adds the new cloned stories to the old epic. The new cloned epic has no stories
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrew,
I am assuming your cloning the epic in the same rule? In that case, you can use the {{createdIssue.key}} in the epic link field to refer to it. For example:
Let me know if that works for you
Cheers,
Scott.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot, this is helpful. To answer your question, we do not always clone the epic and story in the same rule. Sometimes individual stories may be cloned before the epic to be worked, while other stories in the epic are still being developed. So I think that rule above would work if we clone all stories and the epic at once, but it wouldn't backfill the epic link we're looking for for stories that have already been created.
To explain expanding on the example in my initial question, this would be: Clone Story 1 to create Story 3. THEN clone Epic 1 to create Epic 2, and Story 2 to create Story 4. Using that rule, the {{createdIssue.key}} would set the epic link for Story 4 correct, as Epic 2. But Story 3 would not have the Epic link of Epic 2. Any help on that scenario would be much appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.