It's all about the answers!

Ask a question

How to recalculate Script Based Calculated Values for all WI after changing the script


0
1
Ruben Laguna (1536) | asked May 03 '13, 9:29 a.m.
edited May 03 '13, 9:39 a.m.
After uploading a new script for a Script Based Calculated Value, I can see that the change only takes effects when I open a Work Item and save it again.

Is there anyway to forced RTC to recalculate this attribute for all Work Items?

3 answers



permanent link
sam detweiler (12.5k6195201) | answered May 03 '13, 9:37 a.m.
no.. these scripts are only run on workitem saves

permanent link
Ruben Laguna (1536) | answered May 03 '13, 9:47 a.m.
What I did so far to recalculate the values is:

1) make the Custom Attribute dependent on "tags". Edit Custom Attribute / Dependencies
2) Make a query that returns all Work items and display column tags
3) Select all in the search view
4) Right click on the tags column and select "Change tags"
5) Add tag "recalculate_values"

That will modify all work items with a new tag and trigger the recalculation of the calculated value.

But still is a non optimal solution.

Comments
sam detweiler commented May 03 '13, 9:54 a.m.

right.. YOU wrote a process to 'save' all the affected workitems, to cause the scripts to run.


permanent link
Ralph Schoon (63.5k33646) | answered Jun 27 '13, 8:20 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
It might be an idea to use this code and run it from a commandline: http://rsjazz.wordpress.com/2012/11/19/using-an-expression-to-synchronize-attributes-for-work-items-of-a-specific-type/ I am not sure it it would be sufficient to just run synchronize. Maybe you have also to modify a value to trigger the calculation.

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.