It's all about the answers!

Ask a question

The most recomended way to open tasks when story status is changed in RTC


Chen Ben ezra (41327) | asked Nov 01 '15, 8:21 a.m.

 Hi , 

What is the most recommended way to open tasks automatically when story status is changed in RTC ? 

BR,
Chen

Comments
Ralph Schoon commented Nov 02 '15, 4:22 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

What do you expect? And where to open them? What do you want to achieve?


Chen Ben ezra commented Nov 02 '15, 4:43 a.m. | edited Nov 02 '15, 4:56 a.m.
Hi, 

I expect to open new tasks when i change the status of a story to "ready for development".

At first for example to open new tasks:
1. Estimate the story effort
2. Update each department about the new story 
I want to open them under the story (as their children).
I want to save time for the project management and to open all the basic tasks for each story automatically. 

BR,
Chen
 
 

Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered Nov 02 '15, 5:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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:

		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.
Chen Ben ezra selected this answer as the correct answer

Comments
Chen Ben ezra commented Nov 02 '15, 6:56 a.m. | edited Nov 02 '15, 7:02 a.m.
Hi , 

If i'll want to to open different tasks depending on the values of the story , will this solution fit ? 


BR,
Chen


Ralph Schoon commented Nov 02 '15, 7:03 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

If you create a participant, you have the whole API to play with. So, yes.


sam detweiler commented Nov 02 '15, 1:55 p.m. | edited Nov 02 '15, 2:11 p.m.

but there is nothing out of the box that does this.. As Ralph mentions you will have to create a sever side extension.

Your answer


Register or to post 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.