The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe
1
0
-1
1 answer
- 10-1
What is the result of
nodeHelper.getOption(issue, "Category/Subcategory", replica.subcategory)
- Francis Martens (Exalate)
Can you check the value of replica.subcategory and look it up in the option list .
(Make sure there are spaces or other tricks which make it hard for the exalate to find the value) - Karen Jennings
When I use debug.info("replica.subcategory is ${replica.subcategory}") I get the the following:
[replica.subcategory is Decommission]
The available values on each side match. These were copied from ServiceNow into Jira when we set up this field. I verified there are no trailing spaces for any of the values on each side.
ServiceNow options:
Jira options:
When I look at the payload from ServiceNow it shows this:
"category": "Network", "subcategory": "Decommission",
When I look at the Jira payload it shows this:"Category/Subcategory": { "id": 10036, "name": "Category/Subcategory", "uid": "10036", "type": "CASCADING_SELECT", "value": { "parent": { "id": "10024", "value": "Network" } } },
Is there something else I can check for the options? - Karen Jennings
That worked!
It looked like this for Jira Incoming:
def parentcat = nodeHelper.getOption(issue, "Category/Subcategory", replica.category)
issue.customFields."Category/Subcategory".value = nodeHelper.getCascadingSelect(
parentcat,
parentcat.childOptions.find{it.value == replica.subcategory}
)Thank you so much!
CommentAdd your comment...
Overview
Content Tools
search
attachments
weblink
advanced
I have 2 select fields in ServiceNow that I need to populate a cascading list in Jira Cloud. I can get the parent value populated but I cannot get the child value to populate.
ServiceNow outgoing sync:
replica.category = entity.category
replica.subcategory = entity.u_subcategory
Jira Cloud incoming sync
issue.customFields."Category/Subcategory".value = nodeHelper.getCascadingSelect(
nodeHelper.getOption(issue, "Category/Subcategory", replica.category),
nodeHelper.getOption(issue, "Category/Subcategory", replica.subcategory)
)
ServiceNow is sending the info because when I use debug.info("replica.subcategory is ${replica.subcategory}") I get the the following:
[replica.subcategory is Decommission]
This works the other way. I can get the cascading list to populate 2 separate fields in ServiceNow
Jira outgoing sync
replica.customFields."Category/Subcategory" = issue.customFields."Category/Subcategory"
ServiceNow incoming sync
//Category
entity.category= replica.customFields."Category/Subcategory"?.value?.parent?.value
//Subcategory
entity.u_subcategory = replica.customFields."Category/Subcategory"?.value?.child?.value