Ho to fetch workitem type attribute value?
Hi,
i am using plain java for fetching all work items from project area. |
6 answers
Ralph Schoon (63.7k●3●36●48)
| answered May 08 '12, 6:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Please see:
https://jazz.net/forums/viewtopic.php?t=3680 https://jazz.net/forums/viewtopic.php?t=4957 https://jazz.net/forums/viewtopic.php?t=14318 https://jazz.net/forums/viewtopic.php?t=17467 https://jazz.net/forums/viewtopic.php?t=24184 https://jazz.net/forums/viewtopic.php?t=1588 In a nutshell Find the attribute
Or iterate the exiting ones:
You get the value as an object and need to cast it. Enumerations return ILiteral or something like that. I have no code snippet lying around for that case. |
My code for finding the values of ALL attributes in a workitem (including enumerations) is here
https://jazz.net/forums/viewtopic.php?t=24762 but if you are asking how to find the workitem TYPES in a project.. the call is
Sam |
Hi Sam,
Thank you very much. Based on your post ( https://jazz.net/forums/viewtopic.php?t=24762) . i have found the solution for retrieving priority and other values like enumeration , string type values. |
Hi Ralph Schoon,
Thank you for your response. i have followed your post. check my output below for this line, System.out.print("Custom: " +customString.getIdentifier()+" \t" +customString.getDisplayName()+" \t"+customString.getAttributeType()); output: Custom: customerid Customer ID workItem And it doesn't return any value for work item type of attribute. |
Ralph Schoon (63.7k●3●36●48)
| answered May 08 '12, 11:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi,
If I read your output correctly it says that the attribute Type identifier returned by IAttribute.getAttributeType() is "workItem". So I would assume that it was configured to contain work items. Is that not correct? If you are talking about the state of a work item, the work item has getters and setters for the built in attributes that you can use too. |
Hi Ralph Schoon,
its correct one of my attribute type is work item. Please suggest me how to get the value of that attribute(work item type). And also i am unable to fetch the value of State attribute. Sorry for my inappropriate post. I want to read the values of two attributes. 1. work item type attribute 2. State type attribute. |
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.