Copy 3rd party custom field value from parent to linked issue using Automation for Jira (A4J)

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

Although Automation for Jira does not natively support Deviniti's Dynamic forms for Jira fields on the format of the simple forms, it is possible to adjust values using SmartValues by knowing how the fields are structured in the back end.

Different from how normal custom fields exist in Jira (one field maps to a direct value), Deviniti expands on this structure by making each field map into a tuple that identifies each option available for the custom field.

So to adjust the custom field values, rather than updating the value directly, you need to adjust the value of the internal ID.

Solution

  1. Create an Automation Rule with a required trigger based on the requirement.

  2. Use a branching condition for the Linked Issues that would match a required Link Type.

  3. Clear the Custom Field Values of the Linked Issue before copying the values from the parent using the below advanced-field-editing-using-json.

1 2 3 4 5 6 7 8 9 { "fields": { "customfield_12100": [ { "id": "" } ] } }
Rule Visual

4. Copy the Dynamic Form Field values from one Issue to another one by changing the custom field Id with the below advanced-field-editing-using-json.

1 2 3 4 5 6 7 8 9 { "update": { "customfield_12100": [ {{#triggerIssue.customfield_12100}} {"add": {"value": "{{value}}"}}{{^last}},{{/}} {{/}} ] } }

5. Run the rule and refer to the audit-log that the field values are cleared out first and then the Copy of Field value from the Parent happens to the Linked Issue.

Result of rule execution

Updated on May 31, 2024

Still need help?

The Atlassian Community is here for you.