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