Hi everyone
i am trying to customize an enumeration attribute named PRIORITY on the basis of another attribute named SEVERITY. the script is as follows
dojo.provide("com.example.ValueProvider");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
var WorkItemAttributes=com.ibm.team.workitem.api.common.WorkItemAttributes;
dojo.declare("com.example.ValueProvider", null, {
getValue: function(attribute, workItem, configuration) {
var sev = workItem.getValue("com.ibm.team.workitem.attribute.severity");
console.log("\n" +sev+"\n");
return this.valuez(sev);
},
checkforLow:function(val)
{
if((sev == "severity.literal.l1") || (sev == "severity.literal.l2") || (sev == "severity.literal.l3"))
{return true;}
else
{return false;}
},
checkforMedium:function(val)
{
if((sev == "severity.literal.l4") || (sev == "severity.literal.l5"))
{return true;}
elsel
{return false;}
},
checkforHigh:function(val)
{
if(sev == "severity.literal.l6")
{return true;}
else
{return false;}
},
valuez:function(sev)
{
if(checkforLow(sev))
{
return "Low";
}
else if (checkforMedium(sev))
{
return "Medium";
}
else if (checkforHigh(sev))
{
return "High";
}
}
});
})();
but i can't get any effect on the rtc system. on checking log file, i got the error as :-
ERROR com.ibm.team.workitem.common - Error invoking value provider 'AttributeCalculator' associated with the attribute 'Priority' in the project area with id '_FaqaQCNTEeik2I86tKZHPA'. You can link to the project area definition using a URL similar to https://thehostname:9443/jazz/process/project-areas/_FaqaQCNTEeik2I86tKZHPA, where the host name, port and jazz context are configured for your installation.