SIL - Create Issue with Cascading Select

Topher April 30, 2015

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

1 vote
Answer accepted
Alexandru Geageac
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.
May 13, 2015

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 

 

Topher May 14, 2015

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