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

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.

0 votes



3 answers

Permanent link
It looks like your iteration is referencing a project timeline. Did you delete the project timeline that iteration was associated with?

0 votes

Comments

No, I just wanted to delete a particular iteration from the project timeline. The project timeline is not deleted.


Permanent link
 When you use IDevelopmentLine.removeIteration() to remove an iteration, you should also have to remove the reference of development line from the iteration that is about to be removed.

For example:
developmentLine.removeIteration(iteration);
iteration.setDevelopmentLine(null);

0 votes

Comments

I tried implementing your suggestion. I am getting the following error message on save operation :

com.ibm.team.process.common.service.ProcessDataValidationException: timeline may not be null


Permanent link
 If you just want to delete a iteration, you can use com.ibm.team.process.client.IProcessItemService.delete(IProcessItemHandle, boolean, IProgressMonitor) on client site.

0 votes

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);

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
× 10,927
× 7,487
× 169

Question asked: Aug 14 '14, 2:53 a.m.

Question was seen: 4,731 times

Last updated: Sep 29 '14, 6:37 a.m.

Confirmation Cancel Confirm