Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.
        }
}

0 votes


Accepted answer

Permanent link

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.

If you read the Tags, you get a string like "tag1, tag2, tag3".


Fran Burgos selected this answer as the correct answer

0 votes

Comments

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

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,954

Question asked: Apr 10 '18, 10:31 a.m.

Question was seen: 859 times

Last updated: Apr 11 '18, 4:09 a.m.

Confirmation Cancel Confirm