Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Attribute customization - get STATE value in a Conditions JavaScript

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

0 votes


Be the first one to answer this question!

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,125

Question asked: Dec 13 '17, 7:16 a.m.

Question was seen: 948 times

Last updated: Dec 13 '17, 7:16 a.m.

Confirmation Cancel Confirm