Automatically creates subtasks/subissue when a specific issue is created

Patrick Escher July 28, 2011

Hi All,

We are planning to use Jira for our complete development process and not only for issue/task tracking. This would require that we create structured jira issues.

I am looking for a functionality which does the following:

Once the user creates an issues for tracking a new feature, predefined subtasks and/or subissues are created and linked to the parent task.

Our structure might look like this

Feature

- Implementation Task

- create jUnits Task

- Knowledge Transfer Task

- create Testcases Task

-etc.etc

if somebody has an idea on how to do this automatically or knows a plugin or has an better idea to do such a Feature planning/tracking, please let me know

THanks in advance,

Patrick

2 answers

1 accepted

2 votes
Answer accepted
Betsy Walker
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.
July 28, 2011

There are a lot of Groovy scripts posted in the previous forums to do this, but the easiest way is to use the Script Runner built-in script called "Create a sub-task". You'd invoke this as a post-function in the appropriate workflow transition.

Patrick Escher July 28, 2011

Thanks,

seems that this is what we are looking for, need to dig into this scripting though

Patrick

JamieA
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.
September 3, 2011

Almost no coding should be necessary.

Patrick Escher September 3, 2011

BetsyW & Jamie,

we are trying to set the summary of created subtask to be the summary of the original issue (the parent) plus some additional test.

We tried to add some ccode to the field "Additional issue actions):

issue.summary = originalIssue.summary + 'Create Feature Fact Sheet'

This fails with some errors, it seems that originalIssue is null.

Can you let me know how I can access the parent issue when e.g. creating a subtask?

Thanks

JamieA
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.
September 4, 2011

The summary will be set to the parent's summary by default, so you can do:

issue.summary = issue.summary + " Create Feature Fact Sheet"

Patrick Escher September 5, 2011

Jamie,

that works as you described. But is there a possibility to still access the parent issue somehow. We want to pull out information from parent issue fileds and want to add (or combine them) them to other fields of the newly created subtask.

JamieA
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.
September 5, 2011

All of the applicable custom fields are also copied over by default, however the original issue is available in "transientVars.originalissueobject". I meant to make this easier but somehow I didn't.

Patrick Escher September 6, 2011

Thanks Jamie,

that`s it!!

btw, great plugin, helps a lot to setup our processes

Patrick

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
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.
September 3, 2011

We use a customized version of https://studio.plugins.atlassian.com/wiki/display/CSOT/Jira+Create+Subtask+for+transition. This has proved to be quite flexible and handy.

Edit: Now shipped as JIRA Create on Transition Plugin

Patrick Escher September 3, 2011

Hello Bob, we are using Jira 4.3.x, so CSOT seems not to work

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
September 9, 2011

I will look into posting an update that works for 4.2/4.3/4.4.

Bob Swift OSS (Bob Swift Atlassian Apps)
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 17, 2012

Updated plugin now referenced in the answer.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events