Could not create issue correctly with "Cascading Select"

Hi, I am writing a plugin to copy issue from project of one JIRA instance to another. But there is a problem when create the issue on the remote JIRA instance.

The problem is that if the local issue contains a custom field of cascading select type, which means the values of this field may like this: parent option + first level option + second level option + ..., the remote created issue could not be created correctly.

As I known that the way to create an issue could use "IssueInputParametersImpl". Firstly, test the values of field of cascading select if the options are valid in the remote JIRA project, then populate the option IDs into the Input Parameters. This works well for other field types such as multi-select and some single value fields. But for the cascading select, I have tried to populate the option IDs into the InputParameters using this function:

addCustomFieldValue(Long customFieldId, String... values)

, it not worked well and only the parent option can be saved.

So my question is: is there a way to create issue with "Cascading Select CustomField" by using the IssueInputParametersImpl. If not, how to add cascading select values to an existing issue if I have got the issue, the customFieldID, the option IDs.

1 answer

0 vote
Eddie Webb Community Champion Feb 28, 2014

Updating cascading selects is not as simple as regular fields. You need a few intermediate objects.

CustomFieldValue parentValue=new CustomFieldValue("customfield_10010",null,new String[]{"10600"});
CustomFieldValue childValue=new CustomFieldValue("customfield_10010",1,new String[]{"10601"});

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,321 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot