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

Cannot view iteration plans after removing a repository user

I deleted a repository user using the RTC API (he had left the company), and now I cannot view iteration plans for projects he had been a member of.

Server is 2.0.0.2 on AIX, Client is Windows 2003 using rich client.

Also tracking via RTC defect:
http://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=137285

Error From Web UI:
CRJAZ0215I Item not found: com.ibm.team.repository.common.model.impl.ContributorHandleImpl@1f4e1f4e (stateId: , itemId: , origin: , immutable: )

Error From rich client
!ENTRY com.ibm.team.apt.ide.core 4 4 2010-10-19 11:04:50.075
!MESSAGE An internal error occurred during operation: "Retrieving Data". See the error log for details.
!STACK 0
java.lang.IllegalArgumentException: The 'no null' constraint is violated
at org.eclipse.emf.common.util.BasicEList.validate(BasicEList.java:175)
at org.eclipse.emf.ecore.util.EcoreEList.validate(EcoreEList.java:69)
at org.eclipse.emf.common.util.BasicEList.addAllUnique(BasicEList.java:803)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddAllUnique(NotifyingListImpl.java:506)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllUnique(NotifyingListImpl.java:478)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllUnique(NotifyingListImpl.java:406)
at org.eclipse.emf.common.util.BasicEList.addAll(BasicEList.java:716)
at com.ibm.team.apt.internal.service.IterationPlanService.fetchPlannedWorkItems(IterationPlanService.java:330)
....
at $Proxy241.fetchPlannedWorkItems(null)
....
at com.ibm.team.repository.common.transport.CancelableCaller.call(Unknown Source)
at com.ibm.team.repository.client.internal.TeamRepository.callCancelableService(Unknown Source)
at com.ibm.team.apt.internal.client.IterationPlanClient.fetchIterationPlan(Unknown Source)
at com.ibm.team.apt.internal.ide.ui.editor.OutlinePage$5.resolve(Unknown Source)
at com.ibm.team.apt.internal.ide.ui.editor.OutlinePage$5.resolve(Unknown Source)
at com.ibm.team.apt.internal.ide.core.util.TeamFuture$DefaultResolver.resolve(Unknown Source)
at com.ibm.team.apt.internal.ide.core.util.TeamFuture$LoadJob.execute(Unknown Source)
at com.ibm.team.apt.internal.ide.core.util.TeamFuture$LoadJob.access$0(Unknown Source)
at com.ibm.team.apt.internal.ide.core.util.TeamFuture$LoadJob$1.run(Unknown Source)


Code used to delete user:
private void deleteUser(ITeamRepository repo, String userId, IProgressMonitor monitor){
IContributorManager cmgr = repo.contributorManager();
IContributor contributor = cmgr.fetchContributorByUserId(userId, monitor);
leaveAllProcessAreas(repo, contributor);
cmgr.deleteContributor(contributor, monitor);
}

private void leaveProcessArea(ITeamRepository repo, IContributor contributor) {
for(IProcessArea processArea : getAllProcessAreasForUser(repo, contributor) {
leaveProcessArea(repo, contributor, processArea);
}
}

private void leaveProcessArea(ITeamRepository repo, IContributor contributor, IProcessArea processArea) {
IProcessItemService service= (IProcessItemService) repo.getClientLibrary(IProcessItemService.class);
NullProgressMonitor monitor = new NullProgressMonitor();
IProcessAreaWorkingCopy areaWC = (IProcessAreaWorkingCopy) service.getWorkingCopyManager().createPrivateWorkingCopy(processArea);
areaWC.getTeam().removeContributors(new IContributor[]{contributor});
areaWC.save(monitor);
}

0 votes



5 answers

Permanent link
RTC client only supports archiving stuff to make sure anything linking to the object still works - so perhaps deleting using the commandline is not a good idea -is it all plans you can not view or is it only plans on which work items exist he has been assinged to for instance (link in history) ? can you view plans in other types of views like ranked list or work breakdown ?

0 votes


Permanent link
I cannot view any plan for any iteration that the deleted user was on the team for.

I believe it also applies to any plan created from an iteration that was created when the user was on the team.

I was able to create a new iteration in the future, create a plan for it, and view that plan. I was unable (so far) to fix up my existing plans by deleting and recreating the iterations.

0 votes


Permanent link
For iterations/plans that already existed, I tried to do the following:

1) Create a new iteration with the same time span.
2) Open the "broken" plan, use it to do an open work item query, reassign all work items in the broken iteration to the new iteration.
3) The new iteration plan showed some updates.
4) When I close/reopen the new plan, it shows the same error.

This may actually be due to a problem in the work items assigned to the plan. I tried to open a work item created by that deleted user, and it won't open in the rich client, with a similar error: CRJAZ0215I Item not found: com.ibm.team.repository.common.model.impl.ContributorHandleImpl@41124112 (stateId: <unset>, itemId: , origin: com.ibm.team.repository.client.internal.TeamRepository@598e598e, immutable: true)

So, I wonder how to get out of this state ... it appears maybe I have to archive any work items that user touched. Any suggestions?

0 votes


Permanent link
For iterations/plans that already existed, I tried to do the following:

1) Create a new iteration with the same time span.
2) Open the "broken" plan, use it to do an open work item query, reassign all work items in the broken iteration to the new iteration.
3) The new iteration plan showed some updates.
4) When I close/reopen the new plan, it shows the same error.

This may actually be due to a problem in the work items assigned to the plan. I tried to open a work item created by that deleted user, and it won't open in the rich client, with a similar error: CRJAZ0215I Item not found: com.ibm.team.repository.common.model.impl.ContributorHandleImpl@41124112 (stateId: <unset>, itemId: , origin: com.ibm.team.repository.client.internal.TeamRepository@598e598e, immutable: true)

So, I wonder how to get out of this state ... it appears maybe I have to archive any work items that user touched. Any suggestions?


Hmm yeah - that would be my guess also that the workitems contain links to the deleted user and so they do not work. But you are in luck that the duplicate functionality exist - you can use this by right clicking your workitems and creating new ones with the same content - then you can archive the old ones.

0 votes


Permanent link
See http://jazz.net/forums/viewtopic.php?p=45072

I found code to archive a user using the API.

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

Question asked: Oct 19 '10, 12:04 p.m.

Question was seen: 6,928 times

Last updated: Oct 19 '10, 12:04 p.m.

Confirmation Cancel Confirm