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
showing 5 of 12
show 7 more comments
|
One answer
Geoffrey Clemm (30.1k●3●30●35)
| answered Aug 05 '16, 12:36 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Please submit a defect report.
Assuming you invoked this operation from a GUI, you should never get an "assertion failed" error ... you should get a meaningful error message. Comments Hi Geofferey,
|
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.
Comments
what rtc version?
there are a number of places where proper return codes (access denied) should be returned, but assertion failed is used ..
Hi Sam,
why? I assume it is because there were different developers with different requirements..
Hi Sam - so do you have any work around/suggestions for this assertion errors when moving workitems to different projects? thanks.
No, Sorry.. without changing the product code, I'm not aware of any way to resolve this
If you try to use this across repository borders, this is not supported.
right.. the code says
if (sourceWorkItem.getOrigin() != getTargetArea().getOrigin()) {
addCopyProblem(new CopyProblem(Messages.CopyToProjectAreaOperation_COPY_TO_OTHER_REPOSITORY_NOT_SUPPORTED));
return;
}
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!
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.
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
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