Hi,
I'm trying to create an automation rule that updates a parent issue's multi-select list field with the values that are in the same field as the child issues.
For example:
Story 1 (child) -> field multi: a, b
Story 2 (child) -> field multi: c
Story 3 (child) -> field multi: b, c
---
Epic (parent) -> field multi: a, b, c
I've already created a rule that executes every time the ‘multi’ field is changed, I've managed to fetch all the values of the field that are in the child issues and create a list with the different values, however I have problems updating the parent issue with these values.
I'm using a company-managed project for this.
My rule:
My field name 'multi' is a multi-select list present in all my issues.
In my rule i'm creating a varaible with the parent key from the trigger issue to create the lookup issues
Then i create another variable with the list of distinct values from the field 'multi' in my lookup issues usins this formula
{{lookupIssues.multi.value.join(",").remove("[").remove("]").replace(", ",",").split(",").distinct}}
Audit logs
The difficulty I'm having is completing the update of the field in the parent issue. Can anyone help me?
Regards,
Luis
Hi @LuisPinto
Just to confirm, is the parent's field a multiple-select option field?
If so, the rule could use a dynamic JSON expression (rather than selecting the field from the Edit Issues dropdown list), and built using list iteration.
For example, the JSON could be this based on the rule you show:
{
"fields": {
"customfield_12345": [
{{#listValues.split(", ")}}
{ "add": { "value": "{{.}}" } } {{^last}}, {{/}}
{{/}}
]
}
}
Please update to use your specific custom field ID, and ensure the values exactly match the ones in your field configuration.
Kind regards,
Bill
Hello @Bill Sheboy ,
Yes, in the parent the field is the same as in the child, the ‘multi’ field.
I implemented your suggestion and it worked. I'm now able to edit the parent issue with the values from the child issues.
Thank you very much for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Derek Fields _RightStar_ ,
Thanks in advance for your reply.
The image I shared of the complete rule, in the part of editing the issue, was only representative, because I wasn't able to create the json object list with the values to update the field through the Additional fields option.
I'm trying to implement the solution that Bill also mentions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.