It's all about the answers!

Ask a question

Attribute customization - get STATE value in a Conditions JavaScript


Chen Ben ezra (41327) | asked Dec 13 '17, 7:16 a.m.

Hi,

I created a new Condition script , but for some reason when I'm trying to get the STATE value it's NULL.

This is my condition script:

dojo.provide("org.example.workitems.providers.requiredRouteCauseForIncident");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");

(function() {
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
var scriptname = "requiredRouteCauseForIncident";
var doDebug = true;

dojo.declare("org.example.workitems.providers.requiredRouteCauseForIncident", null, {
    matches: function(workItem, configuration) {  
        var type = workItem.getValue(WorkItemAttributes.TYPE);                                                                                   
  var state = workItem.getValue(WorkItemAttributes.STATE);    //3 = complete              
    debug("type = ###" + type + "###");      
  debug("state = ###" + state + "###"); 
     

  return false;  
  debug("End");
   

function debug(display){
if(doDebug){
console.log(scriptname+ "-" + display);
}
}
}
});
})();

In other scripts I get the STATE in the same way , but it's not a condition string .... 

Can you help me with this issue ?

Thanks :)

Chen

Be the first one to answer this question!


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