How to get values of attributes of workitem using Plain Java API ?
Hi All ,
I want to access all values of attribute type team area,Enumeration,Project area,Timestamp ,duration etc .. depending upon user choice .
Means if user want to access the 3 attributes value of particular WI for example created date, created by ,tags
then values of these attributes should be displayed on console.
so My problem is how to access that attributes values depending on User Choice. I have code for accessing the values of all attributes which are in WI . but i want to fetch the attribute value of user choice not all .
Accepted answer
well, you would have to make some cross reference table, that identified a user readable attribute name and the actual attribute name behind it. your code would look up the user selected type to get the actual field attribute id, and use that to get its value.
I don't know what 'console' means, but from commandline it would be pretty easy.
I don't know what 'console' means, but from commandline it would be pretty easy.
Comments
Hi sam,
Thanks for your reply,
I am working on Command Line and GUI based Application In which i want to take some attributes Id from user and have to check whether that attributes are present in the Work item or not if Present then get the value of that particular Attribute.
As per my Knowledge i am able to access the values of String Data Types,Contributor ,Category ,Project Area but how can get the values of Team area, tags,subscribers,Item,E-signature,Enumeration List,Iteration,time Line,wiki etc datatypes Present in the RTC.
It is Giving Problem when attributes ID of Attributes are different in Web UI and RTC Eclipse client .
Please see https://rsjazz.wordpress.com/2015/11/03/a-rtc-workitem-command-line-version-3-0/ and the code attached which basically can access all attribute and non attribute types I am aware of.
Most interesting classes in com.ibm.js.team.workitem.commandline.helper and com.ibm.js.team.workitem.commandline.utils or search the blog for keywords.
With respect to the ID's use the ones displayed in the Web UI. See https://jazz.net/forum/questions/210676/problem-in-accessing-enumeration-in-work-item-using-client-java-api for what we found.
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 09 '15, 11:30 a.m.I am basically not sure what the use case is. The explanation does not really help. You might want to enhance your question.
shweta ranaware
Nov 10 '15, 2:24 a.m.Hi Ralph,
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 10 '15, 2:33 a.m.You can get the values as described in several posts on my blog. Start here https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ see here: https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ search my blog. This can read and write all attributes (I am aware of) as well and has code attached https://rsjazz.wordpress.com/2015/11/03/a-rtc-workitem-command-line-version-3-0/ .