It's all about the answers!

Ask a question

Why does Deletion of an Iteration programatically throw ProcessDataValidationException ?

Achla Sharma (31216) | asked Aug 14 '14, 2:53 a.m.
edited Sep 04 '14, 5:26 a.m.

Following is my code to delete iteration from a project area :

for (Object obj : itemManager.fetchCompleteItems(
    IItemManager.DEFAULT, monitor)) {

   IIteration iter = null;
   if (obj instanceof IIteration) {
    iter = (IIteration) obj;

I am recieving the following error message : 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

permanent link
Stephanie Bagot (2.1k513) | answered Aug 14 '14, 1:08 p.m.
It looks like your iteration is referencing a project timeline. Did you delete the project timeline that iteration was associated with?

Achla Sharma commented Sep 04 '14, 5:13 a.m.

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

permanent link
Qiong Feng Huang (76911610) | answered Aug 15 '14, 4:22 a.m.
 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:

Achla Sharma commented Sep 04 '14, 5:12 a.m.

I tried implementing your suggestion. I am getting the following error message on save operation : timeline may not be null

permanent link
Qiong Feng Huang (76911610) | answered Sep 29 '14, 1:24 a.m.
 If you just want to delete a iteration, you can use, boolean, IProgressMonitor) on client site.

Achla Sharma commented Sep 29 '14, 6:35 a.m.


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, 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)".

Achla Sharma commented Sep 29 '14, 6:37 a.m.

The code now looks like this :

service.archiveProcessItem(working_Iteration, null);


Your answer

Register or to post your answer.