Getting an IAttribute object from an attribute id on a server extension
Hi everyone,
I want to use getValue on a WorkItem in my Server Extension, but for that I need an IAttribute object.
I have the attribute id.
How do I get the IAttribute object?
Thanks
For reference I tried:
failed to find the required service 'interface com.ibm.team.workitem.common.IWorkItemCommon'
even tho I have IWorkItemCommon in my prerequisites.
3 answers
https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ shows how this is done in a participant/follow up action and the same mechanism applies in advisors/precondition. It is basically the same mechanism explained in https://jazz.net/forum/questions/226930/how-to-get-icontributor-objects-from-a-workitem where you don't specify the context.
You should use IWorkItemCommon wherever you can and it is possible to use it here. I don't know why you can't get it. I agree with Michele on the alternative and the example above uses IWorkItemServer an works.
You should use IWorkItemCommon wherever you can and it is possible to use it here. I don't know why you can't get it. I agree with Michele on the alternative and the example above uses IWorkItemServer an works.