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

Calculated value script using for enumeration-based attribute

 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.

0 votes

Comments

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

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

Question asked: Feb 25 '13, 6:59 a.m.

Question was seen: 4,971 times

Last updated: Feb 28 '13, 11:04 a.m.

Confirmation Cancel Confirm