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);
Set additionalParams = new HashSet();
additionalParams.add("some info to prevent recursion");
fWorkItemServer.saveWorkItem3(phaseWorkItem, null, null,
additionalParams);
Once they are created, you can link them.
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 02 '15, 4:22 a.m.Chen Ben ezra
Nov 02 '15, 4:56 a.m.