SIL - Create Issue with Cascading Select

I have an SIL script that creates a new issue when a specific workflow option is selected. The script uses the createIssue function and sets the fields of the new issue using a string[] custom_fields_mapping. All the fields in the new issue get set correctly except those of type cascading select. For the cascading select only the first dropdown value gets carried over into the new issue and the atlassian logs throw the following error:

[commons.jira.utils.IssueUtils] Unknown issue field SecondValue. Skipping set field at creation.

Where SecondValue is whatever value was selected from the second dropdown. Is this a known bug with SIL and copying over cascading selects or is there another way I should be copying over those types of fields to retain both values from the cascading select?

1 answer

1 accepted

This widget could not be displayed.

Hello Christopher,
If I understood correctly your problem, the second value from the cascading select does not copy.

I've used a script like this and it works:

string projectKey = "PROJ";
string parentIssueKey = "";
string issueType = "Bug";
string issueSummary = "Test_copy_sil";
string k;
string[] cf = PROJ-1.customfield_10002;

k = createIssue(projectKey, parentIssueKey, issueType, issueSummary);
%k%.customfield_10002 = cf;

Best regards,

Alex 

 

Hi Alexandru, Thanks for the response. This works if I set the cascading select fields after createIssue. I have updated my scripts and it is working now. Originally I was setting all fields in the string[] which contained every field I wanted to copy over including cascading select fields. I then created the new issue using: createIssue("projectKey", "", "issueType", summary, issue_priority, description, {}, "", "", issue_security_level, custom_fields_mapping); Doing it that way was only copying the first dropdown for cascading selects when adding them to custom_fields_mapping, but directly setting the field after createIssue works just fine.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

128 views 2 0
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