Get a value from attributes to be used in a script in eclipse editior
Hello I'm trying to write a custom script for the attribute customization that uses a custom risk attribute and the built in severity to determine the priority in a defect work item. I am able to retrieve the label and value from my risk attribute find but not the built in severity or priority. If I use the get value command with those two attributes nothing outputs to the log, if I use the get label the console just returns null. I need to take both values in in order to compare them to define my priority.
Here is the command I'm using for the script to log the values in the console log.
try{
var risk = workItem.getLabel("risk");
console.log(risk);
var severity = workItem.getValue("com.ibm.team.workitem.attribute.severity");
console.log(severity);
var priority = workItem.getValue("com.ibm.team.workitem.attribute.priority");
console.log(priority);
}
Thanks for any help