Unable to create a parent link type
Hi,
LinkWorkItemOperation is my custom private class. I have below code, LinkWorkItemOperation operation = new LinkWorkItemOperation(ILinkTypeRegistry.INSTANCE.getLinkType(linkType).getTargetEndPointDescriptor(), targetWorkItem); operation.run(sourceWorkItem, monitor); In the above code I can able to create other link types ex: tracks, contributes... When I try to create a parent link I am getting the below exception. com.ibm.team.repository.common.TeamRepositoryException: Change would introduce non-item reference for item end point at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.saveAddedLinks(WorkItemRepositoryService.java:1008) at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.saveLinks(WorkItemRepositoryService.java:951) at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.plainSave(WorkItemRepositoryService.java:656) at com.ibm.team.workitem.service.internal.WorkItemProcessAreaOperation.run(WorkItemProcessAreaOperation.java:45) ........ Am I doing anything wrong here? Please help me on this. |
One answer
Ralph Schoon (63.5k●3●36●46)
| answered Jun 09 '15, 4:32 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jun 09 '15, 4:36 a.m.
The error message says it all:
com.ibm.team.repository.common.TeamRepositoryException: Change would introduce non-item reference for item end point If you create links, there are different ways how to create the end point. One way is an item reference e.g. based on a work item. Another is based on a location - these are used for CLM links e.g. tracks. You apparently create one of the end points not as item reference If you pass an URI to the code, look at the different URI's you get in the web UI for different link ends. There are different forms for the different link types.. Comments
ast java
commented Jun 09 '15, 5:09 a.m.
Hi Schoon,
When I developed the Work Item Command Line, I ran into the issue of the different types and you simply have to find out which URI/endpoint type you need.
You might want to check the code in
|
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.