It's all about the answers!

Ask a question

How to get the Found In attribute for a Work Item


0
1
Maria Velasco (4641) | asked Feb 26 '09, 6:13 p.m.
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



permanent link
Patrick Streule (4.9k21) | answered Feb 27 '09, 4:38 a.m.
JAZZ DEVELOPER
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.

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

permanent link
Maria Velasco (4641) | answered Feb 27 '09, 10:52 a.m.
Thank you, I will give it a try.

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.

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

permanent link
Yue CDL (1611) | answered Mar 31 '11, 12:38 a.m.
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
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.

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

permanent link
Manoj Panda (39346762) | answered Mar 31 '11, 11:34 a.m.
JAZZ DEVELOPER
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??

permanent link
Craig Rudman (6) | answered Apr 07 '11, 4:48 p.m.
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??


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!

permanent link
Manoj Panda (39346762) | answered Apr 16 '11, 12:22 a.m.
JAZZ DEVELOPER
Has anybody done so far???

permanent link
Eduardo Bello (4401922) | answered Apr 17 '11, 7:35 p.m.
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


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.