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

Creating new WorkItems Server Side

Hi,

Can anyone tell me if IWorkItemServer.createWorkItem2 is the only method of creating a new WorkItem on the server.

By that I mean without the eclipse client.

I have worked through some of the examples and have working services etc, but the support for creating WorkItems without resorting to Client interfaces seems limited (unless I am missing something)

0 votes


Accepted answer

Permanent link
I guess I am asking.

Is this the right way to go about server side creation of work items?


IProcessServerService processServerService = ...
IWorkItemServer workItemServer = ...

try {
IProjectArea projectArea = (IProjectArea)processServerService.findProcessArea("<MyProjectAreaName>", null);
IWorkItemType workItemType = workItemServer.findCachedWorkItemType(projectArea, "<MyWorkItemType>");
IWorkItem workItem = workItemServer.createWorkItem2(workItemType);

// begin setting up various attributes
...
// end setting up varous attributes

IStatus status = workItemServer.saveWorkItem2(workItem, null, null);
} catch (TeamRepositoryException e) {
e.printStackTrace();
}
Ralph Schoon selected this answer as the correct answer

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,940

Question asked: Apr 28 '09, 2:01 p.m.

Question was seen: 4,933 times

Last updated: Apr 28 '09, 2:01 p.m.

Confirmation Cancel Confirm