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

Saving Workitem references

Hi
I'm creating and saving WI references as follow on the client side, however I don't find a correspond method (on the client side) for saveWorkItem2() to save a WI with references:
wc = (IWorkItem) workItem.getWorkingCopy(); 

IWorkItemReferences references =
workItemServer.resolveWorkItemReferences(wc, null);
references.add(WorkItemEndPoints.CHILD_WORK_ITEMS,
WorkItemLinkTypes.createWorkItemReference(workItem1));
workItemServer.saveWorkItem2(workItem2, references, null);

Thank you for your help,

0 votes



One answer

Permanent link
On 3/29/10 8:37 PM, eclipsetalk wrote:
Hi
I'm creating and saving WI references as follow on the client side,
however I don't find a correspond method (on the client side) for
saveWorkItem2() to save a WI with
references:
wc = (IWorkItem)
workItem.getWorkingCopy();
IWorkItemReferences references =
workItemServer.resolveWorkItemReferences(wc, null);
references.add(WorkItemEndPoints.CHILD_WORK_ITEMS,
WorkItemLinkTypes.createWorkItemReference(workItem1));
workItemServer.saveWorkItem2(workItem2, references, null);

Thank you for your help,


You can find an example of how to create a link on the client side in
https://jazz.net/wiki/bin/view/Main/ProgrammaticLinkCreation

Basically, you get the references from the working copy itself:

protected void execute(WorkItemWorkingCopy workingCopy, IProgressMonitor
monitor) throws TeamRepositoryException {
IItemReference reference=
IReferenceFactory.INSTANCE.createReferenceToItem(workItem1);
workingCopy.getReferences().add(WorkItemEndPoints.CHILD_WORK_ITEMS,
reference);
}

--
Regards,
Patrick
Jazz Work Item Team

0 votes

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

Question asked: Mar 29 '10, 2:27 p.m.

Question was seen: 5,118 times

Last updated: Mar 29 '10, 2:27 p.m.

Confirmation Cancel Confirm