Update cascade field value in automation

Olive Sun
Contributor
December 25, 2024

I have an automation rule that creates a new issue and sets the value of a cascading field based on the trigger issue. It has been working well for a long time, but recently it started failing when the trigger issue doesn’t have a child value for the cascading field.

 

{ "fields": { "customfield_xx": { "value": "{{triggerIssue.fields.customfield_xx.value}}", "child": { "value" : "{{triggerIssue.fields.customfield_xx.child.value}}" } } } }

Error message: Specify a valid child option 'name' for customfield_xx

 

Could this be due to a change in Jira?

2 answers

0 votes
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.
December 26, 2024

Hi @Olive Sun 

For a question like this, context is important for the community to help.  Please post the following:

  • what type of project is this (e.g., company-managed, team-managed, etc.), 
  • an image of your complete automation rule,
  • an image if the issue create / edit which is using your JSON expression,
  • an image of the audit log details showing the rule execution, and
  • explain what you are observing.

Until we see those...

When did you first notice this symptom?  Seeing the audit log (both the details and list of executions) will help to confirm when the symptom started happening.

Has anything changed in the rule, field configuration, or conditions when the rule is used?

My understanding is the child value (or id) should not be passed when the value is empty for a cascading field.  When it is unknown if the parent (and / or child) values will be empty, a conditional expression may help to make the JSON dynamic: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/

Kind regards,
Bill

0 votes
Jovin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 26, 2024

Hey @Olive Sun 

It's always frustrating when something changes and you have no clue why! Couple of troubleshooting questions here to start off (as I haven't tried updating cascading fields just yet):

  1. Have you tried using the GUI Value setting for the field and using the ... to change the option to "Copy" and then choosing the same field on Trigger Issue?
  2. Have you tried splitting the update of the field into 2 , e.g.
    • { "fields": { "customerfield_XX": { "value": "{{triggerIssue.fields.customerfield_XX.value}}" } } }
    • Then do an IF statement to check if child value IS NOT EMPTY
    • Same code to update the child value

Let me know if either of these help, and if not, I'll jump in and try building a matching automation rule! 

Suggest an answer

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

Atlassian Community Events