How to get the Found In attribute for a Work Item
Hello all,
Can someone please help me figure out how to get the current value of the attribute Found In assigned to a certain work item? I am able to get the values of other attributes for a work item except for this one. Any help would be appreciated. Thanks! |
7 answers
Can someone please help me figure out how to get the current value of You can get all values of a work item using IWorkItem#getValue(IAttribute attribute); The attributes can be acquired using IWorkItemCommon#findAttribute(IProjectAreaHandle projectArea, String attributeId, IProgressMonitor monitor); So for the Found In attribute, you would do the following IAttribute foundIn= workItemClient.findAttribute(projectArea, IWorkItem.FOUND_IN_PROPERTY, monitor); IDeliverableHandle deliverable= (IDeliverableHandle) workItem.getValue(foundIn); -- Regards, Patrick Jazz Work Item Team |
Thank you, I will give it a try.
Can someone please help me figure out how to get the current value of You can get all values of a work item using IWorkItem#getValue(IAttribute attribute); The attributes can be acquired using IWorkItemCommon#findAttribute(IProjectAreaHandle projectArea, String attributeId, IProgressMonitor monitor); So for the Found In attribute, you would do the following IAttribute foundIn= workItemClient.findAttribute(projectArea, IWorkItem.FOUND_IN_PROPERTY, monitor); IDeliverableHandle deliverable= (IDeliverableHandle) workItem.getValue(foundIn); -- Regards, Patrick Jazz Work Item Team |
Thank you very much, Patrick!
I tried to use this piece of code to get the foundIn attribute of a workitem but failed because the deliverable handle retrieved was null. IDeliverableHandle deliverable= (IDeliverableHandle) workItem.getValue(foundIn); So I coundn't continue to resolve an IDeliverable object according to the IDeliverableHandle. Any thoughts? thanks a lot! Can someone please help me figure out how to get the current value of You can get all values of a work item using IWorkItem#getValue(IAttribute attribute); The attributes can be acquired using IWorkItemCommon#findAttribute(IProjectAreaHandle projectArea, String attributeId, IProgressMonitor monitor); So for the Found In attribute, you would do the following IAttribute foundIn= workItemClient.findAttribute(projectArea, IWorkItem.FOUND_IN_PROPERTY, monitor); IDeliverableHandle deliverable= (IDeliverableHandle) workItem.getValue(foundIn); -- Regards, Patrick Jazz Work Item Team |
Hi,
I understand that if someone subscribe for a workitem, he can get an email whenever there is a change in that work item. My Question is similar but not the same. Assume that we have severity which is high,low, medium. i am only inetested whenever somebody logged a Defect with High Severity then i should get alert by email, or if somebody change the severity from low to high. is there any possibility, if yes, then HOW?? |
Hi, It's a bit complicated, but not difficult if you have the patience to work through all of the steps. The overall idea is to create an Operation Advisor which is a plug-in that extends the com.ibm.process.service.operationAdvisors extension point. You will create a Java class that both extends AbstractService and implements IOperationAdvisor. Your implementation class will be invoked by the Work Item Save operation, configurable in the process configuration. Specifically, you will want to provide an implementation of the run(...) method, and in that method, you can evaluate the Severity of the work item. If it meets your conditions, you can use the IMailerService to send the email notification. Because your implementation class extends AbstractService, you can obtain a reference to the IMailerService by calling getService(IMailerService.class). Be sure to reference any service that you invoke in this manner in the prerequisites element of your operationAdvisor declaration in the plugin.xml (or on the Extensions tab in Eclipse GUI). Finally, you will have to deploy your plugin to the server by creating an Update Site and flag the OSGI subsystem to reload bundles when you restart the server ( there's a command you can issue via web browser to the ccm component that's something like https://<your>/ccm/admin/cmd/requestReset) That's the basic roadmap... I'm sorry I can't provide detailed instructions, but you will be able to find them in the Jazz developer Wiki or by Googling. Good Luck! |
Has anybody done so far???
|
You can see a simple step-by-step advisor example here: https://www.ibm.com/developerworks/mydeveloperworks/blogs/extendingrtc/entry/advisor_prevent_links
|
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.