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

How do you open workitem if you have the ID

Hi,

I am just wondering if there is a method to open the workitem editor using the api if you have the worktiem id.

This is for RTC 3.0.

Thanks a lot.

Regards

Charbel

0 votes


Accepted answer

Permanent link

HI , Thanks for your response, here is the code that worked for me:

IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IWorkItem workItem = workItemClient.findWorkItemById(Integer.valueOf(split[i]), IWorkItem.FULL_PROFILE, null);

WorkItemUI.openEditor(page, workItem);

Regards

Charbel

Ralph Schoon selected this answer as the correct answer

0 votes


2 other answers

Permanent link
Hi, you can find example code here: http://rsjazz.wordpress.com/2012/08/01/uploading-attachments-to-work-items/

0 votes


Permanent link

Hi,

Tried the above code to open workitemUI.but it is giving the below error

java.lang.NoClassDefFoundError: com.ibm.team.workitem.rcp.ui.WorkItemUI

 com.ibm.team.workitem.rcp.ui.jar is already there in the library

0 votes

Comments

This will, as far as I understand it, only run inside an Eclipse or RCP extension. You would need to run this with the RTC SDK in an Eclipse client. In this case, you need to add the needed dependencies to the plugin.

It will not run in the plain java client libraries, because the platform is not available.

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
× 102

Question asked: Oct 15 '12, 4:45 p.m.

Question was seen: 5,121 times

Last updated: Jul 29 '14, 9:17 a.m.

Confirmation Cancel Confirm