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 (1733050) | 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
Michele Pegoraro (1.8k12114102) | 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:

This is an example of a save work item participant:


permanent link
Ralph Schoon (61.5k33643) | answered May 17 '16, 5:23 a.m.
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 works only for the server. You can create a follow up action for the server operation.

Basically you can use the approaches from in the client API. You  can use this server API to create work items:

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

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

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

Your answer

Register or to post your answer.