Forums

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

How to create number of sub-tasks with estimations based on query using ScriptRunner

Kaushik Patel April 16, 2020 edited

I want to create # of sub-tasks using ScriptRunner query.

E.g. we got 150 Hrs of Estimation and want to create 5 sub-tasks of 30 Hrs estimation each with same title for each sub-task getting created.

This will solve a big administrative time as right now, we have to create this manually.

The user will input following in query

Parent task ID

# of sub-tasks needed

Estimation Hrs for each sub-task (will be same)

type of sub-tasks

Basis on above inputs, query would create the sub-tasks.

 

1 answer

0 votes
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.
April 16, 2020

The basic "create sub-task" as a one-off can be taken from https://library.adaptavist.com/entity/create-a-sub-task-and-link-to-parent-issue-in-jira - you'll want to embed the "create" in the a loop read from the "# of sub-tasks needed"

For the estimate, from memory, you can use setOriginalEstimate ( <number of milliseconds> ) alongside the other fields you are setting.

Suggest an answer

Log in or Sign up to answer