It's all about the answers!

Ask a question

Move workitem between projects cause error - org.eclipse.core.runtime.AssertionFailedException: assertion failed


kelly hu (21216) | asked Aug 04 '16, 4:19 a.m.
edited Aug 05 '16, 9:24 a.m.
 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 commented Aug 04 '16, 7:42 a.m.

what rtc version?


sam detweiler commented 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 commented Aug 04 '16, 8:19 a.m.

 Hi Sam,


The RTC version is Version: 6.0 Build id: RTC-I20150519-1214.
I check some other testing environments, there is no such kind of assertion errors but just one with - "You don't have permission to Save Work Item [server]."  However, when did move workitem to different project in other repository, it did have assertion errors... Why different errors when with the same configuration deployed? How to avoid those assertion errors?

Thanks a lot.


sam detweiler commented Aug 04 '16, 9:16 a.m.

why? I assume it is because there were different developers with different requirements..


kelly hu commented Aug 04 '16, 9:42 a.m. | edited 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 commented 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 commented Aug 05 '16, 8:46 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
However, when did move workitem to different project in other repository, it did have assertion errors...



If you try to use this across repository borders, this is not supported.


sam detweiler commented 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 commented Aug 05 '16, 9:21 a.m. | edited 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 commented Aug 05 '16, 9:25 a.m. | edited Aug 05 '16, 9:26 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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 commented 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 commented 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

showing 5 of 12 show 7 more comments

One answer



permanent link
Geoffrey Clemm (30.1k33035) | 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
kelly hu commented Aug 05 '16, 3:00 a.m. | edited Aug 05 '16, 3:58 a.m.

Hi Geofferey,
Now we can reproduce this assertion errors when moving workitem to one RTC project which its all workitem types have been removed, would you please provide the link that we can submit a defect report to your team? thanks a lot.

Your answer


Register or 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.