How to contribute functinality to workitem once user click save button using RTC client api
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
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.
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.
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.