Originally asked by Pablo Serra on 13 July 2021 (original question)
Hello,
I have a single selection list on Zendesk and I want to synchronize it against a multiple selection list on Jira. On Zendesk my options have this form: data A - data B. On Jira the parent list has data A and the child list data B. Is this sync possible?
Regards,
Pablo
Comments:
Ariel Aguilar commented on 14 July 2021
Hi Pablo,
One question, when you say a single selection list on Zendesk, could you confirm if it’s a Ticket or User Field. Are you referring to Dropdown select or Multiselect, I was unable to find this “Single Select List” type and also for Jira could you confirm the field type is Select List (multiple choices)?
Kind regards,
Ariel
Pablo Serra commented on 14 July 2021
Hi Ariel,
on Zendesk it’s a User Field, dropdown select. On Jira, the field type is Select List (multiple choices).
Thanks for your interest!
Regards,
Pablo
Daniel Carvajal commented on 15 July 2021
Hi Pablo
This is an advanced configuration not natively supported on the entities and fields for Zendesk, (https://docs.idalko.com/exalate/x/oAjuAg) therefore it could only be accomplished using the httpClient rest call.
That being said, we came up with the following setup:
Zendesk outgoing:
if (issue.assignee){
replica."Dropdown1" = httpClient.get("/api/v2/users/${issue.assignee.key}")?.user?.user_fields?.userfielddropdown
}
Notes: “Dropdown1” refers to the property where the value is being sent
The API call is requested through httpClient.get, you can refer to the Zendesk documentation for more information: (https://developer.zendesk.com/api-reference/ticketing/users/users/#show-user)
Jira incoming:
def mapping = [
"dropdown option 1":"multiselect option a",
"dropdown option 2":"multiselect option b"
]
issue."MultiSelect Test" = [mapping[replica.Dropdown1]]
The mapping above describes how each option related to the destination side option (dropdown : multiselect), then the value is assigned to the MultiSelect field created for this purpose(MultiSelect Test).
Cheers,
Daniel