Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Error on Automation Rule

Travis Hill
Contributor
April 25, 2025

Hello,

I am running into an error on automation rule and Im pretty sure its with how Im logging the returned items.

Screenshot 2025-04-25 at 4.24.18 PM.pngScreenshot 2025-04-25 at 4.24.33 PM.png

As you can see I try to add the result to a variable and then its erroring out on the branch saying that " is not a valid option. Can someone get a second pair of eyes on this? Thank you!

2 answers

1 accepted

4 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 26, 2025

Hi @Travis Hill 

As @Trudy Claspill describes, we need to see more context to help.  Please post images of:

  • your entire rule in one continuous image,
  • the create variable action, and
  • the entire audit log details showing the rule execution.

Until we see those...

 

I hypothesize at least two things are happening in your rule:

  1. you are trying to merge values from multiple-selection (or checkbox) fields, in multiple issues (such as from a Lookup Issues result), to get the selected distinct values, storing that in a variable
  2. you are then trying to update a single issue (e.g., the parent) to include the selections

 

For the first item, I recommend using the new flatten function to combine the values.  This eliminates the need for nested iterators and removing the square-brackets manually.  For example:

{{lookupIssues.customfield_12955.value.flatten().distinct}}

With that, the values could be iterated to create a dynamic JSON expression to update the field in the other issue using the multiple values:

{
"fields": {
"Business Unit Checkboxes" : [
{{#lookupIssues.customfield_12955.value.flatten.distinct}}
{
"value": {{.}}
} {{^last}}, {{/}}
{{/}}
]
}
}

 

Finally, with JSON expressions some smart values do not work and the custom field ID must be used instead.  If the above expression does not work, please try using the custom field ID in the JSON.

 

Kind regards,
Bill

Travis Hill
Contributor
April 28, 2025

@Bill Sheboy @Trudy Claspill Thank you so much for reaching out! Just to summarize, we use a field that has two selections (domestic, international) basically when this rule runs we want the variable to collect the info on the child tickets and then summarize it in the parent (basically to see if the work is domestic, international or both). I included the screenshots you asked for below.

Screenshot 2025-04-28 at 11.32.53 AM.pngScreenshot 2025-04-28 at 11.33.00 AM.pngScreenshot 2025-04-28 at 11.33.08 AM.pngScreenshot 2025-04-28 at 11.33.38 AM.pngScreenshot 2025-04-28 at 11.33.52 AM.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 28, 2025

Thanks for that information, and it matches the scenario I described.  And so you could try what I suggested, or...

Although you do not show the create variable action specifics, the audit log indicates when you try to parse the variable by removing the square brackets (and stray spaces) to split into a list, something is not working.

If you show the create variable action AND write just the variable contents to the log and re-test, you will be able to confirm that.

 

And FYI -- It helps to post continuous images for rules and the audit log details to confirm the context.  That may be done using a screen capture tool or browser addon which supports scrolling-page capture.

Travis Hill
Contributor
April 28, 2025

This worked, thank you!

Like Bill Sheboy likes this
1 vote
Trudy Claspill
Community Champion
April 25, 2025

Hello @Travis Hill 

Unfortunately there is not enough information here for us the provide meaningful debugging advice.

Can you please provide screen images that show your entire rule?

Also provide a screen image showing the details of the Create Variable action and any steps where you are then trying to use that variable.

And, if your variable is being created based on information from other fields, please tell us what type of fields are being used and the value of each field.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events