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

How to create a new Work Item

Hi, I want to create a new Work Item ,but I can not find the java service.Now I can modify and save an existed Work Item like this:
//modify work item name and owner

import com.ibm.team.workitem.service.IWorkItemServer;
import com.ibm.team.foundation.common.text.XMLString;
import com.ibm.team.process.common.IProjectArea;
import com.ibm.team.repository.common.IContributor;
import com.ibm.team.repository.common.IContributorHandle;
import com.ibm.team.repository.common.IItemHandle;
import com.ibm.team.repository.common.TeamRepositoryException;
import com.ibm.team.repository.service.TeamRawService;
import com.ibm.team.workitem.common.model.IWorkItem;

//wI is an existed work item which need modify name and owner

IWorkItem workCopy = (IWorkItem) wI.getWorkingCopy();
XMLString x = XMLString.createFromPlainText("newName");
workCopy.setHTMLSummary(x);

workCopy.setOwner((IContributorHandle) contributor.getItemHandle());

IWorkItemServer wIServer = getService(IWorkItemServer.class);
wIServer.saveWorkItem2(workCopy, null, null);

Now, I wand to know how to create a new work item,thank you.

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

Question asked: May 18 '10, 1:47 a.m.

Question was seen: 4,959 times

Last updated: May 18 '10, 1:47 a.m.

Confirmation Cancel Confirm