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

Problems in viewing programmatically created links

Hi,

I am creating links between two workitem types, enhancement and defect. Enhancement has been created by me.

I am using the following code to create a "relatedWorkitem" link between source and destination workitems.

After I create link using the code, it is adding the link in the references for the source workitem. And when I print them or get the references using getReferences it shows up. However, I am not able to see it in the links section of the WebUI for that source item, specifically "enhancement". I can see it in the defect links section.

Is there anything I am missing?


		com.ibm.team.workitem.common.model.IWorkItem sourceWorkitem = getWorkItem(Integer.parseInt(sourceId));

com.ibm.team.workitem.common.model.IWorkItem destWorkitem = getWorkItem(Integer.parseInt(destId));
try {
IWorkItemClient workItemClient = (IWorkItemClient) teamRep.getClientLibrary(IWorkItemClient.class);
IWorkItemWorkingCopyManager workingCopyManager= workItemClient.getWorkItemWorkingCopyManager();

IWorkItemHandle handle = (IWorkItemHandle)sourceWorkitem.getItemHandle();
workingCopyManager.connectCurrent(handle, com.ibm.team.workitem.common.model.IWorkItem.FULL_PROFILE, null);
WorkItemWorkingCopy workingCopy= workingCopyManager.getWorkingCopy(handle);
IWorkItemReferences references = workingCopy.getReferences();

IItemReference ref = WorkItemLinkTypes.createWorkItemReference(destWorkitem);
references.add(WorkItemEndPoints.RELATED_WORK_ITEM,ref );
workingCopy.save(null);
workingCopyManager.disconnect(handle);



Thanks,
Abhishek

0 votes


Be the first one to answer this question!

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
× 10,947

Question asked: Jul 27 '09, 2:17 p.m.

Question was seen: 4,409 times

Last updated: Jul 27 '09, 2:17 p.m.

Confirmation Cancel Confirm