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

Why does my script run only once in calculated values?

dojo.provide("com.calculated.testingIteration");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");

(function() {
var WorkItemAttributes = com.ibm.team.workitem.api.common.WorkItemAttributes;
    dojo.declare("com.calculated.testingIteration", null, {

        getValue: function(attribute, workItem, configuration) {

          var state = workItem.getLabel(WorkItemAttributes.STATE);
          var count = workItem.getValue(attribute);
          if(state == "Development") {
               return 3;
          } else {
               return 2;
           }
       }
    });
})();

I wrote a calculated value script that returns 3 if the state = "Development" or else return 2 otherwise. I'm expecting the attribute to change to 2 when the state changes but it looks like it only reads the script when I refresh the page. This worked development testing but when moved to production it stopped working and I'm not sure why. Can someone help?

0 votes



One answer

Permanent link

Showing your script will not get you the answer. You need to understand how the Calculated Value script is triggered - it was clearly stated in the document.
https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Script_based_calculated_values

A similar question (probably more) was asked in the past.
https://jazz.net/forum/questions/202887/rtc-calculated-value-triggering-for-any-change-in-status-or-attribute

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
× 10,953

Question asked: Jan 26 '17, 1:17 p.m.

Question was seen: 1,558 times

Last updated: Jan 29 '17, 11:29 p.m.

Confirmation Cancel Confirm