# Asset field syncing

**URL:** https://community.exalate.com/t/asset-field-syncing/6920
**Category:** General Questions
**Tags:** exalate, cloud-jira, jira-cloud
**Created:** [November 13, 2025, 3:25pm UTC](https://community.exalate.com/t/asset-field-syncing/6920 "2025-11-13T15:25:58Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Janaki](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@Janaki](https://community.exalate.com/u/Janaki)
#### Post date: [November 13, 2025, 3:25pm UTC](https://community.exalate.com/t/asset-field-syncing/6920/1 "2025-11-13T15:25:58Z")

</div>

We’re syncing issues between two Jira Cloud sites, which include asset fields. However, we’re unable to get the asset fields to sync properly between the two instances. We reviewed the documentation provided in the link, but the suggested solution isn’t working—it results in a null value, and the destination field isn’t getting updated.

[How to Sync Insight Custom Fields](https://docs.exalate.com/docs/how-to-sync-insight-custom-fields)

Note: The object keys differ between both sites, but the object names are the same.

---

<div class="post-metadata">

### Author: ![Aida](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/aida/32/580_2.png) [@Aida](https://community.exalate.com/u/Aida)
#### Post date: [November 13, 2025, 3:26pm UTC](https://community.exalate.com/t/asset-field-syncing/6920/2 "2025-11-13T15:26:49Z")

</div>

Syncing asset (Insight) fields between two Jira Cloud sites where object keys differ but object names are the same requires a mapping approach, since the default script in the documentation assumes the object keys are identical on both sides.

The standard method from the documentation ([How to Sync Insight Custom Fields](https://docs.exalate.com/docs/how-to-sync-insight-custom-fields)) serializes the asset field values as strings and then deserializes them on the destination. However, if the object keys differ, this will result in nulls or failed updates, as you’ve experienced.

To handle this, you’ll need to:

1. Sync the object names (not keys) from the source.
2. On the destination, look up the asset object by name and set the field accordingly.

Here’s a high-level approach:

**Outgoing sync (source Jira Cloud):**

```groovy
final def insightCustomFieldName = "Assets"
replica.customKeys.assetNames = issue.customFields[insightCustomFieldName]?.value?.collect { assetObj ->
    assetObj?.name
}

```

**Incoming sync (destination Jira Cloud):**

```groovy
final def insightCustomFieldName = "Assets"
def cfm = com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager()
def cf = cfm.getCustomFieldObject(issue.customFields[insightCustomFieldName].id)
def cft = cf.getCustomFieldType()
def insightObjects = com.riadalabs.jira.plugins.insight.channel.external.api.facade.ObjectFacade
def objectFacade = com.atlassian.jira.component.ComponentAccessor.getOSGiComponentInstanceOfType(insightObjects)

issue.customFields[insightCustomFieldName].value = replica.customKeys.assetNames.collect { assetName ->
    // Replace "INSIGHT_SCHEMA_ID" with your actual schema ID
    def objects = objectFacade.findObjects("objectType = Asset AND Name = \"${assetName}\"", "INSIGHT_SCHEMA_ID")
    objects ? objects[0] : null
}

```

**Important notes:**

- Replace `"INSIGHT_SCHEMA_ID"` and `"Asset"` with your actual schema ID and object type name.
- This approach assumes asset names are unique within the schema.
- If multiple objects have the same name, you may need to refine the lookup.

For more details, see the official documentation:

> **[How to Sync Insight Custom Fields](https://docs.exalate.com/docs/how-to-sync-insight-custom-fields)**
>
> This article shows examples of syncing Insight custom fields.

This method should resolve the null value issue and ensure the correct asset is set on the destination, even when object keys differ.

---

<div class="post-metadata">

### Author: ![Janaki](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@Janaki](https://community.exalate.com/u/Janaki)
#### Post date: [November 13, 2025, 4:09pm UTC](https://community.exalate.com/t/asset-field-syncing/6920/3 "2025-11-13T16:09:50Z")

</div>

I have tried what you have given in the incoming sync final def insightCustomFieldName = “Assets”  
def cfm = com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager()  
def cf = cfm.getCustomFieldObject(issue.customFields[insightCustomFieldName].id)  
def cft = cf.getCustomFieldType()  
def insightObjects = com.riadalabs.jira.plugins.insight.channel.external.api.facade.ObjectFacade  
def objectFacade = com.atlassian.jira.component.ComponentAccessor.getOSGiComponentInstanceOfType(insightObjects)

issue.customFields[insightCustomFieldName].value = replica.customKeys.assetNames.collect { assetName →   
// Replace “INSIGHT\_SCHEMA\_ID” with your actual schema ID  
def objects = objectFacade.findObjects(“objectType = Asset AND Name = \”${assetName}\“”, “INSIGHT\_SCHEMA\_ID”)  
objects ? objects[0] : null  
} but got below error **Error Detail Message:**

No such property: com for class: Script10

---

<div class="post-metadata">

### Author: ![Janaki](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@Janaki](https://community.exalate.com/u/Janaki)
#### Post date: [November 18, 2025, 7:10am UTC](https://community.exalate.com/t/asset-field-syncing/6920/4 "2025-11-18T07:10:12Z")

</div>

Hi @Dhiren ,

Can you please help us on this.

Thanks,

R.Janaki

---

<div class="post-metadata">

### Author: ![Dhiren](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/dhiren/32/356_2.png) [@Dhiren](https://community.exalate.com/u/Dhiren)
#### Post date: [December 1, 2025, 8:21am UTC](https://community.exalate.com/t/asset-field-syncing/6920/5 "2025-12-01T08:21:59Z")

</div>

Hi @Janaki ,

The documentation you are referring to only works for Insight field sync between 2 Jira On-Prem Instances.

Since the instance that you are using is a Jira Cloud instance, this will not work for you.

Exalate does not support the sync of Insight objects for Jira Cloud directly and the only workaround here is to use httpClient() and do custom scripting.

One of the references for this is :

> [@Is insight compatible on Jira cloud sync?](https://community.exalate.com/t/is-insight-compatible-on-jira-cloud-sync/5014/2):
>
> Answer by Joachim Bollen on 25 January 2022 Hi George, The basic issuedata contains all you need to get this to work with some additional scripting. You’ll need to extract the workspaceId and the id of the object from the customfield: workspaceId = issue.customfield."Insight Object".workspaceId objectId = issue.customfield."Insight Object".objectId After that, you can call the Insight API to get the full data for this object: object = httpClient.get("https://api.atlassian.com/jsm/insight/w…

Thanks, Dhiren

---

<div class="post-metadata">

### Author: ![Sonal\_Otwani](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/sonal_otwani/32/392_2.png) [@Sonal\_Otwani](https://community.exalate.com/u/Sonal_Otwani)
#### Post date: [December 15, 2025, 10:13am UTC](https://community.exalate.com/t/asset-field-syncing/6920/6 "2025-12-15T10:13:37Z")

</div>

@Janaki

May I know if following post is similar ?

> [@Unable to Synchronize Assets Field Values Between projects in JSM Cloud](https://community.exalate.com/t/unable-to-synchronize-assets-field-values-between-projects-in-jsm-cloud/6585/7):
>
> Hi @Kevin Thanks for the response, yes, I have checked that, and the remote replica JSON contains the value, please find the below JSON. { “version”: { “major”: 1, “minor”: 14, “patch”: 0 }, “hubIssue”: { “Asset information”: “Card”, “voters”: , “project”: { “idStr”: “10353”, “key”: “key”, “name”: “project name” }

If yes we can continue this in either of the ticket.

Thanks,

Sonal
