Forums

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

Rule for any Issue type to copy a epic-field-value when the Issue gets linked to an existing Epic

Carin Talero August 22, 2022

I cannot force to select an Epic when creating a story or bug issue, so I want to create a rule to update the field "Source" in the new issue, whenever that issue gets linked to an Epic with the Epic's "Source" field value. Basically to keep them sync.

If that already linked issue gets updated to be linked to a different Epic, then the rule would update the "Source" field value in the issue to be the same of the new Epic linked.

Thnx!

 

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
August 22, 2022

Hello @Carin Talero 

Take a look at the responses on the following post and let us know if that provides enough information for you to create the rule(s) you need.

https://community.atlassian.com/t5/Jira-Software-questions/Automation-on-Epic-Link/qaq-p/1713453

(credit to @Bill Sheboy )

Carin Talero August 25, 2022

Thank you, following that post, then my rule would be like this:

  • Trigger: issue updated
  • Advanced compare condition:
    • First value: {{#changelog.epic link}}{{toString}}{{/}}
    • Condition: does not equal
    • Second value: empty (leave it blank)
  • Edit issue fields (field = source). Is this step going to copy the value of that field form the epic into the story?
Trudy Claspill
Community Champion
August 25, 2022

Do you already have an automation rule that copies the value if the issue is linked to an Epic during creation? Just checking if you already have that path covered.

Yess, that is the trigger and Advanced Compare you need. I would advise putting an issue type check right after the trigger also to ensure the triggering issue is not an Epic (because the Compare would fail for an Epic type of issue).

In the Edit Issue Fields action you need to specify the value to which the field will be set. If you click the ...  button next to the space where you would enter the value you get a choice to base the setting on Copy From. After you select that you can click on the "Copy From Current Issue" text and change it to Copy From Epic Issue. 

Like # people like this
Carin Talero August 26, 2022

Thnx, I added the check that issue type is not equal to epic, and the Copy from epic.

And for the case of the issue being just created:

- When Issue created

- Issue Type not equal to Epic

- Epic Name not empty

- Edit Issue Field - Source field copy from epic

Is this correct?

Trudy Claspill
Community Champion
August 26, 2022

Yes, that's correct!

Like Carin Talero likes this
Trudy Claspill
Community Champion
August 26, 2022

Another scenario to consider - what if an issues is removed from an Epic and not assigned to another Epic? Do you want the Source field cleared?

Carin Talero August 26, 2022

Actually I was initially trying to force that an issue should always be linked to an epic, and not orphan... so then I was thinking on creating a rule that checks everyday if there are orphan issues to send an email alert or something.

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