How to append additional values to referenced (type object attribute) attributes when importing data in Insight
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
Purpose
Currently when an attribute of type object already contains one or multiple references and an import is set up to import additional references that should be appended, those are instead substituted to the existing values as per the following suggestion:
Add an option in Import to append imported Objects to existing Objects in Referenced Attribute
The following is an applicable workaround in order to append the values anyway.
Step-by-step guide
In the target object type for the import create a new dummy attribute (same Attribute Type as the one you wish to eventually update) which will temporarily store the new attribute values which we will call temp.
Setup an Insight automation rule as follows:
- WHEN: Object Updated/Created
- IF: temp IS NOT EMPTY
- THEN: Attribute Value, set Field with the value
${Field${0}},${temp}
or${Field${0},${temp${0}}
when the temp variable is multi-valued.
The
Field
in the placeholder is the original attribute of type object. After the rule execution, the attribute will contain the original value(s) ofField
and the value of the appendedtemp
attribute.
Notes
- It's recommended to test this out in a new Insight Test Schema for testing purpose
- Add another Attribute Value action - to clear the temp attribute by setting it with no value. (Please test this as well - to ensure there is no race condition where the temp attribute is cleared before its value is appended to Field)