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

How to create new work item from java server side plugin?

Hi,

i want to create work item from server side plugin.

I am using java.

is there any guide or given me a snippet of code.


Thanks in Advance.

0 votes


Accepted answer

Permanent link
IWorkItemServer workitemServer = (IWorkItemServer) getService(IWorkItemServer.class);
.....
.....
.....
workItemServer.saveWorkItem2(targetWorkItem, null, "Open");

or read this post

Hope this help

Cheers


Ralph Schoon selected this answer as the correct answer

0 votes


One other answer

Permanent link
not a snippet..
1. you have to do this from a Participant, NOT and Advisor.. an Advisor cannot modify the environment.

but, there are not very many public apis

do you want with or without the UI (u see the UI when u pick Workitem, create)..

with the UI
com.ibm.team.workitem.rcp.ui.createWorkitem().
you will probably have to use internal classes to create the supporting elements for this method.

without the UI is harder.. there are no exposed class methods,
so you will have to take a risk that these will not change too often.

you'll probably need classes in com.ibm.team.workitem.common and com.ibm.team.repository.service.common.

I have modified a some of this code in the process of trying to built general enhancements, but not attempted to add external code to do the tasks you asked about.

you can see the code in the plugins when using eclipse. Use the plugins view, right click on a plugin, import as source.

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

Question asked: May 23 '12, 6:37 a.m.

Question was seen: 4,968 times

Last updated: Jun 05 '12, 5:34 a.m.

Confirmation Cancel Confirm