Move workitem between projects cause error - org.eclipse.core.runtime.AssertionFailedException: assertion failed
Hi RTC admins,
When I move one workitem from one project A to another project B, there are some error occurred, would you please suggest ? thanks a lot. Project A and B are under the same repository, and project B is non workitem project(workitem types list are removed, cannot submit new workitems), the ideal scenario should be - indicate user that you don't have permission rather than assertion failed.
Exception Stack Trace:
org.eclipse.core.runtime.AssertionFailedException: assertion failed:
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:96)
at com.ibm.team.workitem.common.internal.CopyToProjectOperation.execute(CopyToProjectOperation.java:167)
at com.ibm.team.workitem.rcp.ui.internal.wizards.CopyToProjectAreaOperation$1.execute(CopyToProjectAreaOperation.java:155)
at com.ibm.team.workitem.common.internal.CopyToProjectOperation.run(CopyToProjectOperation.java:138)
at com.ibm.team.workitem.rcp.ui.internal.wizards.CopyToProjectAreaOperation.execute(CopyToProjectAreaOperation.java:430)
at com.ibm.team.workitem.client.WorkItemOperation.doRun(WorkItemOperation.java:272)
at com.ibm.team.workitem.client.WorkItemOperation.run(WorkItemOperation.java:177)
at com.ibm.team.workitem.rcp.ui.internal.wizards.CopyToProjectAreaWizard$ConfirmProblemsPage$2.run(CopyToProjectAreaWizard.java:427)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Session Data:
eclipse.buildId=unknown
java.fullversion=JRE 1.6.0 IBM J9 2.4 Windows 7 x86-32 jvmwi3260sr16-20141216_227499 (JIT enabled, AOT enabled)
J9VM - 20141216_227499
JIT - r9_20140523_64469ifx3
GC - GA24_Java6_SR16_20141216_1020_B227499
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86
Comments
sam detweiler
Aug 04 '16, 7:42 a.m.what rtc version?
sam detweiler
Aug 04 '16, 7:43 a.m.there are a number of places where proper return codes (access denied) should be returned, but assertion failed is used ..
kelly hu
Aug 04 '16, 8:19 a.m.Hi Sam,
sam detweiler
Aug 04 '16, 9:16 a.m.why? I assume it is because there were different developers with different requirements..
kelly hu
Aug 04 '16, 9:42 a.m.Hi Sam - so do you have any work around/suggestions for this assertion errors when moving workitems to different projects? thanks.
sam detweiler
Aug 04 '16, 10:20 a.m.No, Sorry.. without changing the product code, I'm not aware of any way to resolve this
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Aug 05 '16, 8:46 a.m.If you try to use this across repository borders, this is not supported.
sam detweiler
Aug 05 '16, 9:03 a.m.right.. the code says
if (sourceWorkItem.getOrigin() != getTargetArea().getOrigin()) {
addCopyProblem(new CopyProblem(Messages.CopyToProjectAreaOperation_COPY_TO_OTHER_REPOSITORY_NOT_SUPPORTED));
return;
}
kelly hu
Aug 05 '16, 9:32 a.m.Hi Sam and Ralph,
========== please refer my latest comments here, thx. ====================
I did mean to move workitem to different project in the same repository rather than different repository.
Now we can reproduce this assertion errors when moving workitem from one RTC project(contains workitems, and can submit new workitem) to one RTC project in the same repository which its all workitem types have been removed(remove in process configuration, and no workitem types listed when submit new workitem), do you have any suggestions or would you please provide the link that we can submit a defect report to your team? thanks a lot.
p.s. Only task/issue workitem can be moved successfully, moving other workitemtypes will cause the assertion errors, thanks!
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Aug 05 '16, 9:26 a.m.Thanks for the correction.
You can create a PMR with support or create a defect here: https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWelcome
PS: If there are no work item types I won't expect it to be possible to move a work item there. There should maybe a different error, but that should definitely not be possible.
sam detweiler
Aug 05 '16, 9:35 a.m.yeh, looking at the code, I think this is a side effect error..
I think the createWorkitem Method is failing cause the type doesn't exist
protected IWorkItem createNewWorkItem(IWorkItemType type, IWorkItemCommon workItemCommon, IProgressMonitor monitor) throws TeamRepositoryException {
IWorkItemWorkingCopyManager workingCopyManager= ((IWorkItemClient)workItemCommon).getWorkItemWorkingCopyManager();
WorkItemWorkingCopy targetCopy= ((WorkItemWorkingCopyManager) workingCopyManager).createNewUnconnected(type, monitor);
which calls auditableCommon.createWorkitem(type).. which will fail
kelly hu
Aug 05 '16, 10:04 a.m.Thanks for details.
I've submitted defect here, hope we can find some fix or solutions, thanks!
https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=397885