Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

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

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.



1 answer

1 accepted

0 votes
Answer accepted

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.

(credit to @Bill Sheboy )

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?

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

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?

Yes, that's correct!

Like Carin Talero likes this

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?

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
Site Admin

Atlassian Community Events