It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Automation: Ensure All Children inherit the Epics Fix version

Hi there,

I am looking to set up an automation for Jira. When a ticket gets added under a specific epic. It then matches the fix version to the same as the epic.

 

I currently have a rule that is very manual. I have to manually reset the fix version of the epic to propagate it down, which is not great.

x1.JPG

1 answer

0 votes

Hi @Colin Davidson 

It should be possible to do via:

  1. Trigger: Issue Updated
  2. Condition: Issue Fields Condition - Issue Type (field) does not equal (condition) Epic (value)
  3. Action: Edit Issue - FixVersions (field).
  4. In the Action, when the value options appear, press the breadcrumbs icon (3-dots) and select "Copy From" - then click on the value to ensure the "Issue to copy from" is set to Epic Issue, and "Field to copy value from" is FixVersions. You can also choose whether this "Adds to existing values" using the checkbox.

^ This will work the Epic Link is added, removed or modified.

Just bear in mind that as we're using Issue Updated, the rule will trigger on any update even if there is no action to perform. This classes as an execution and would count towards your Global limits (eg. on Jira Cloud Free, Standard, etc). Best to run this at a project-level where there are virtually unlimited executions.

Ste

@Stephen Wright _Elabor8_  Unfortunately if the issue is say a ticket with no epic. It then sets the fix version to blank.

Hi @Colin Davidson 

Yes, based on the rule above. This is because it would attempt to copy from the Epic parent - and as it has no value, the field will become blank.

You could modify the above rule to change how no Epic Link behaves - for example...

----------------------------

Rule Example 1:

  • If there is an Epic Link, copy the FixVersion from the Epic
  • If there is no Epic Link, do nothing

This would be:

  1. Trigger: Issue Updated
  2. Condition: Advanced Compare Condition - {{issue. Epic Link}} (first value), does not equal (condition) - then leave second condition "empty"
  3. Action: Edit Issue - FixVersions (field) - for the value, either utilise "Copy from Epic" in the value drop-down - or press the breadcrumbs icon (3-dots) and select "Copy From" - then click on the value to ensure the "Issue to copy from" is set to Epic Issue, and "Field to copy value from" is FixVersions. The second method allows you to choose whether this "Adds to existing values" (using the checkbox).

----------------------------

Rule Example 2:

  • If there is an Epic Link, copy the FixVersion from the Epic
  • If there is no Epic Link, do something else (in this example, use a specific FixVersion)

This would be:

  1. Trigger: Issue Updated
  2. Branch: Current Issue (type or related issue)
  3. Condition: Advanced Compare Condition - {{issue. Epic Link}} (first value), does not equal (condition) - then leave second condition "empty"
  4. Action: Edit Issue - FixVersions (field) - for the value, either utilise "Copy from Epic" in the value drop-down - or press the breadcrumbs icon (3-dots) and select "Copy From" - then click on the value to ensure the "Issue to copy from" is set to Epic Issue, and "Field to copy value from" is FixVersions. The second method allows you to choose whether this "Adds to existing values" (using the checkbox).
  5. Branch: Current Issue (type or related issue)
  6. Condition: Advanced Compare Condition - {{issue. Epic Link}} (first value), equals (condition) - then leave second condition empty
  7. Condition: Issue Fields Condition - Issue Type (field) does not equal (condition) Epic (value)
  8. Action: Edit Issue - FixVersions (field) - set value as Version X

^ In the second branch (step 5), step 7 is required to stop the rule running when an Epic is updated.

----------------------------

So it just depends on your scenario for empty Epic Links. These rules could be expanded even further - for example, if there is a different rule for Issues with no Epic Link which have a FixVersion, versus one that has not already got one.

If your scenario isn't covered by one of the rule examples above - let us know, I'd be happy to try and create it for you :)

Ste

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you