Remove & Update Fix Version based on the Epic's Fix Version
Asked by Amy Chang:

Hi,

I have a question about removing Fix versions from the issue.

Our Fix Version of the issues is based on the Epic

So when adding issues to Epic A, the issues will be auto-assigned to the same Fix versions as Epic.

If the issue becomes the empty parent, how can I remove the Fix versions?

If I directly change to another Epic (B), how can I remove the original one and add the same Fix Versions as Epic B?

Thanks!


Answers:
author: Bill Sheboy
body: Hi [@Amy Chang](/t5/user/viewprofilepage/user-id/5314184)

For your scenario, your rules will need to use various different triggers, and use conditions to decide what to do. In general...

* To clear the field, please try the issue edit action, leaving the value empty
* To always copy from the current parent epic, try the issue edit again, selecting to copy from parent. And so there is no need to remove the old values.

For the different scenarios, please consider:

1. issue created, and has an epic parent
2. issue updated for parent field, and epic parent removed
3. issue updated for parent field, and epic parent changed
4. epic updated, and \[probably\] want to update all of the child issues to match
5. manual tampering: someone edits the Fix Version in a non-epic issue...*What should happen?*

For cases 2 and 3, the rule could use conditions with the changelog to detect what happened to the parent.

Kind regards,  
Bill

comments: author: Amy Chang
body: Hi [@Bill Sheboy](https://community.atlassian.com/t5/user/viewprofilepage/user-id/1685313)

Thank you for your suggestion. It is useful.

There is one scenario I'm not sure I'm doing correctly or not. - When Epic updates/adds the release, update all child issues to match.

Can you please give me some suggestions?

![Screenshot 2024-04-15 at 4.17.01?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/318270i84C63635F01855A6/image-size/large?v=v2&px=999 "Screenshot 2024-04-15 at 4.17.01?PM.png")


author: Bill Sheboy
body: Hi, Amy!

If you are asking how to detect changes to the Fix Version field for the parent, and then copy the values to the child issues...there is a known defect with changelogs and list fields like that.

The only way I know to do this is with a separate rule:

* trigger: issue field updated for Fix Versions
* condition: issue type is epic
* branch: to the child issues of the epic
  * action: edit issue, update the Fix Version using the options from the ... menu on the right side of the field
    * COPY the values
    * from the Trigger Issue
    * clearing the check box "Add to existing values" so they are replaced

![Screenshot 2024-04-15 083425.png](https://community.atlassian.com/t5/image/serverpage/image-id/318379i3A3767EE05CB8EB6/image-dimensions/280x237?v=v2 "Screenshot 2024-04-15 083425.png")


author: Amy Chang
body: Hi [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)

I wrote the wrong scenarios to you, my bad. I would like to know if my automation (the screenshot above) matches scenarios 2 and 3:

* 2.issue updated for parent field, and Epic parent removed
* 3. issue updated for parent field, and Epic parent changed

Thanks


author: Bill Sheboy
body: First thing, the Epic Link field was sunset last year, and so I recommend specifically trying to test on the parent field. The parent field is now used for all parent / child relationships. Epic Link may still work, but it is better to use parent in the event Atlassian removes the old field in the future.

Given your scenarios and the trigger is on parent changed, I recommend testing for an empty parent field first. Then the else clause will always be to handle a changed parent (or addition of the first one).

* trigger: issue field changed for parent
* condition: issue type is in Story, Task, Bug, etc. (standard types)
* if / else condition:
  * condition: parent field is empty
  * action: do what is needed for the *removal of the parent*
* else / if:
  * smart value condition: {{#changlog.parent}}{{fromString}}{{/}} is empty
  * action: do what is needed for the *initial set of the parent*
* else:
  * action: do what is needed for a *change of parent*


author: Amy Chang
body: Thank you [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) ,

I tested it, and the rule works well!


author: Amy Chang
body: Hi [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)

Thank you for your suggestion. It is useful.

There is one scenario I'm not sure I'm doing correctly or not. - When Epic updates/adds the release, update all child issues to match.

Can you please give me some suggestions?

![Screenshot 2024-04-15 at 4.17.01?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/318268iE9688727DDAAE315/image-size/large?v=v2&px=999 "Screenshot 2024-04-15 at 4.17.01?PM.png")