How get "Found In" attribute with RTC SDK?
Hello!
We develop a follow-up action trigger which gets the attributes (names and values) from workitems which are changed. We can get almost any attributes for an RTC workitem. But we can not find "Found In" attribute (or release number) which is defined in releases list of a project area. Can anybody recommend us how we can get this value from IWorkItem or another way? The environment is Jazz CLM v4.0.5. Thank you in advance! |
Accepted answer
Simply use
To find out the attributeId do the following:
- Open the project area in the eclipse client
- Choose 'Process Configuration' tab
- Navigate to Project Configuration -> Configuration Data -> Work Items -> Types and Attributes
- click a built-in attribute and choose Edit
- instead of the whole ID path (like 'com.ibm.team.workitem.attribute.modified'), only use the last part ('modified').
---> for custom attributes, you have to use the whole path (like in the source code above)
(a part of this answer is from my answer on this topic)
Dmitry A. Lesin selected this answer as the correct answer
Comments
Dmitry A. Lesin
commented Apr 01 '14, 6:55 a.m.
Hi Lucas,
Lukas Steiger
commented Apr 01 '14, 7:00 a.m.
The advantage if this code is that it is generic for built in and custom attributes, that's why I prefer it over the approach Susan Hanson suggests below. |
One other answer
I don't actually read it, but I do set it using this logic:
IAttribute foundInAttr = myRepo.findAttribute(IWorkItem.FOUND_IN_PROPERTY); IDeliverable del = myRepo.workItemClient.findDeliverableByName(myRepo.projectArea, name, IDeliverable.DEFAULT_PROFILE, myRepo.monitor); newWorkItem.setValue(foundInAttr, deliverable.getItemHandle()); I would assume once you have the foundInAttr, you could do something like IDeliverable del = (IDeliverable) oldWorkItem.getValue(foundInAttr); Comments I would also suggest to use the IWorkItem interface to get at the constants for the built in attributes. E.g. IWorkItem.FOUND_IN_PROPERTY
Dmitry A. Lesin
commented Apr 01 '14, 7:27 a.m.
Colleages!
|
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.