The most recomended way to open tasks when story status is changed in RTC
Accepted answer
If you try to say you want to create child work items, you can do that.
Option 1: Create a work item template and create the work item with sub tasks using the template.
Option 2: Create a custom follow up action/participant on the work item save(server) operation. Start there: https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ the Extensions Workshop provides you with the general information.
To create work items in a participant:
Option 1: Create a work item template and create the work item with sub tasks using the template.
Option 2: Create a custom follow up action/participant on the work item save(server) operation. Start there: https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ the Extensions Workshop provides you with the general information.
To create work items in a participant:
IWorkItem phaseWorkItem = fWorkItemServer.createWorkItem2(type); // Set th attributes required for save XMLString targetSummary = thisItem.getHTMLSummary(); XMLString addition = XMLString.createFromPlainText(" [ some info ]"); XMLString newSummary = targetSummary.concat(addition); phaseWorkItem.setHTMLSummary(XMLString.createFromXMLText(newSummary .getXMLText())); ICategoryHandle category = thisItem.getCategory(); if (category != null) { phaseWorkItem.setCategory(thisItem.getCategory()); } IIterationHandle iteration = thisItem.getTarget(); if (iteration != null) { phaseWorkItem.setTarget(iteration); } if (null != phaseType) { phaseWorkItem.setValue(phaseAttribute,phaseLiteral.getIdentifier2() ); } // IWorkflowInfo workflow = // fWorkItemCommon.findWorkflowInfo(phaseWorkItem, monitor); SetOnce they are created, you can link them.additionalParams = new HashSet (); additionalParams.add("some info to prevent recursion"); fWorkItemServer.saveWorkItem3(phaseWorkItem, null, null, additionalParams);
Comments
Hi ,
If i'll want to to open different tasks depending on the values of the story , will this solution fit ?
BR,
Chen
If you create a participant, you have the whole API to play with. So, yes.
but there is nothing out of the box that does this.. As Ralph mentions you will have to create a sever side extension.
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 02 '15, 4:22 a.m.What do you expect? And where to open them? What do you want to achieve?
Chen Ben ezra
Nov 02 '15, 4:56 a.m.I expect to open new tasks when i change the status of a story to "ready for development".