Hi Community Experts,
I have a use case that I thought might be common, but am having a heck of a time finding a solution that works. Our configured hierarchy in Jira Cloud tops out with Feature as the top level work item. Under that, we allow children work items to be Story, Defect or Task.
At the Feature level, we have a mutli-value Elements Connect field (customfield_10189)
At the the child level, we have a single-value Elements Connect field (customfield_10187)
In both cases, the data source is the same configured to pull from Assets CMDB so the values in each field are the same. One field just allows multiple values. The data contains names of applications in our company.
The goal is to have the multi-value Elements field in the Feature inherit the values from the single-select Elements fields from the child work items. This will present the user with a complete list of Impacted Applications to a Feature.
I'm successfully able to append values from one field to the other with this simple rule:


My problem is that while it adds the value no problem, when changes are made to the Application in a child work item, it just appends the list with the new value. I need it to also remove the previous value that was in the single-select while retaining the other values from the other child work items.
Perhaps an automation rule isn't the best way and there is a better way to solution this through Scriptrunner that someone is familiar with? Ideally, I think the best solution might be to clear all values in the multi-select field when any change is made to a child work item, then have it re-pull all values in. I just don't know how to handle this.
Would love to hear thoughts from an expert on this!
Thanks