Why does Deletion of an Iteration programatically throw ProcessDataValidationException ?
Following is my code to delete iteration from a project area :
for (Object obj : itemManager.fetchCompleteItems(
Arrays.asList(workingDevLine.getIterations()),
IItemManager.DEFAULT, monitor)) {
IIteration iter = null;
if (obj instanceof IIteration) {
iter = (IIteration) obj;
workingDevLine.removeIteration(iter);
}
I am recieving the following error message :
com.ibm.team.process.common.service.ProcessDataValidationException: Iteration 'FY14Q3' has a backpointer to timeline 'Project_Timeline', but the timeline does not contain it.
An explanation about this error might be helpful.
3 answers
iteration.setDevelopmentLine(null);
Comments
Hi
Thanks for the alternative. I tried using the method. The problem with this approach is that it renders the existent workitems using the iteration in an unstable state. Instead I tried this :com.ibm.team.process.client.IProcessItemService.archiveProcessItem(IProcessItemHandle, IProgressMonitor).
It did archive the iteration still I was getting work items in an uunstable state. I just added the workingDevelopmentLine.remove operation after this and it worked for me. We now have unnecessary iterations archived. For the workitems using the iteration, the planned for field has value :"iteration-name"+"(archived)".
The code now looks like this :
service.archiveProcessItem(working_Iteration, null);
workingDevLine.removeIteration(working_Iteration);