It's all about the answers!

Ask a question

WorkItem Customization - workitem.getValue() returns a UUID


Henry Armburg Jennings (13076) | asked Nov 24 '11, 6:19 a.m.
Hi,

I'm trying to write a calculated value script in javascript where I return the name of the Category attribute. But the following code returns: _O7KQEvZmEeC94ecF979KKA

How do I convert this into a human-readable string?

For reference, this is my code -

dojo.provide("from_default_valueProvider");

dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");

(function() {

var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;

dojo.declare("from_default_valueProvider", null, {

getValue: function(attribute, workItem, configuration) {

var teamValue = workItem.getValue(WorkItemAttributes.FILED_AGAINST);


return teamValue;
}
});
})();


Thanks in advance,

Henry

2 answers



permanent link
VERT Eric (1533) | answered Sep 13 '12, 3:45 p.m.
try getLabel

var teamValue = workItem.getLabel(WorkItemAttributes.FILED_AGAINST);


permanent link
Chidambaram L (2343669) | answered Nov 14 '12, 6:34 a.m.
Where do I get the reference material for:
com.ibm.team.workitem.api
Scenarios that I am trying to accomplish:
SEAT is a work item type with an enum attribute STATUS with values AVAILABLE / BOOKED. EMPLOYEE is another work item type.
EMPLOYEE Work Item has a list box named "SEAT ALLOCATION" that lists all SEAT Work Items with STATUS = AVAILABLE.
I am trying to write a calculated value js to list all work items of a particular type (say SEAT work item)

Is this possible with script based

Your answer


Register or to post your answer.