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
TAGS
atlassian, jira service management, jsm webinar, ai in jsm, opsgenie integration, incident management, virtual agent, atlassian intelligence, ai-powered service desk, it operations, atlassian learning, service management webinar, team '25 recap

What’s new in Jira Service Management 🤔

Discover how Atlassian is revolutionizing service management with cutting-edge solutions for AI-powered support, HR Service Management, or DevOps connectivity.

Register here ⬇️
AUG Leaders

Atlassian Community Events