Trying to validate Time spent attribute on task at a particular state
![]()
Ahmed Omair (4●10●30)
| asked Jul 25 '16, 7:41 a.m.
edited Jul 26 '16, 3:30 a.m. by Ralph Schoon (62.0k●3●36●43)
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
![]()
According to the document https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript, "Duration" is not supported by javascript.
|
![]()
Ralph Schoon (62.0k●3●36●43)
| 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.
|
![]()
This worked
var timespent = workItem.getValue("timeSpent");
var estimate = workItem.getValue("duration");
|