Hey All,
So I've been fighting with this for a little while and I'm pretty sure it isn't possible.
Situation: We use labels in child issues to indicate some planning information. We need the parent to reflect the collection of these labels of all of its children. The labels are patterned and so any solution that requires me to know the exact label won't work.
The labels follow a pattern similar to this regex: "\d+[4-9]-Z\d+"
Problem: I can not handle the situation where a status is removed from the "last" child.
I have an automation running when a child label is updated to append that label (and any others matching the pattern) to the parent. I also have a scheduled automation that loops over all of the child issues and updates their parents (to catchup everything previously done).
Now what I'm trying to figure out is how to tackle when a label is removed from the last child.
Because I need to remove I'm pretty sure the only viable method is to work on the parents and somehow loop over the children "rebuilding" the label list.
However, from what I can tell:
1) You can't edit/concat a smart variable so I can build up a JSON to as I do a branch on children and then apply that post-branch
2) You can't use a smart value created in a branch once the branch exits
2) You can't call triggerissue in json (or any other way I can see) while in a branch.
So lets say I have a situation like this:
Parent: [24-Z1, 24-Z2, 24-Z3]
Child 1: [24-Z1, 24-Z2]
Child 2: [24-Z2, 24-Z3]
When someone removes "24-Z3" from Child 2 I need to remove "24-Z3" from Parent. But, if someone removes "24-Z2" from Child 2 it can't remove it from the parent because it is still contained in Child 1.
Any suggestions or am I screwed (I know I could create a CICD build job in our pipeline system and use REST API calls, but I really don't want to have to make my team do that....)