Automation Rule Not Updating Cascade Field Correctly


Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Automation Rule Not Updating Cascade Field Correctly

Environment

Jira Service Management (Cloud)

Diagnosis

In the automation rule, set to update a cascade field, shows a successful execution but the cascade field is not updated. 

Cause

The issue seems to stem from incorrect referencing of the cascade field in the automation rule. When automating actions involving cascade fields, using the trigger issue's field reference instead of the parent issue's field may cause the update to fail.

Solution

It seems the issue you're facing might be related to how the triggerIssue is being referenced, especially when dealing with cascade fields in Jira. Here's a tested approach to ensure you're pulling the values from the parent issue correctly:

  1. Make sure you're referencing the parent issue fields, not the triggerIssue. Use parent.fields to refer to the parent's custom field value.
  2. Here's how the updated JSON would look for your automation rule:
    {
      "update": {
        "customfield_13025": [
          {
            "set": {
              "value": "{{issue.fields.parent.fields.customfield_13025.value}}",
              "child": {
                "value": "{{issue.fields.parent.fields.customfield_13025.child.value}}"
              }
            }
          }
        ]
      }
    }
    

It copies the cascade field values from the parent issue to the sub-task upon creation. Sharing a screenshot from my test instance for your reference:id is necessary to show attachment

Additional Resources


Last modified on Oct 24, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.