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

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

0 votes

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,


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.

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

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.

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

showing 5 of 12 show 7 more comments


One answer

Permanent link
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.

0 votes

Comments

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 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: Aug 04 '16, 4:19 a.m.

Question was seen: 2,534 times

Last updated: Aug 05 '16, 10:04 a.m.

Confirmation Cancel Confirm