It's all about the answers!

Ask a question

Saving work item on the server side


yogesh arora (61) | asked Oct 04 '09, 2:18 p.m.
I am trying to use IRepositoryItemService to save the workitems on the server side.

But it get Access violation exception when i do that.
Is this the correct way to do that. Is therer any other method


Yogesh

One answer



permanent link
Patrick Streule (4.9k21) | answered Oct 05 '09, 5:45 a.m.
JAZZ DEVELOPER
I am trying to use IRepositoryItemService to save the workitems on the
server side.

But it get Access violation exception when i do that.
Is this the correct way to do that. Is therer any other method

Save operations must be routed through the owning component's API, in this
case through the work item API:

com.ibm.team.workitem.service.IWorkItemServer.saveWorkItem2(IWorkItem,
IWorkItemReferences, String)

You can get IWorkItemServer like any other service:
getService(IWorkItemServer.class);

--
Regards,
Patrick
Jazz Work Item Team

Comments
Nate Decker commented Apr 24 '15, 1:50 p.m.

Patrick, I am trying to save a work item and add a Timesheet Entry to it using the server-side Java API. Using saveWorkItem3 doesn't work in this case. It saves the work item, but not the newly linked Timesheet entry.

What is the correct "owning component" to use for an ITimeSheetEntry object? If I can't save it by saving the owning work item, then it seems like I need to save it explicitly somehow. Similar to Yogesh's report above, it doesn't work with IRepositoryItemService.

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.