CLM 6.0.2: Calculated Value - Cannot load the script class
I have the following scenario:
Attribute A (single pick enum, strings): Value1, Value2, Value3
Attribute B (single pick enum, strings): Value4, Value5, Value6
Attribute C (boolean): default false
I am trying to write a calculated value script for Attribute C:
If Atribute A == Value1 AND AttributeB == Value4
AttributeC = true
But I can't get the script to load and am getting the following errors:
Developer Window (Chrome):
Problems executing value provider for {0}: Cannot load the script class - com.mycom.scriptName
ccm.log:
com.ibm.team.rtc.common.scriptengine.UnknownTypeException: 'com.mycom.scriptName' is not a constructor
Below is my code:
dojo.provide("com.mycom.scriptName");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
//var doDebug = true;
var scriptname = "scriptName";
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
var attribC= false;
dojo.declare("com.mycom.scriptName", null, {
console.log("Start");
getValue: function(attribute, workItem, configuration) {
var attribA= workItem.getValue("com.mycom.AttributeA");
var attribB = workItem.getValue("com.mycom.AttributeB");
if (attribA == "com.mycom.enum.AttributeA.literal.l2" && attribB == "com.mycom.enum.AttributeB.literal.l2") {
attribC = true;
}
return attribC ;
}
});
})();