It's all about the answers!

Ask a question

How to contribute functinality to workitem once user click save button using RTC client api


Nilesh Patil (1733650) | asked May 17 '16, 4:23 a.m.
edited May 17 '16, 4:24 a.m.
Hi Team
I have created new custom tab (like Time tracking) on task workitem using RTC client site plugin which has non attribute based table  presentation and user will enter details in that. After deployment of code, I am able to see that new tab in RTC eclipse client.

The requirement is
When user fill some data in rows of table and click save button, the code should create one defect for each table row(created in above step).

Is there any way where I can register my own class and that will be triggered after user click save button
so that I can write code to create workitems based on table input

Sample code snippet will be very much helpful..

Thank you in advance

2 answers



permanent link
Ralph Schoon (63.1k33645) | answered May 17 '16, 5:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited May 17 '16, 5:26 a.m.
 You really, really don't want to create client code if you can get away without it. 
Anyway, there is no client extension code for save work item. See Extension Points and Operation ID’s
com.ibm.team.workitem.operation.workItemSave works only for the server. You can create a follow up action for the server operation.

Basically you can use the approaches from https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation in the client API. You  can use this server API to create work items:

IWorkItem workItem = IWorkItemServer.createWorkItem2(IWorkItemType);
IWorkItemServer.saveWorkItem3(workItem, null, null,
additionalParams);

IWorkItemServer.saveWorkItem2() or IWorkItemServer.saveWorkItems() are available as well

Setting attribute values works like in the common/client api.


permanent link
Michele Pegoraro (1.8k14118103) | answered May 17 '16, 5:02 a.m.
edited May 17 '16, 5:02 a.m.
Hi Nilesh, what you are trying to develop is called follow-up action (or participant) and is a server extension. I suggest you to start here: https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/

This is an example of a save work item participant: https://rsjazz.wordpress.com/2012/11/30/a-create-approval-work-item-save-participant/

Michele.

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.