How To: Link the External Hash ID within an Assets Import to create the expected relationship
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
When performing an Assets Object Schema to import data from a different Assets instance, relationships may not get mapped correctly in the destination system due to the AQL Object Mapping used to create that relationship. The External Hash ID value is used within Assets Imports to prevent object collisions and is required to ensure that the object relationships are created correctly during the import. Additional informations around the Objects External Hash Key can be found within Object Schema Import Documentation.
Environment
Assets Environments performing Schema Object Imports where related objects are imported separately. For example, the parent object is imported first, and then the child object is imported in a separate import.
Solution
When you have separate imports that you need to map relationships between the External Hash ID must be used in the Object mapping for the subsequent imports. The AQL that should be used within the Object mapping is:
"External Hash Key" = ${<relationship field>}
⚠️ The "External Hash Key" cannot be used on the right side of the equal statement.
Using the AQL shown above should link the objects from the earlier imports to the objects imported in the subsequent imports that match on the External Hash Key from other other system.
Was this helpful?