Forums

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

Create a sub Task for an Issue?

Jamshaid
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.
November 18, 2020

I am working on issues in Jira and have to create a subTask using ScriptRunner grovvy script. I am not finding any helpful material. How can I produce a sub task using groovy script? Any codes or helpful material? Thanks

1 answer

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
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.
November 18, 2020

Have a look at https://library.adaptavist.com/search?term=sub-task (That's already a search for sub-task related scripts, there's plenty more in there if you do move beyond this one need)

Jamshaid
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.
November 19, 2020

Thanks for your response. Where do I find the imports for those codes? I copied the code from there and it gives a lot of errors as there are no import statements. How do I get those statements?

Kristian Walker _Adaptavist_
Community Champion
November 24, 2020

Hi Jamshaid,

If you are getting an error around imports then this means the code you are trying is from Jira Server and will not work in Jira Cloud as Jira Cloud only contains rest API's and not the Java API that the server version contains.

You will see an example here which shows how to create a subtask in Jira cloud via a script and this will be a good reference guide to help you create the script that you require. 

Regards,

Kristian

Like Nic Brough -Adaptavist- likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events