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

Why does the age calculation script not working?

 I have followed the steps given in the below article to calculate age of defect. But even though all steps have been followed, the age is not getting calculated. I am using RTC 3.0.1.2. Is there some step that is missing in this article that I should be doing?
https://jazz.net/library/article/1003#calc-values

Someone please help! Thanks!

0 votes

Comments

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?



2 answers

Permanent link
Also this document how to troubleshot calculated values should be useful:  https://jazz.net/library/article/1360
Let us know if it helped.

0 votes


Permanent link
the return values from the script you are trying to use is of the form "2 d, 20 hr, 34 min" which is best suited for a string attribute. 

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

0 votes

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

Thanks Dinesh. 
Enable Process Attachment Scripts property was set to false. I have now changed it to true and redone the whole setup. The script that I am using is a tried and tested bit of code from the below link. I believe the age has to appear every time we modify the defect. But no value appears when I modify the defect. I don't think there is any syntax error because its a published function. What else could be the reason?

https://jazz.net/library/article/1003#calc-values 

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

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
× 6,121

Question asked: Mar 28 '14, 12:29 a.m.

Question was seen: 4,840 times

Last updated: Apr 01 '14, 3:50 a.m.

Confirmation Cancel Confirm