Why does the age calculation script not working?
2 answers
so, please verify if the ItemAge attribute which uses the script is of type string (small/medium/large - any is fine).
i have just verified using the script from https://jazz.net/library/article/1003#calc-values and observe that
a. when its applied on a TimeStamp attribute, the value remains at "None" - no change observed due to the execution of the script
b. when applied on a small string attribute, the value shows up correctly and is of the form "2 d, 20 hr, 34 min"
hope this helps
Comments
Thanks for this info Dinesh.
I have created attribute with type as small string, given the AgeCalculation script under Calculated Value and Modified Date as dependency.
So when I modify the defect, the age should get calculated based on the creation date and modified date. But it is still not happening.
could you check if the Enable Process Attachment Scripts property is set to true?
you can reach this property from your CCM admin page
/ccm/admin#action=com.ibm.team.repository.admin.configureAdvanced
if this is already set, I would suspect some syntax error in the code causing the script to fail.
Use Firebug with Firefox, reload the work item page, check from the scripts tab if this script is getting listed... you can even set a break point here and do a step through
do you find the script loading successfully on the firefox firebug script console!
i would suggest setting a breakpoint and stepping through to see where its going wrong...
Comments
Krzysztof Kaźmierczyk
Mar 28 '14, 4:02 a.m.Hi Maria,
What do you mean that it is not calculated? Does it still has value 0? Do you have any error in ccm.log or in application server log?