Create FollowUp WorkItem based on boolean value selection
Hi,
I have a requirement to create multiple chilled work item automatically for a task based on selecting Boolean value.
Ex : if i select 2 Boolean value like review & build for a task, 2 chilled task should be add to that task automatically with some pre define values.
Please suggest for best way to do this.
Thanks & Regards Sachin Nairy |
Accepted answer
Ralph Schoon (63.5k●3●36●46)
| answered Apr 03 '13, 9:03 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Thanks Eric!
To create a work item in a participant you can use code similar to // Create the work item IWorkItem newTargetWorkItem = fWorkItemServer .createWorkItem2(targetWorkItemType); // Set the summary XMLString targetSummary = triggerWorkItem.getHTMLSummary(); XMLString addition = XMLString.createFromPlainText(" [ " /* + targetEnumerationAttribute.getDisplayName() + " " */ + targetEnumerationLiteral.getName() + " ]"); XMLString newSummary = targetSummary.concat(addition); newTargetWorkItem.setHTMLSummary(XMLString.createFromXMLText(newSummary .getXMLText())); // Set the category same as the parent. ICategoryHandle category = triggerWorkItem.getCategory(); if (category != null) { newTargetWorkItem.setCategory(triggerWorkItem.getCategory()); } // Set Planned for same as the parent IIterationHandle iteration = triggerWorkItem.getTarget(); if (iteration != null) { newTargetWorkItem.setTarget(iteration); } IStatus status = fWorkItemServer.saveWorkItem3(newTargetWorkItem, null, null, null); if(status.isOK()) // we are good Then follow http://rsjazz.wordpress.com/2012/09/20/the-rtc-workitem-server-link-api-linking-to-work-items-and-other-elements/ how to create links to work items. With the references created and added to newWorkItemReferences use // Save the trigger work item with the links we created IStatus saveStatus = fWorkItemServer.saveWorkItem3(Item, newWorkItemReferences, null, null); to save the work item that needs the references added. Sachin Nairy selected this answer as the correct answer
|
One other answer
Hello,
I would start with the extension workshop https://jazz.net/library/article/1000
then read Ralph's blog - http://rsjazz.wordpress.com/2012/11/30/a-create-approval-work-item-save-participant/
and create a save participant that will check on the values of the booleans.
Hope it helps.
Eric.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.