Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

automatic status update for the work item “Story

Hi,
I want to implement "When all its children are closed ”then the story becomes closed" this condition

but i unable to get the particular Closed status of the Work Item Story through code.
please anyone help me out for that

Meanwhile i have hard coded the value of state which is present in Process Configuration Source file in java code as
below,

Identifier<IState> array[] =workflowInfo3.getAllStateIds();
for (int i = 0; i < array.length; i++) {
if((String.valueOf(array[i]).equalsIgnoreCase("com.ibm.team.workitem.common.model.IState:com.ibm.team.apt.story.idea")))
{
// We want to modify the parent, so get a working copy.
   parent = (IWorkItem)parent.getWorkingCopy();
// Set the duration on the parent to be the total of child durations
   
parent.setState2(array[i]);
   // Save the work item with an information that could be used to prevent recursive ascent.
   workItemService.saveWorkItem2(parent, null, null);
   break;
}
}


In this code for closed status "com.ibm.team.workitem.common.model.IState:com.ibm.team.apt.story.idea"
This Id is present in Process Configuration Source file.

But I want to get it from code instead of writing it as above.

Please help me out.

0 votes



One answer

Permanent link
 Find some hints here: https://rsjazz.wordpress.com/2012/11/27/resolve-parent-if-all-children-are-resolved-participant/ and here: https://rsjazz.wordpress.com/2012/11/26/manipulating-work-item-states/

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 1,220

Question asked: Dec 07 '16, 9:29 a.m.

Question was seen: 1,754 times

Last updated: Dec 07 '16, 9:53 a.m.

Confirmation Cancel Confirm