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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

Meet the AUG leaders of Northern Virginia

@Rachel Wright (Jira Genie), @Billy Poggi (AUG NOVA, DC), and @Dana Jansen (Confluence Queen) are just some of the folks that lead one of the world's most active Atlassian User Group (AUG)....

135 views 5 9
Read article

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