template of swim lane and sub tasks

Hi,
Is there any way to create a template with one swim lane and 4-5 sub tasks so the team can use it to create their user stories and sub tasks. I have tried importing but didn't have luck importing sub tasks (cloning also didn't work) or is there any method.
example:
Template-1
{
Swim lane -1
sub task -a
sub task -b
}
if a user wants he/she will create a copy of the template-1 and change the Swim lane name.

Thanks,
vk
4 comments
Comment actions Permalink
You can create a simple workflow that creates subtasks on swimlane creation:
rule template 
 
when becomesReported() && Type == {Feature} { 
  var task1 = loggedInUser.createNewIssue(project.shortName); 
  task1.summary = "task A"; 
   
  var task2 = loggedInUser.createNewIssue(project.shortName); 
  task2.summary = "task B"; 
}
prettyPrint();
0
Comment actions Permalink
Thank you very much for the reply! 
I just added it to the workflow and tested, it is creating tasks but they are NOT sub tasks of the Swim lane -1. 
i have made an attempt with the following but looks like it is syntax error.
task1.subtask of = getId()

please let me know if there is a way to make it a subtask of the newly created parent.

thanks,
VK
0
Comment actions Permalink
i think i figured out the adding part to the swim lane.
task1.Priority = {Normal}; 
task1.Assignee = loggedInUser; 
 parent for.add(task1)
;

i tested it is working fine. 

task1.Estimation = 2 ;

it is not taking the estimates for some reason, otherthan it is looking very good. thanks alot! appreciate the help!
0
Comment actions Permalink
You're right, I've missed the parent for.add(task1) statement. Good luck!
0

Please sign in to leave a comment.