Jira transition script to create multiple subtasks

Khanh Nguyen
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.
May 20, 2012

Fairly new to Jira and looking for guidance and samples on how to accomplish the following:

In the 'parent' issue, I have a multiuser picker custom field. . .

Parent Issue = ISSUE1

Assisting participants = partuser1, partuser2, partuser3

In a transition step (post function) in the workflow, I would like to call a script that would iterate through the Assisting participants field and create a subtask for every Assisting participant identified in that custome field.

Subtask = ISSUE2

Assignee = partuser1

Subtask = ISSUE3

Assignee = partuser2

Subtask = ISSUE4

Assignee = partuser3

These subtasks will also carry forward some other fields from the parent issues as well.

We know that this can be done in an external process but it would be much cleaner if this can be done as part of the transition process in the workflow.

Any sample scripts or advice will be appreciated. Thanks!

3 answers

1 accepted

2 votes
Answer accepted
Dieter
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.
May 20, 2012
Ramiro Pointis
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.
May 20, 2012

That question has every step of the exact question! Good one

Khanh Nguyen
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.
May 21, 2012

Thanks a ton! This will definitely put us on the right track.

0 votes
Asya Shvets August 26, 2014

There is a new add-on Create Multiple Issues on Transition. It helps creating issues and assign them simultaneously https://marketplace.atlassian.com/plugins/com.sentinel.jira.plugin.jira-create-tasks-on-transition-plugin

0 votes
Ramiro Pointis
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.
May 20, 2012

Hi,

You could use the Script Runner plugin to achieve this easily. With this you only have to specify the fields for the new Sub-Task. But I'm not aware of what code you could use. In this I think @Jamie (the plugin owner) would be very helpful. People contact him here (If he doesn't appear on this question)

Suggest an answer

Log in or Sign up to answer