# Sync Custom field (Dropdown, select list) in Jira cloud to Element connect custom field in Jira server

**URL:** <https://community.exalate.com/t/sync-custom-field-dropdown-select-list-in-jira-cloud-to-element-connect-custom-field-in-jira-server/4849>\
**Category:** General Questions\
**Tags:** onpremise-jira, cloud-jira, migrated\_question\
**Created:** [November 4, 2024, 7:27am UTC](https://community.exalate.com/t/sync-custom-field-dropdown-select-list-in-jira-cloud-to-element-connect-custom-field-in-jira-server/4849 "2024-11-04T07:27:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:27am UTC](https://community.exalate.com/t/sync-custom-field-dropdown-select-list-in-jira-cloud-to-element-connect-custom-field-in-jira-server/4849/1 "2024-11-04T07:27:30Z")

</div>

_Originally asked by Vinay on 09 September 2021 [(original question)](https://oldcommunity.exalate.com/questions/30052121)_

* * *

We tried below script but this is not working as expected

def hobbyMap = [“Academy”: “0010”, “Lulu”: “0010”, “Pet”: “0010”, “Sep”: “0010”]  
def remoteHobbies = replica.customFields." 10635 “?. Value? .Value  
issue.customFields.” desinationcustomfield ".value = remoteHobbies.collect{hobbyMap [it]?: it}

* * *

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:27am UTC](https://community.exalate.com/t/sync-custom-field-dropdown-select-list-in-jira-cloud-to-element-connect-custom-field-in-jira-server/4849/2 "2024-11-04T07:27:31Z")

</div>

_Answer by Ariel Aguilar on 11 September 2021_

Hi Vinay,

Please make sure to check on syntax, since this should work:

```auto
def hobbyMap = ["Academy": "0010", "Lulu": "0010", "Pet": "0010", "Sep": "0010"] // ["remote options" : "local option"]
def remoteHobbies = replica.customFields."10635"?.value?.value
issue.customFields."destinationcustomfield".value = remoteHobbies.collect{hobbyMap[it] ?: it}

```

Kind regards,

Ariel

* * *

#### Comments:

> **Vinay commented on 17 September 2021**
>
> > Source Custom field type(Jira Cloud) : Select List (multiple choices)
> 
> Destination Custom field type(Jira Server) : Elements Connect - Live - Text (legacy)
> 
> Please test at your end with the above script. It is not working for me
