Forums

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

Automation Rule: Add a Cloned Epic parent to its Story

Emna Elleuch
Contributor
July 16, 2024

How can I add an automation Rule to add the Cloned item as Parent.

 

basically, I have created a Rule, whenever a new Story is created, A new Epic will be added as clone to that Story. Now I would like to add a Rule/ or maybe edit the first one to edit the Story and add the Epic Cloned as parent to the Story?

 

is it possible to do that? 

 

Thanks in advance !

 

Clone Epic.PNG

1 answer

1 accepted

0 votes
Answer accepted
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.
July 16, 2024

Hi @Emna Elleuch 

Yes, that is possible.

However, do you always want to do this, for every single Story created?  Or, is there some set of conditions to decide when to also create the Epic?

 

When an issue is created in a rule, the smart value {{createdIssue}} may be used to access its fields.  And so after you clone your issue into the epic, the parent field could be set.

For example:

  • trigger: issue created
  • action: re-fetch issue  (The issue created trigger can fire so quickly that some data may not yet be available to the rule.  To prevent errors / unexpected behaviors, I recommend always adding the Re-fetch Issue action immediately after this trigger.)
  • condition: issue type equals Story
  • action: clone issue, to create the Epic
  • action: edit issue (This will edit the trigger issue...)
    • setting the parent field to {{createdIssue.key}}

 

Kind regards,
Bill

Emna Elleuch
Contributor
July 17, 2024

Hi @Bill Sheboy ,

Yes I want to always clone the Story and add it as Epic. Your solution works for me thanks a lot, what about now this workflow is it possible to do it? Should i update the same Rule or mayeb add a new one? new rule.PNGthanks in advance Bill

 

After cloning the Story to an Epic, I have some Dev/Qa Stories and Bugs linked/Related to the Story, I would like to add the Epic Cloned as Parent.

 

Epic Cloned Parent to all Dev/QA Stories and Bugs.

Emna Elleuch
Contributor
July 17, 2024

i've tried this rule but it didnt work , whenever the Parent of the Story changed, we will look to its linked issues (Bugs/QA Stories or DEV Story) and edit their PArent to be similar than the Trigger

 

am I doing it wrong? thanks

don't work.PNG

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.
July 18, 2024

Please review the solution I suggested, as it appears you have the Re-fetch Issue action in the incorrect location: https://community.atlassian.com/t5/Jira-questions/Re-Automation-Rule-Add-a-Cloned-Epic-parent-to-its-Story/qaq-p/2756322/comment-id/1034373#M1034373

 

For your second scenario where the Story's Parent changes and you also want to add that same Parent to any linked "relates to" issues...

By default, the actions of one rule do not trigger other rules.  This is to prevent accidental rule looping problems. 

And so when your rule to create the Epic runs and sets the Story's parent, the second rule does not trigger / run.  You can correct that by updating the Rule Details at the top of the second rule, enabling this option with the checkbox:

Check to allow other rule actions to trigger this rule...

 

Like Emna Elleuch likes this
Emna Elleuch
Contributor
July 19, 2024

Thank you @Bill Sheboy I've fixed the rule and used your solution, thanks for your help!

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events