# Sync Select list field to Insight/Asset custom field - Jira Data Center

**URL:** https://community.exalate.com/t/sync-select-list-field-to-insight-asset-custom-field-jira-data-center/6286
**Category:** General Questions
**Created:** [March 27, 2025, 2:59pm UTC](https://community.exalate.com/t/sync-select-list-field-to-insight-asset-custom-field-jira-data-center/6286 "2025-03-27T14:59:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sandy](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Sandy](https://community.exalate.com/u/Sandy)
#### Post date: [March 27, 2025, 2:59pm UTC](https://community.exalate.com/t/sync-select-list-field-to-insight-asset-custom-field-jira-data-center/6286/1 "2025-03-27T14:59:03Z")

</div>

Class iqlFacadeClass = ComponentAccessor.getPluginAccessor().getClassLoader().findClass(“com.riadalabs.jira.plugins.insight.channel.external.api.facade.IQLFacade”);  
def iqlFacade = ComponentAccessor.getOSGiComponentInstanceOfType(iqlFacadeClass)  
// Configuration

def selectListValue = replica.customFields.“SelectList”?.value?.value

if (selectListValue) {  
// Construct IQL query to find the asset by the select list value  
def selectList = selectListValue.toString().replaceAll(“\[|\]”, “”)  
def iqlQuery = “objectType = "objectID" AND Name = "$selectList"”

```
def objects = iqlFacade.findObjects(iqlQuery)
throw new com.exalate.api.exception.IssueTrackerException(objects.toString())

if (objects) {
    def objectBean = objects[0] // Assume first match
    
    issue.customFields."Assets".value = objects[0]

```

}  
}

The results of “def objects = iqlFacade.findObjects(iqlQuery)” returns empty value on Exalate. So I am not able to map the values to the asset custom field. The user executing the the script has admin permission on Jira.

**Troubleshooting** :  
Query outputs results through Asset Search,.  
Executed the same script on Scriptrunner console and it returned values. Exalate is failing to fetch the values for the query.

Can someone help with fixing the script?

---

<div class="post-metadata">

### Author: ![Majid](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/majid/32/343_2.png) [@Majid](https://community.exalate.com/u/Majid)
#### Post date: [July 9, 2025, 10:28am UTC](https://community.exalate.com/t/sync-select-list-field-to-insight-asset-custom-field-jira-data-center/6286/2 "2025-07-09T10:28:43Z")

</div>

Hi,

Have you tried the recommended syntax from here please:

> **[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.

Also, what does your replica contain in the payload for:  
replica.customFields.“SelectList”?.value?.value

Thanks  
Majid
