How to get the custom attributes programatically?
Hi,
I want to check values of custom attributes for certain conditions. How to get the custom attribute values??? Thanks, Dnyanesh |
Accepted answer
the problem we have is that you haven't said what kind of program
client server java javascript OLSC ?? here are links to some code in Java for Client and Server (Advisor or Participant) that accesses all the attributes.. client - see the 'accepted answer' here https://jazz.net/forum/questions/94776/assertionfailedexception-problem-with-getting-the-values-of-attributes server - see the third post here https://jazz.net/forum/questions/76276/how-to-get-the-value-selected-by-user-from-a-drop-down-list Dnyanesh Markad selected this answer as the correct answer
Comments
Dnyanesh Markad
commented Jan 02 '13, 12:56 a.m.
Hi all ,
I haven't really done this, as I see it there are two options using Java in a server extension.
If you haven't found examples already, here a small introduction on how to get at work item attributes in the Java API. http://rsjazz.wordpress.com/2013/01/02/working-with-work-item-attributes/
|
One other answer
you could use getValue with attribute id specified within double quotes
sample code: var custAttr = workItem.getValue("custAttrID");hope it helps Comments
Ralph Schoon
commented Dec 28 '12, 10:58 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
This is of course the syntax if using a script based customization. Since the question fails to give enough context, it is unclear if that is the question. This blog answers this question for the plain java client library and other extensions as well.
Dnyanesh Markad
commented Dec 31 '12, 7:41 a.m.
Hi,
In deatail, suppose I have one custom attribute as custA. Its type is medium string. In editor presentations I have assigned the attribute values as list. So now I want to get the number of selected attributes in the list programatically.
|
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.