how to add values to a string list type attribute?
Hi,
I have an attribute TriageComplete with values Yes, No and In-Progess.I know the attribute type should be string list but not sure how to add values to this string list.
Please help.
Thanks, Anitha |
2 answers
Hi Anitha
For a string list attribute, you can associate it with a Script Based Value Set to give you a set of values that show up when you click on Add. Here are the steps: 1. Create Value Set Sample script based Value sets to add: ------------------------------------------------- dojo.provide("com.example.ValueSetProvider"); (function() { dojo.declare("com.example.ValueSetProvider", null, { getValueSet: function(attributeId, workItem, configuration) { var result= []; result.push("Yes"); result.push("No"); result.push("InProgress"); return result; } }); })(); 2. Create Attribute Type : String List Value Set: (Select the set created in step 1). 3. Add Attribute to Editor Presentation with Kind : String List. You can also add a new values that are not part of the set returned by the script but that value will confine to that work item only. A new work item will again show only the value set returned by the associated script. For more information, http://www.ibm.com/developerworks/rational/library/customize-rational-team-concert-non-traditional-uses/#_Customize_the_new Comments
Ralph Schoon
commented Feb 03 '15, 11:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I disagree that a string list is the right choice for the problem described above.
|
Ralph Schoon (63.5k●3●36●46)
| answered Feb 03 '15, 2:08 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Feb 03 '15, 2:09 a.m.
If you want one choice of the three, you want to create an enumeration. If you want to be able to select multiple values, you want an enumeration list. As far as I can tell, 4.x supports enumeration lists.
Read https://jazz.net/library/article/1003 And the articles referenced at the end of the article to understand the process. You can also go through https://jazz.net/library/article/1093 to understand work item customization. In an enumeration your literals would be, for example Yes No In Progress |
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
Why should the attribute be a string list? This looks a lot more like a custom enumeration.
A string list is only useful for being able to set multiple strings. In the past a string list was used, together with a special attribute presentation to model multi-select enumerations. This has been changed and enmerationList attribute types can now be used.
I would consider provide better information about what you want to achieve and why and to add some context e.g. what version of RTC you are using.
Hi Ralph,
Thanks for response.
Since the attribute values are strings ("Yes", "No" and "In-Progress") thought the attribute should be string list type. From your answer assuming is the enumeration list attribute is the latest improvement for string list attribute. Correct me if I am wrong.I am using CLM 4.0.6.
Regards,
Anitha