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. shweta ranaware selected this answer as the correct answer
Comments
shweta ranaware
commented Nov 10 '15, 2:15 a.m.
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.
shweta ranaware
commented Nov 10 '15, 2:17 a.m.
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.
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.
|
One other answer
the accepted answer here, https://jazz.net/forum/questions/94776/assertionfailedexception-problem-with-getting-the-values-of-attributes will print out all the attributes of a workitem, including its ID.
|
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.
Comments
I am basically not sure what the use case is. The explanation does not really help. You might want to enhance your question.
Hi Ralph,
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/ .