How to Copy Epic's Fix Version to Story Based on Condition

Rita Arellano
Contributor
February 8, 2025

Hi all, 

I need some guidance. Here is the goal: If epic's fix version is changed then copy that fix version from the epic down to the story, provided the story's existing fix version does not match the epic's affected version. 

Background: The epic will have a value on its Affect/s Version/s field and the story will have the fix version that matches that Affect/s Version/s. However, if the epic's fix version is changed then copy that fix version from the epic down to the story - only if the existing story's fix version does not match the Affect/s Version/s of the epic. 

This rule is not yielding any results... I somehow show a 'Success' but nothing is taking place and seems like my lookup is not finding the stories that are linked to the epic. 

Rule: 

Rule 1.jpgRule 2.jpgRule 3.jpg

3 answers

1 vote
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 9, 2025

Hi @Rita Arellano , one issue I see is the use of epic link which has been replaced by "parent". You could also eliminate the check to see if children don't match the parent if you wanted and simply overwrite what is there regardless.

0 votes
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.
February 9, 2025

Hi @Rita Arellano 

First, here are some questions to help clarify your scenario, particularly to learn if this is to add versions or to synch versions between the Epic and Story issues.  I recommend pausing to discuss your scenario with another team member; explaining it will help clarify the problem / solution approach for your rule writing.

 

1) What problem is this rule trying to solve?  That is, "why do this?"

2) What is the purpose of the Lookup Issues action in your rule?

3) How many child Stories will each Epic have?

4) Do you want to update all child Stories associated to the trigger Epic, or only specific Stories (matching some criteria)?

5) Can the Epic have more than one Affects Versions value?  If so, do they all need to match, or at least one, when checking the child Stories?

6) Can the Epic have more than one Fix Versions value?  If so, should all of them be copied to the child Stories?

7) Can the child Stories have more values in the Fix Versions or Affects Versions fields than do their parent Epic?  That is, they are a superset of the parent's values.

8) What will happen if the Epic's Affects Versions value changes after the child Stories' Fix Versions are updated?

9) What should happen to Stories added to an Epic after the version fields are already set in the Epic?

10) What should happen to Stories which are removed from an Epic, or changed to a different parent Epic? 

11) What should happen if someone manually changes a Story's values for Fix Versions, making them out-of-synch with the parent Epic?

 

Kind regards,
Bill

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.
February 9, 2025

Thank you for the additional information, @Rita Arellano 

You describe using multiple automation rules (beyond the scope of this question) to update version fields, and precise manual field changes, relying on people doing them in the correct order...with no rule update collisions.  For example, your answer to my first question shows a potential for an update error: if someone updates the Fix Versions before the Affects Versions, the rule will not work as expected.

Your team seems to be doing this to fix challenges with what appears to be an application for test management.  If that is a marketplace app, perhaps contact that vendor to ask for suggestions on resolving the app challenges before using rules to do so.

 

Next, if you continue with the automation approach, I recommend:

  • Simplify to use the field updates with Fix Versions field to only detect additions.  Then the rule may change to use a branch on JQL (rather than branch on issues in the Epic), and target exactly the issues needed for updates by excluding the others.  That JQL could be built dynamically using the trigger issue (Epic) to exclude the ones based on the version values.
  • For some of my questions, you seem to assume "that will not happen".  I recommend adding conditions to your rules to validate those assumptions, such as for the number of versions in Story fields and no manual changes to a Story's Fix Versions field.  (Those could be separate rules to send you alerts.)
  • For the change of parent Epic case, that will require an additional rule for changes to the Parent / Epic Link with duplicate logic from other rules.  This may create potential problems in the future if rule logic changes and all rules are not found / updated.

 

0 votes
Vishal Biyani
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.
February 9, 2025

Note: This is based on the cloud version that I have. Your Data center version may still be  using Epic Link instead of parent.

 

For cloud version, instead of epic, {{issue.parent.fixVersions.name}}  or {{issue.parent.versions.name}} works

Instead of epic link parent works.

Try to use smart value condition, instead of related issue conditions as you are already in  the branch for stories/task. Since I didn't have versions available at Epic or Story level, so I used fixVersions for demo purpose.

 

snip.png 

Another thing is both versions and FixVersions are list fields (multi valued), so you may have to test thoroughly with possible permutation and combinations based on your use case

 

Suggest an answer

Log in or Sign up to answer