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.