Set Multi-Level Cascading Select in JIRA Based on Fields in Zendesk

Originally asked by Spencer Johnson on 09 June 2020 (original question)


How do I set a Multi-level cascading select field on jira based on fields in zendesk (even if the zendesk field is broken out into multiple fields, ie one drop-down for each level)?


Answer by André Leroy-Beaulieu Castro on 12 June 2020

Hi Spencer,

After doing some testing with this plug-in myself I see that the way to send the information in your data filter should be the following (jira):

replica.customKeys."Location" = issue.customFields."Location"?.value?.value

what you are sending is a list of strings so in Zendesk you’re going to need to map that into a text field, that

s what I think would be the easiest option.

Let me know how this goes!

Thanks,

André


Comments:

Spencer Johnson commented on 10 June 2020

I am trying to figure out how jira sends the field from the local payload but there is an error and the local replica is empty currently

Spencer Johnson commented on 15 June 2020

It didn’t give an error but it didn’t work:

Here is the outgoing on the Jira side:

replica.customKeys."Location" = issue.customFields."Location"?.value?.value

Here is the incoming on the zendesk side:

if(replica.customFields.“Location”?.value){ // Works
issue.customFields.“Location”.value = replica.customFields.“Location”.value
}

On the zendesk side, Location in the remote replica comes in as

"customKeys": {
      "Location": [
        "Broadband",
        "AAFES",
        "AFMTHM Mountain Home AFB"
      ]
    },  
  
No location is shown on the local replica from the zendesk side
André Leroy-Beaulieu Castro commented on 15 June 2020

Hi Spencer,

The line on zendesk should be:

issue.customFields."Location"?.value = replica.customKeys."Location".join(",")

Thanks,

André

Spencer Johnson commented on 16 June 2020

That worked! Do you know how i would go from the other direction?

Ie setting the multilevel cascading select field in Jira from the zendesk side (even if its broken out in multiple fields in zendesk)?

Answer by Spencer Johnson on 17 June 2020

How would I go about the other direction? ie zendesk to Jira

Here is the set up on the zendesk outgoing:

replica.customFields."Location Part 1" = issue.customFields."Location Part 1" 
replica.customFields."Location Part 2" = issue.customFields."Location Part 2" 
replica.customFields."Location Part 3" = issue.customFields."Location Part 3"

On the jira incoming, I want to combine those into one and set “Location”
This is what I have currently but it isnt working

issue.customKeys."Location" = [replica.customFields."Location Part 1".value, replica.customFields."Location Part 2".value, replica.customFields."Location Part 3".value]

Comments:

Spencer Johnson commented on 07 July 2020

André Leroy-Beaulieu Castro I wanted to follow up on this

Spencer Johnson commented on 17 July 2020

I created this community question for the other direction:Set Multi-Level Cascading Select in JIRA Based on Field in Zendesk (old community)

Answer by André Leroy-Beaulieu Castro on 10 June 2020

Hi Spencer,

What error are you currently seeing? Is it in Jira or Zendesk? If you access the Entity Sync Status window in your Exalate app for Jira and look for the issue where you are trying this out, you can’t see the local replica?

Thanks,

André


Comments:

Spencer Johnson commented on 11 June 2020

Here is the error. It is on the JIRA side.

There is no “Entity Sync Status” in the exalate app in Jira or at least none that I could find.