# Unable to sync jira single list to ALM

**URL:** <https://community.exalate.com/t/unable-to-sync-jira-single-list-to-alm/5043>\
**Category:** General Questions\
**Tags:** exalate, migrated\_question\
**Created:** [November 4, 2024, 7:39am UTC](https://community.exalate.com/t/unable-to-sync-jira-single-list-to-alm/5043 "2024-11-04T07:39:56Z")\
**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:39am UTC](https://community.exalate.com/t/unable-to-sync-jira-single-list-to-alm/5043/1 "2024-11-04T07:39:56Z")

</div>

_Originally asked by SANDEEP ADE on 08 February 2022 [(original question)](https://oldcommunity.exalate.com/questions/42832317)_

* * *

I have the following code

JIRA SENDING SIDE

replica.customFields."Functional Area – PCM”= issue.customFields.“Functional Area - PCM”

ALM INCOMING SIDE

defect.customFields.“FunctionalArea”.value = replica.customFields.“Functional Area - PCM”?.value.value

Previously the sync rules allowed the below code

defect.customFields.“FunctionalArea”.value = replica.customFields.“Functional Area - PCM”?.value?[0].value

and our sync worked ,but now the above line is throwing error

* * *

#### Comments:

> **SANDEEP ADE commented on 09 February 2022**
>
> > Even though i am copying the field name from the remote replica ,still its showing Null value.
> 
> Below is the remote replica
> 
> “Functional Area – PCM”: {  
> “id”: 15205,  
> “name”: “Functional Area - PCM”,  
> “uid”: “15205”,  
> “type”: “OPTION”,  
> “value”: {  
> “id”: “22009”,  
> “sequence”: 6,  
> “value”: “PCM”,  
> “disabled”: false,  
> “childOptions”:   
> }  
> }  
> },

> **Francis Martens (Exalate) commented on 09 February 2022**
>
> > SANDEEP ADE
> 
> What is the error thrown?

> **SANDEEP ADE commented on 09 February 2022**
>
> > I am getting “Cannot get property ‘value’ on null object”
> 
> But in the remote replica i am seeing the below
> 
> “Functional Area – PCM”: {  
> “id”: 15205,  
> “name”: “Functional Area - PCM”,  
> “uid”: “15205”,  
> “type”: “OPTION”,  
> “value”: {  
> “id”: “22009”,  
> “sequence”: 6,  
> “value”: “PCM”,  
> “disabled”: false,  
> “childOptions”:   
> }  
> }  
> },
> 
> I tried the below options but both are throwing error
> 
> defect.customFields.“BG\_USER\_02”.value = replica.customFields.“Functional Area - PCM”.value.value
> 
> defect.customFields.“BG\_USER\_02”.value = replica.customFields.“Functional Area - PCM”.value(0).value

> **Francis Martens (Exalate) commented on 09 February 2022**
>
> > Can it be that defect.customFields.“BG\_USER\_02” is null?

> **SANDEEP ADE commented on 09 February 2022**
>
> > i didn’t quite get what you said
> 
> BG\_USER\_02 is a field in ALM ,i am trying to populate the value “PCM” received from Functional Area – PCM from JIRA in BG\_USER\_02 which is ALM.
> 
> i have the code as below,
> 
> JIRA SENDING SIDE
> 
> replica.customFields."Functional Area – PCM”= issue.customFields.“Functional Area - PCM”
> 
> ALM INCOMING SIDE
> 
> defect.customFields.“BG\_USER\_02”.value = replica.customFields.“Functional Area - PCM”.value.value
> 
> and to confirm Functional Area - PCM is not Null because in the remote replica i am seeing value as PCM for this field
> 
> So not sure whats the issue

> **Francis Martens (Exalate) commented on 09 February 2022**
>
> > It can still be that the nullpointerexception is raised by
> 
> ```auto
> defect.customFields."BG_USER_02".value
> 
> ```
> 
> So the question - can you check what defect.customFields.“BG\_USER\_02” returns when doing
> 
> ```auto
> debug.error("defect.customFields.BG_USER_02 = ${defect.customFields."BG_USER_02".properties}")
> 
> ```

> **SANDEEP ADE commented on 09 February 2022**
>
> > javax.script.ScriptException: com.exalate.api.exception.IssueTrackerException: defect.customFields.BG\_USER\_02 = [value:null, type:STRING, class:class com.exalate.basic.domain.hubobject.v1.BasicHubCustomField, uid:BG\_USER\_02, id:null, locked:false, description:null, name:null]
> 
> i got this error

> **SANDEEP ADE commented on 09 February 2022**
>
> > Also i added below line
> 
> def remoteValue = replica.customFields.“Functional Area - PCM”.value.value to see the value on incoming remote field ,it gave error as Cannot get property ‘value’ on null object
> 
> but i see the value in remote replica
> 
> ```auto
> "Functional Area – PCM": {
> "id": 15205,
> "name": "Functional Area - PCM",
> "uid": "15205",
> "type": "OPTION",
> "value": {
> "id": "22009",
> "sequence": 6,
> "value": "PCM",
> "disabled": false,
> "childOptions": []
> }
> }
> 
> ```

> **SANDEEP ADE commented on 09 February 2022**
>
> > its resolved now
> 
> issue was the “-” symbol ,the field name is **Functional Area - PCM**
> 
> **and in script it was types as Functional Area – PCM**

---

<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:** [December 4, 2024, 9:39am UTC](https://community.exalate.com/t/unable-to-sync-jira-single-list-to-alm/5043/2 "2024-12-04T09:39:41Z")

</div>


