Importing Cascading Selects with JSON Importer

EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2013

Firstly this is not the same as the rest endpoint, so please don't link to that documentation, the provided format does *not* work with the JIM JSON importer.

I have actually been able to successfully import the first value, but not the child. And it also forces garbage values to be created.

Successfully Setting Parent Value

Using Values Fails

Using the FieldName test value works, but when using the value name by text, you get an error (if that value was already defined in the select).

"customFieldValues":[

{

"fieldName":"Competency Area",

"fieldType":"com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect",

"value":"ITOPS"

}

]

,

An error occurred while attempting to import value 'ITOPS' into the Custom Field 'Competency Area'.

And the ticket does not contain the value.

Using IDs works, with a twist

But if you use the ID of the value, it first creats that (bogus) value in the list, but then seems to look up the right value for the ticket.

"customFieldValues":[

{

"fieldName":"Competency Area",

"fieldType":"com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect",

"value":["11058"]

}

]

,


The ticket gets assigned proper value

But a new bogus value is created in parent list

Setting the Child Value (failed attempts)

So I can deal with the cleanup to go through and remove the bougs list values. But I have tried many attempts to get the child value without much luck.

Total failures

"customFieldValues":[

{

"fieldName":"Competency Area",

"fieldType":"com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect",

"value":[{"value":"11058","child":"11065"}]

}

]

,

"customFieldValues":[

{

"fieldName":"Competency Area",

"fieldType":"com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect",

"value": {"value":"11058","child":{"value":"11065"}}

}

]

,

"customFieldValues":[

{

"fieldName":"Competency Area",

"fieldType":"com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect",

"value": [{"value":"11058"},{"value":"11065"}]

}

]

,

Soft Failures (first value added, second ignored)

"customFieldValues":[

{

"fieldName":"Competency Area",

"fieldType":"com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect",

"value":["11058","11065"]

}

]

,

"customFieldValues":[

{

"fieldName":"Competency Area",

"fieldType":"com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect",

"value": ["11058",{"child":"11065"}]

}

]

,

Anyone successfully done this from the JSON importer?

1 answer

1 accepted

0 votes
Answer accepted
EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2014

Support pointed me to https://ecosystem.atlassian.net/browse/JIM-787, which is not specific to cascading selects, but supporting all types in general.

currently you cannot import Child values to the Cascading Select field.
We are aware of that and this this one of key features that we would like to fix in the upcoming JIM v6.1.0 (JIM-787).

Just an update, the ticket is marked resolved for release 6.1.0 of the JIM plugin, and the author of the fix noted the format for cascading select list JSON imports,

{
    "fieldName": "Select List (cascading)",
    "fieldType": "com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect",
    "value":
    {
    	"": "Parent Value",
    	"1": "Child Value"
    }
}

Suggest an answer

Log in or Sign up to answer