Retrieve list of allowed value of a custom attribute via Java api
Hi guys,
I am new in this forum...
Since a few weeks I am integrating a custom system with RTC 6.
All works fine but I have a trouble with a custom attribute.
When I add a new ADT via web interface in this field I can select a value from a drop down list (01/07/2017, 03/04/2017 etc...).
Now via Java Plain Api I need to retrieve the list of all these allowed values.
How I can do it ?
Thanks for your help.
|
2 answers
Ralph Schoon (63.5k●3●36●46)
| answered May 15 '17, 4:45 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER You should be able to look into the process specification to find out what type a custom attribute has. The type specifies the values it could have. The name of a custom attribute is not enough data.
Other than that see https://rsjazz.wordpress.com/2013/01/02/working-with-work-item-attributes/ and the linked blog posts for information.
Comments If I print attribute type...I found mediumString.
Is this the type of attribute ?
That is a valid attribute type that can contain any string type attribute up to a certain lenght.
MARCO A
commented May 15 '17, 6:02 a.m.
Ok in my case if I open web user interface of RTC for that value I have a dropdown list.
Where it takes this list ?
This is a question you should either be able to answer yourself, or you should talk to the people maintaining your process, because you either know it or know where to look it up.
It is likely a value set of some sort. https://jazz.net/library/article/1093 (the version for RTC only), the last two labs explain related concepts.
As a sidenote, attribute customization does not work if accessing the work item through the APIs. |
I discover that in the system is present a file Defect.xml that contains element like
<EL.CUST.N.1>
<item>03/27/2017</item>
<item>04/03/2017</item>
<item>04/10/2017</item>
<item>04/24/2017</item>
<item>05/03/2017</item>
<item>OTHER</item>
</EL.CUST.N.1>
How I can read via Java Api these values ?
Comments
Ralph Schoon
commented May 15 '17, 10:39 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
This is likely not something that would be available in the official Java API. this is UI code. The UI is likely using a HTTP filtered value set. Since it is likely not external code, I can't tell where is is. It is possible to search the SDK for class names, if it was set up as described in https://rsjazz.wordpress.com/2013/01/02/working-with-work-item-attributes/
Note. for RTC 6.0.3 and later there is a newer workshop which is not yet published on Jazz.net. You can find it on the blog above.
|
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.