Create sub-tasks on transition between workflow steps
| Name | Create Sub-Task on transition |
| Version | 1.2.1 |
| Author | Amit Khullar & Samuel John |
| Download | v1.2.1 for Jira 3.11 |
| Source | Source v1.2.1 |
Description and features
This post function let you create sub-task on a transition. You can either assign it to the parent issue's assignee or to the reporter. You may also choose which sub-task type it should be.
Please find the attached updated.jar file for 3.11 version which has the following functionality
1: Inherit Parent's priority to the Subtask
2: You can add Parents Summary + Key Id in the subtask Summary to relate the subtasks with Parent, eg. If I a do create an analyze sub task for my parent task i can put it as Analyze%.Key%.summary% so when the sub task is generated it will be Analyze -TEST-1201-This is a test main task.
Installation
- Download the zipped file. Unzip and place the jar file in the target directory in your webapp's lib folder
- Restart JIRA
- Add the post function to your workflow step(s)
Source code
Source code is available in the src\java directory. Please have fun and let me know if you find it useful.

Comments (94)
Dec 02, 2005
Norman Wayne Naccari says:
I did all of the above and tried it out. No subtask was created. Do ...I did all of the above and tried it out. No sub-task was created. Do I have to tailor the JAVA source in some way and rebuild the JAR.
Dec 05, 2005
Jonathan Nolen says:
If no one objects, I would like to move this plugin into the Plugin Library. JIR...If no one objects, I would like to move this plugin into the Plugin Library.
Jan 05, 2006
Brian Sensale says:
I've adapted this code for the latest Jira release, and am having a massive prob...I've adapted this code for the latest Jira release, and am having a massive problem. It appears that this plugin will not work on the Create Issue transition. I'm able to get a handle to the issue as an Issue, and create the new subtask from the fields, but when I try to call subTaskManager.createSubTaskIssueLink(), I'm having problems. Specifically, it appears that because I'm in the Create Issue transition, issue.getGenericValue() is returning null on the original issue, which means while I can create the SubTasks, I cannot create the SubTask link. Does anyone have any idea how I can go about doing this?
Apr 10, 2006
JitSiong Koh says:
Im not sure if this is relevant to you but you have to move the subtaskcreationP...Im not sure if this is relevant to you but you have to move the subtask-creation-Post function's position down after you added the function. simply bcos you have to create the issue before you add the sub tasks
Mar 07, 2006
. says:
The instructions must be missing a step somewhere, as I get the same result as N...The instructions must be missing a step somewhere, as I get the same result as Norman. The screen to add it to the workflow transition is there, but once the workflow is in place, it doesn't do anything. No sub-task creation.
Mar 13, 2006
Bernie Gu says:
Thanks for sharing this plugins. To make it workable in JIRA3.5.x, I did some mi...Thanks for sharing this plugins.
To make it workable in JIRA3.5.x, I did some midifications.
In the CreateSubIssueFunction.java,
GenericValue issue = (GenericValue) transientVars.get("issue");
--> Issue subIssue = (Issue) transientVars.get("issue");
Also you need to add a IssueImpl into the fields. Add myIssue.setProject(subIssue.getProject());.....and so on.
The API document of SimpleWorkflowManager.java is not correct because the "fields" parameter createIssue method only need issue(projectId and other keys are not necessary).
Finally, it can work.
Mar 16, 2006
Shaimaa Elk says:
I followed all the instructions, but i do not see this plugin under Jira plugins...I followed all the instructions, but i do not see this plugin under Jira plugins when I go in Jira Adminstration. I also do not see the post function available. I'm using Jira 3.5, any idea abut what I need to do to get it to work
Jun 13, 2006
Ville Jyrkkä says:
I have tried this on Jira 3.6 but it won't appear under Jira plugins. :( Can so...I have tried this on Jira 3.6 but it won't appear under Jira plugins.
Can somebody help me?
Jul 30, 2006
Justin Koke says:
Hi, It actually appears under "Cliqr Plugins" (so it may not appear where you t...Hi,
It actually appears under "Cliqr Plugins" (so it may not appear where you think), this is because it was initially developed by Paul.
Regards,
Justin
Aug 01, 2006
Ville Jyrkkä says:
Do I need to do something to jar file? I followed the instructions and put the j...Do I need to do something to jar file?
I followed the instructions and put the jar file in the lib folder, restarted JIRA but it won't appear to plugins in Jira Administration.
This is first time I install plugin. What I might have done wrong?
Aug 15, 2006
Ville Jyrkkä says:
Hi, Will this plugin work in Jira 3.6? I added it, but no subtasks were created...Hi,
Will this plugin work in Jira 3.6? I added it, but no sub-tasks were created in the transition.
Do I need to do something to the plugin?
Is that 1.1 version of this plugin correct?
Aug 15, 2006
Ville Jyrkkä says:
I had post functions before the issue creation. Now it works! Thanx, great plugi...I had post functions before the issue creation. Now it works! Thanx, great plugin.
Sep 01, 2006
Justin Shapiro says:
Need ideas on two issues: 1. I want to prevent the function from creating a sub...Need ideas on two issues:
1. I want to prevent the function from creating a subtask if it already created one. My workflows can, on occasion, re-run a step and I don't want to create the subtask the second time through.
2. I need another idea for the "create loop" because I want subtasks to be able to spawn siblings.
Sep 04, 2006
Bhavin Turakhia says:
I followed the instructions for installation and configured a post function in m...I followed the instructions for installation and configured a post function in my workflow. but i get the following error in my log file -
Oct 05, 2006
Otto Chrons says:
A nice feature would be use information from the "parent" issue in the name of t...A nice feature would be use information from the "parent" issue in the name of the sub-task. For example use the "Summary" from parent issue as part of the name for the sub-task. Something like:
Sub-task Overview: $parent.summary - Accounting
When creating similar sub-tasks for different issues, this would automate the naming of them.
Oct 26, 2006
Peter Slade says:
This is a great plugin. I need to automatically create a subtask and assign it t...This is a great plugin. I need to automatically create a sub-task and assign it to someone other than the options provided (Parent issue's reporter and Parent issues assignee). Is there any way to change the Sub-Task Assignee so that I can point it at a particular user?
Thanks!
Oct 12, 2007
mameha says:
I had the same problem and found a nice way to solve. In the parent issue workfl...I had the same problem and found a nice way to solve.
In the parent issue workflow, when you change status from A to B, add a post function that changes the assignee of the parent issue. You may need a plugin for that, I cant remember. Then, create the subtask while the issue is assigned to UserX. Then, reassigne the parent back to original assignee (perhaps using components so you can choose 'automatic').
Dec 21, 2006
Bettina Zucker says:
Hello all, I'm trying to get this working with 3.7. I managed but I had to chang...Hello all,
I'm trying to get this working with 3.7.
I managed but I had to change the last function in the code by adding two parameters, the first one and the last one:
Of course the function call must be changed too:
And the attachmentManager must be added to the definitions:
Not to mention the imports:
import com.atlassian.jira.issue.AttachmentManager;With these small modifications the plugin compiled with the jira-development-kit-3.7-beta2 and was able to run with Jira 3.7 and actually to produce a subtask on a wf transition.
Cheers!
Bettina
Jan 11, 2007
Dharmendra Varma says:
Hello Bettina, Can you post the jar file so that I can use it with v3.7Hello Bettina,
Can you post the jar file so that I can use it with v3.7
Jan 18, 2007
Dharmendra Varma says:
Hello Bettina, Can you please provide teh .jar file as I am a user and do not kn...Hello Bettina,
Can you please provide teh .jar file as I am a user and do not know how to compile .jar file.
Dharmendra
Jan 24, 2007
Bettina Zucker says:
Hello, since there were some requests, I attached my .jar with the update for 3....Hello,
since there were some requests, I attached my .jar with the update for 3.7.
I had to rebuild it but could not test it, so please test it yourself.
Cheers
Bettina
Jan 24, 2007
Bhavin Turakhia says:
there is an error with it. i get the follwing under my plugins section Create ...there is an error with it. i get the follwing under my plugins section -
Create sub-task on transition (createsubissue-function)
Creates a sub-task on transition between two workflow steps.
Error: There was a problem loading the descriptor for module 'workflow-function' in plugin 'Cliqr Plugins'. Could not load class: com.telenor.jira.plugin.workflow.createsubissue.CreateSubIssueFunctionPluginFactory
Jan 24, 2007
Bettina Zucker says:
Hello, I just uploaded the correction. Please let me know if it works now. Cheer...Hello,
I just uploaded the correction. Please let me know if it works now.
Cheers
Bettina
Jan 24, 2007
Bhavin Turakhia says:
this works :) thanks a millionthis works
thanks a million
Jan 30, 2007
Jean-Baptiste Catté says:
Hello Bettina, Could you upload the source code too?Hello Bettina,
Could you upload the source code too?
Feb 01, 2007
Dharmendra Varma says:
Hello Bettina, I tried this in v3.7.2, but no sub task gets created. This ...Hello Bettina,
I tried this in v3.7.2, but no sub task gets created. This is where i created the post function. let me know if i am doing anything wrong.
Feb 13, 2007
Bettina Zucker says:
Hello, I described the changes i made to the source code in my posting on the 21...Hello,
I described the changes i made to the source code in my posting on the 21st of december 2006 above.
I think this is enough detail if you are working on the source.
For those who are not developing and just need the .jar, I uploaded mine to the attachments of this page.
I'm not going to upload my complete package as source code, because I have no intention to kidnap this package, neither to support it. Please ask the authors.
Cheers
Bettina
Mar 15, 2007
Linda Grisanti says:
This plugin, which was working wonderfully in v3.6.5 doesn't seem to work in v3....This plugin, which was working wonderfully in v3.6.5 doesn't seem to work in v3.8. Any assistance or comments are very much appreciated. Thanks.
Apr 26, 2007
Paul Rene Jørgensen says:
Just uploaded an updated version for Jira 3.8.Just uploaded an updated version for Jira 3.8.
May 08, 2007
Irina Zarkhina says:
Hi, Paul: I used this plagin a while ago, when I worked with Jira3.6, now I have...Hi, Paul:
I used this plagin a while ago, when I worked with Jira3.6, now I have Jira 3.8, so I download your attachment to my C:\Program Files\JIRA-Enterprise-3.8.1\atlassian-jira\WEB-INF\lib dir, followed all your instructions and I don't see "Create subtasks on transition" among Postfunctions.
Any ideas?
Thanks, Irina
May 22, 2007
Paul Rene Jørgensen says:
Do you see any errors in your log file?Do you see any errors in your log file?
May 22, 2007
Irina Zarkhina says:
No, I don't see any Errors, I'm thinking of upgrading to 3.9, would it work?\\ T...No, I don't see any Errors, I'm thinking of upgrading to 3.9, would it work?
Thank you, Irina
May 23, 2007
nataliab says:
Hello\! Thanks for the plugin for the version 3.8 \! I am trying to customise it...Hello!
Thanks for the plugin for the version 3.8 ! I am trying to customise it ( assign to other than parent or reporter) and i would like to have the source code.
Is that possible? Could you attach it?
Thanks!
Jun 29, 2007
Roberto Cosenza says:
Yes, the source code for the 3.8 would be niceYes, the source code for the 3.8 would be nice
Jul 31, 2007
Jaskaran Singh says:
I have this excellent plugin working on 3.9.1; can i get the source code. Need t...I have this excellent plugin working on 3.9.1; can i get the source code. Need to modify it little to add the parent's summary in the subtaks created with some modification.
thanks
Aug 29, 2007
David Papish says:
Hi Jaskaran, i was wondering if u were able to get the source code for the lates...Hi Jaskaran, i was wondering if u were able to get the source code for the latest jar and if u were able to add the modification that u mention u need. Did it work for u fine? I need to add the same modification and was trying to get the source code and i don t se it attached anywhere. Thanks a lot.
Oct 12, 2007
mameha says:
Me too. I think this is a really important feature can anyone upload their...Me too. I think this is a really important feature - can anyone upload their version or the developer add this function? =)
Aug 08, 2007
Andrey Mikulov says:
Some additions (check and bug fix) in version 1.2 for JIRA 3....Some additions (check and bug fix) in version 1.2 for JIRA 3.8 and above required:
- check for parent issue is subtask (or subtask with same workflow for detect recursive creating if multi level subtasks "hacked")
- very required add link to parent issue on creating like this: issueObject.setParentId(parentIssue.getId());
I modify code for 3.10 and add setParentId, because some my custom functions in create subtask workflow not working without parent Issue (copy some fields from parent Issue), but waiting "official" version with bug fix
Aug 30, 2007
Yancy Way says:
I'll second the check on parent issue, as a recursive loop will occur if this ac...I'll second the check on parent issue, as a recursive loop will occur if this action is added to the Create step of the workflow. I had created about 400 duplicate tickets before I realized I s