How do you set calculated value for a Tag attribute
On a javascript, what is the format for return tags on a workitem calculated value?
dojo.provide("com.ibm.san.workitem.js.clasificaciones");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
dojo.declare("com.ibm.san.workitem.js.clasificaciones", null, {
getValue : function(attribute, workItem, context) {
return ["tag-1", "tag-2"];
// String array? It doesn't seems work.
}
}
|
Accepted answer
Ralph Schoon (63.6k●3●36●46)
| answered Apr 10 '18, 11:46 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER As far as I can tell, the Java API expects a collection of strings. I am not aware if there is a way to provide that using the AttributeCustomization API. Maybe someone else is able to, but I have so far not succeeded in setting multi value attribute types. Also please note that https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript only mentions very basic types as supported.
Fran Burgos selected this answer as the correct answer
Comments
Fran Burgos
commented Apr 11 '18, 3:58 a.m.
I tried returning that string and it works:
return "tag1, tag2, tag3";
Thank you.
This is surprising, because for whatever reason I got an exception when I tried.
|
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.