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.


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:


(function() {
var 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;  

function debug(display){
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 :)


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.