Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create subtask on transition with SIL Scripts

Derek Imrie February 9, 2019

Hi,

 

Very new to JIRA and scripting as well.

I've a JIRA board that is very manual and trying to automate some tasks. 

Currently using JIRA cloud but can't use too many plugins like automation for JIRA due to our Infosec policy.

I've tried to setup a post function SIL script using following script.  Script loads and checks without error but Peer Review sub task is not created with I transition the parent issue.

Any pointers would be greatly appreciated.

string issue_project = project;
string issue_parent_key = key;
string issue_type = "Peer Review";
string issue_summary = "New subtask for " + key;
string issue_priority = "";
string issue_description = "";
string[] issue_components;
date issue_dueDate = currentDate() + "1d";
string issue_security_level;
string[] issue_fields_mapping;

string i = createIssue(issue_project, issue_parent_key, issue_type, issue_summary, issue_priority, issue_description,
issue_components, issue_dueDate, issue_security_level, issue_fields_mapping);

linkIssue(i, issue_parent_key, "Relates"); 

 

1 answer

1 accepted

1 vote
Answer accepted
Alexey Matveev
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.
February 9, 2019

Hello,

The things that would prevent that script from working are:
• Bad issue type name, name is case sensitive
• Project permissions
• Required fields on the create screen
The syntax is correct.

If you open a ticket in our support portal we can pull the logs  and see what’s going on.

Derek Imrie February 9, 2019

Hi thanks for the response.

I believe issue type is Peer-Review, Project permissions are any user can create an issue.  Finally I believe the only Mandatory field that I've set is Summary.

Derek Imrie February 9, 2019

Found issue. Set due date to null and now works!!

 

thanks for help

Alexey Matveev
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.
February 9, 2019

You are most welcome!

Like Derek Imrie likes this

Suggest an answer

Log in or Sign up to answer