It's all about the answers!

Ask a question

Trying to validate Time spent attribute on task at a particular state


Ahmed Omair (41134) | asked Jul 25 '16, 7:41 a.m.
edited Jul 26 '16, 3:30 a.m. by Ralph Schoon (63.1k33646)
 I am trying to get value of time spent attribute and estimate attribute in dojo validation script using following code.

var timespent = workItem.getValue("com.ibm.team.workitem.attribute.timespent");
var estimate = workItem.getValue("com.ibm.team.workitem.attribute.duration");

The above variable are giving me null result. How can i get values of these attributes?

3 answers



permanent link
Lily Wang (4.9k714) | answered Jul 25 '16, 9:31 p.m.
According to the document https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript, "Duration" is not supported by javascript.

permanent link
Ralph Schoon (63.1k33646) | answered Jul 26 '16, 12:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
 Please look up the attribute Ids in the web UI. The attribute Ids you show don't work for attribute customization. I think the return type is a long. 

permanent link
Ahmed Omair (41134) | answered Jul 27 '16, 4:08 a.m.
edited Jul 27 '16, 4:09 a.m.
This worked

var timespent = workItem.getValue("timeSpent");
var estimate = workItem.getValue("duration");

Your answer


Register or 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.