I want ABC-3 to have Favorite Color = Red, Blue, Green, White
Currently I'm using this automation, but it doesn't always pull in all the values as it should and I know it's not complete - and that's where I'm stuck.
Hi @Sara Beyer
Using a branch will probably not work for this scenario: branches which could be on more than one thing are run in parallel and asynchronously. The impact for your rule is the multiple updates could collide, intermittently succeeding or failing.
A better approach is to perform one single update of the work item...
Use the Lookup Issues action to first gather all of the "source" issues from which you want to merge the values. Then update using a JSON expression to add the values need.
Let's assume you want to ADD the values, not replace the ones in your ABC-3 work item. And so the rule could be:
{
"update": {
"customfield_12345": [
{{#lookupIssues.customField_12345.value.flatten.distinct}}
{
"add": { "value": "{{.}}" }
} {{^last}},{{/}}
{{/}}
]
}
}
Please note well: this rule assumes the trigger issue is the one you want to update. Additional logic to check the link types is needed when you want to handle any updates, such as finding and branching to your ABC-3 work item.
Kind regards,
Bill
Hi @Sara Beyer -
Unfortunately I think it's because Automation runs branches in parallel. So it tries to "add" the Favorite Colors from tickets ABC-1 and ABC-2 at the same time, and that leads to unpredictable results.
Does that sound about right, @Bill Sheboy ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, but you probably want a FIX, not just why your rule doesn't work.
Maybe do a Lookup for Linked Issues of Type Block, and THEN you can set ABC-3's Favorite Color to be:
{{lookupIssues."Favorite Color"}}
Or maybe
{{lookupIssues."Favorite Color".join(",")}}
I'd play with that.
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.
Hey, @Darryl Lee -- I must have been typing that up whilst you were mentioning me :^)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Woof. I've been on the Internet for way too long and forget that it really doesn't matter if I get "FIRST!" here.
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.