Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

Problem triggering Script depending on TIME SPENT attribute change

I made a couple of scripts to be run when ESTIMATE, CORRECTED ESTIMATE or TIME SPENT attributes changes, the idea is that the scripts will calculate two custom attributes for the Hours Remaining and the Progress based on those attributes.
So in these attributes (Hours Remaining, and Progress) I've defined dependencies on ESTIMATE, CORRECTED ESTIMATE and TIME SPENT, and of course they have the corresponding script as Calculated Value.
For changes on the ESTIMATE and CORRECTED ESTIMATE attributes, the scripts are triggered with no problem, but for TIME SPENT it doesn't, what I'm guessing is that  scripts are executed only when you change manually a field, not when is done automatically like by saving the hours in the time tracking tab which updates the TIME SPENT attribute in the main tab.
Is there a way to do this?



0 votes

Comments

I am pretty sure I did something like that in the past and it worked for me. If the attribute changes, the script should trigger, provided you have the dependency to the attribute. It should not matter who changes the attribute.



One answer

Permanent link
 Hello Alejandro,
I just tested in my debug env - Change and Configuration Management - Core Libraries, Version 5.0.1 M2 (X20140613-1216)

- created a FPM PA
- created a calculated value provider, with example code and a console.log("someString");
- created an integer attribute, using this provider, depends on Time Spent attribute
- create a work item and update Time Sheet entries (which updates the Time Spent attribute value)

observed: the log shows 
!ENTRY com.ibm.team.rtc.common.scriptengine 1 0 2014-06-13 12:34:38.816
!MESSAGE LOG: 'someString'

--> the script gets called

Did you add some console.log to your js file?

0 votes

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
× 152

Question asked: Jun 12 '14, 10:29 a.m.

Question was seen: 4,364 times

Last updated: Jun 13 '14, 6:40 a.m.

Confirmation Cancel Confirm