Clarifications needed in RTC plugiin development
Hi All,
I need to create a plugin which will get the current work item session and do customized validation. I need this plugin to be work in eclipse client and web UI as well. Please suggest me how to do that. |
11 answers
I need to create a plugin which will get the current work item session You could implement an IOperationAdvisor which does the validation. It will be triggered regardless of whether a work item is saved in the Web or the Eclipse UI. Please see https://jazz.net/wiki/bin/view/Main/TeamProcessDeveloperGuide The code snippet to get the work item in an advisor is: public void run(AdvisableOperation operation, IProcessConfigurationElement advisorConfiguration, IAdvisorInfoCollector collector, IProgressMonitor monitor) throws TeamRepositoryException { Object data= operation.getOperationData(); if (data instanceof ISaveParameter) { ISaveParameter saveParameter= (ISaveParameter) data; ... } } -- Regards, Patrick Jazz Work Item Team |
I need to create a plugin which will get the current work item session You could implement an IOperationAdvisor which does the validation. It will be triggered regardless of whether a work item is saved in the Web or the Eclipse UI. Please see https://jazz.net/wiki/bin/view/Main/TeamProcessDeveloperGuide The code snippet to get the work item in an advisor is: public void run(AdvisableOperation operation, IProcessConfigurationElement advisorConfiguration, IAdvisorInfoCollector collector, IProgressMonitor monitor) throws TeamRepositoryException { Object data= operation.getOperationData(); if (data instanceof ISaveParameter) { ISaveParameter saveParameter= (ISaveParameter) data; ... } } -- Regards, Patrick Jazz Work Item Team Hi , Thanks for your reply. How to utilize the same code in web UI? Please suggest me in that as well THanks in advance |
How to utilize the same code in web UI? Please suggest me in that as This code will run on the server and will cover both the Web UI and the Eclipse UI. The approach I described would validate on the server when the work item is saved, and not while editing the work item. We currently don't support hooks for client-side validation. If you need client-side validation, you could consider implementing your own Attribute Presentations as described in https://jazz.net/wiki/bin/view/Main/ContributingAttributePresentations The server-side approach is certainly less effort and will not require each Eclipse client talking to your repositories to have the custom plug-in with your Presentation implementations installed. -- Regards, Patrick Jazz Work Item Team |
How to utilize the same code in web UI? Please suggest me in that as This code will run on the server and will cover both the Web UI and the Eclipse UI. The approach I described would validate on the server when the work item is saved, and not while editing the work item. We currently don't support hooks for client-side validation. If you need client-side validation, you could consider implementing your own Attribute Presentations as described in https://jazz.net/wiki/bin/view/Main/ContributingAttributePresentations The server-side approach is certainly less effort and will not require each Eclipse client talking to your repositories to have the custom plug-in with your Presentation implementations installed. -- Regards, Patrick Jazz Work Item Team Hi Patrick, The code in this URL https://jazz.net/wiki/bin/view/Main/ContributingAttributePresentations is not getting triggered when I open a work Item. My requirement very well matches with this one. I copied it in my local express-c plugin everything. I created a plugin and used the same XML mapping in that URL. But when I open the work item window I could not see any new icon. Please help me Thanks iin advance |
he code in this URL Can you check the following: 1) Is your plugin loaded? 2) Does your presentation show up in the 'Add Presentation' dialog when you customize an Editor Presentation? -- Regards, Patrick Jazz Work Item Team |
he code in this URL Can you check the following: 1) Is your plugin loaded? 2) Does your presentation show up in the 'Add Presentation' dialog when you customize an Editor Presentation? -- Regards, Patrick Jazz Work Item Team Hi Patrick, I have the following doubts over this, I used the code in the above URL with the same class file. I made changes to the plugin .xml as well. Now when I open the WorkItem window. I could not see the additional icon. And I added few debug stmts as well that particular class itself is not getting triggered. I am working RTC - express - C client and I created a new PLugin project. Can you please let me know do I need to create a special type of plugin project using any of the templates in RTC client? If I could trigger that code in that URL I can manipulate the same pattern according to my design. Please let me know how could I do that. |
he code in this URL Can you check the following: 1) Is your plugin loaded? 2) Does your presentation show up in the 'Add Presentation' dialog when you customize an Editor Presentation? -- Regards, Patrick Jazz Work Item Team Hi Patrick, I have the following doubts over this, I used the code in the above URL with the same class file. I made changes to the plugin .xml as well. Now when I open the WorkItem window. I could not see the additional icon. And I added few debug stmts as well that particular class itself is not getting triggered. I am working RTC - express - C client and I created a new PLugin project. Can you please let me know do I need to create a special type of plugin project using any of the templates in RTC client? If I could trigger that code in that URL I can manipulate the same pattern according to my design. Please let me know how could I do that. One more thing I wanted to mention is this. My requirement is this. 1)I need to have a new icon in WorkItem window 2) Clicking on that icon should take me to the code which is going to get that current work item values. So I used the code in that URL. |
Hi Patrick, The Wiki page describes how to implement an attribute presentation. After you have the example code deployed as a plugin, you also need to follow the steps to configure this presentation, see e.g. https://jazz.net/library/LearnItem.jsp?href=content/docs/work-items-cust/workitem-editor-presentations.html Did you do that? -- Regards, Patrick Jazz Work Item Team |
Hi Patrick, The Wiki page describes how to implement an attribute presentation. After you have the example code deployed as a plugin, you also need to follow the steps to configure this presentation, see e.g. https://jazz.net/library/LearnItem.jsp?href=content/docs/work-items-cust/workitem-editor-presentations.html Did you do that? Hi Patrick, My requirement is to display an icon which on clicking should trigger my script and I need to get the handle copy of that workItem. If I add a new attribute and trigger that code that wont help me. Please suggest me any ideas for that. thanks in advance. -- Regards, Patrick Jazz Work Item Team |
My requirement is to display an icon which on clicking should trigger An Attribute Presentation is the right way to do this. Despite their name, they don't require an attribute to be associated with them. But you still need to configure the Presentation for the editor. I would suggest that you first get the example from http://jazz.net/wiki/bin/view/Main/ContributingAttributePresentations to run as is, without any modifications. Consult also the following articles: http://jazz.net/library/article/129 http://jazz.net/library/article/130 Then you can start from there. -- Regards, Patrick Jazz Work Item Team |
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.