It's all about the answers!

Ask a question

Calculated value script using for enumeration-based attribute


VK L (8177157159) | asked Feb 25 '13, 6:59 a.m.
edited Feb 25 '13, 8:49 a.m.
 Hi All,
             I have 2 custom enumeration attributes -> for e.g. probability and impact. I have a 3rd enumeration attribute whose value depends on the combination of these 2. I am getting a general loader error for the script. My script is:

<pre>
dojo.provide("com.ibm. workitems.providers.test"); 
dojo.require("com.ibm.team. workitem.api.common. WorkItemAttributes"); 
dojo.require("dojo.string"); 
(function() { 
var WorkItemAttributes= com.ibm.team.workitem.api. common.WorkItemAttributes; 
    dojo.declare("com.ibm. workitems.providers.test", null, { 
        getValue: function(attribute, workItem, configuration) { 
 var Prob = workItem.getValue("com.ibm. team.workitem.workItemType. risk.probability"); 
  var Imp = workItem.getValue("com.ibm. team.workitem.workItemType. risk.impact");
if (prob == "risk.probability.literal.l1" && imp = = "risk.impact.literal.l5")
   Var att = "WorkItemMeasurement.literal. l7"; 
return att;
         } 
  } 

    }); 

})();
</pre>

Please advise.

Thanks.


Comments
Ralph Schoon commented Feb 25 '13, 7:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Hi Vally, please consider to tidy up your post, I can hardly read anything there is too much clutter. For code you can use the [pre] tag around code.

One answer



permanent link
VK L (8177157159) | answered Feb 28 '13, 11:04 a.m.
 Hi All,
             This works. just a few syntax fixed and just used the complete attribute id for impact and probability to retrieve the values.

Thanks.

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.