Answer by M. Ashar Iqbal on 07 July 2022
Hi Moogambigai G R ,
Could you please try the getOption method, and let me know if it does not comply with your requirement?
Thank you,
Ashar
Comments:
Moogambigai G R commented on 11 July 2022
Hi M. Ashar Iqbal
I have tried with getoption, its throwing error and its a multi select type field.
Requirement is if the values matches both side, it should sync that value, if not default values should sync.
Attached support zip. exalate_support_5.3.1-j8_8.20.6_20220711-025716.zip (old community)
Regards,
Moogambigai
Moogambigai G R commented on 13 July 2022
Hi Ashar,
Is there any update?
Regards,
Moogambigai
Moogambigai G R commented on 14 July 2022
Hi Ashar,
Is there any update on my above comment?
Regards,
Moogambigai
Ariel Aguilar commented on 14 July 2022
Hi Moogambigai,
You can try something like in the following example:
issue.customFields."A".value = replica.customFields."B".value ?: "Default Value"
Kind regards,
Ariel
Moogambigai G R commented on 15 July 2022
Hi Ariel Aguilar
Thanks for the update. Please find below are the results i’m getting,
Local connection:
outgoing:
replica.customFields.“10134” = issue.customFields.“10134” //Affected Programs // OEM Affected Programs
Incoming:
issue.customFields.“17401”.value = replica.customFields.“10134”.value ?: “Alexandra”
10134 -Project A multiselect type field
17401 -Project B multiselect type field
Scenario 1:
Same values available in both side:
Here I have selected “carroll,canayon” in 10134 field and synced the record and values are synced perfectly
Scenario 2:
One value has available in both side, one non-value selected:
Selected Brilliance,Carroll in 10134 field and synced the record, its emptied the field in destination records and not setting default value as “Alxendra”
Scenario 3:
Non-matched values selected:
Selected Brilliance in 10134 field and synced the record, its emptied the field in destination records and not setting default value as “Alxendra”
Moogambigai G R commented on 18 July 2022
Hi Ariel Aguilar
Is there any update on my last comment?
Regards,
Moogambigai
Ariel Aguilar commented on 18 July 2022
Hi there,
If you try:
issue.customFields."17401".value = replica.customFields."10134".value ?: ["Alexandra"]
Kind regards,
Ariel
Moogambigai G R commented on 19 July 2022
Hi Ariel Aguilar
Thanks for the update, I have tried above method, still no luck.
Both side same values is there only its sync, if values didn’t match its cleared the existing value and not setting default value.
See the below history images both local and remote issues.
Regards,
Moogambigai
Moogambigai G R commented on 20 July 2022
Hi Ariel Aguilar
Is there any update on my last comment?
Regards,
Moogambigai
Ariel Aguilar commented on 20 July 2022
Hi there,
And if you do:
issue.customFields.``"17401"``.value = replica.customFields.``"10134"?``.value ?: [``"Alexandra"``]
Kind regards,
Ariel
Moogambigai G R commented on 21 July 2022
Hi Ariel Aguilar
I have tried below one also and tried to replaced the field name instead of custom id. Nothing working.
issue.customFields.``"17401"``.value = replica.customFields.``"10134"?``.value ?: [``"Alexandra"``]
Regards,
Moogambigai
Ariel Aguilar commented on 21 July 2022
This is not expected, if you try the following:
def defaultOption = nodeHelper.getOptions(issue, "17401L", ["Alexandra"])
issue.customFields."17401".value = replica.customFields."10134"?.value ?: defaultOption
Kind regards,
Ariel
Moogambigai G R commented on 22 July 2022
Hi Ariel Aguilar
I have tried above method also, but result is same, if values is not matched in local side, its not setting default value, its setting null.
If its possible, can we setup a meeting to resolve this issue.
Regards,
Moogambigai G R
Ariel Aguilar commented on 22 July 2022
Hi Moogambigai,
Please submit a support request to our Service Desk directly to investigate for a possible bug.
Or just send an e-mail to support@exalate.com. This will create an issue on our JIRA Service Desk allowing for further tracking.
Kind regards,
Ariel