It's all about the answers!

Ask a question

The attribute is not modifiable RTC


Andres Felipe Gallego (111) | asked Jan 29 '16, 5:59 p.m.
Hi i have a problem in operation behavior configure "for element work" READ ONLY FOR CONDICION. But RTC say's 


in the test envionment work fine HELPME!! tks

RTC VER 5.0.2

this is the javascript.

dojo.provide("net.jazz.example.readonlyplanestimacion.Condition");
dojo.require("dojo.date");
dojo.require("dojo.date.stamp");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
var WorkItemAttributes = com.ibm.team.workitem.api.common.WorkItemAttributes;
   dojo.declare("net.jazz.example.readonlyplanestimacion.Condition", null, {
       matches: function(workItem, configuration){
       var lastmodify =  workItem.getValue(com.ibm.team.workitem.api.common.WorkItemAttributes.MODIFIED);
datefinal = new Date(lastmodify);
dateini = new Date(new Date());
var diffHours = (((dateini - datefinal) / (1000 * 60 * 60)).toFixed(1));
var state = workItem.getValue(com.ibm.team.workitem.api.common.WorkItemAttributes.STATE);
var actualValue = workItem.getValue("rm_tiempo_plan_rms");
if(state == "com.ibm.team.workflow.rm.state.s2" && actualValue != null && diffHours>48){
return true;
}else{
return false;
}
  }
    });
})();

Comments
Donald Nong commented Jan 31 '16, 6:32 p.m.

I don't understand. You want the attribute to be "read only", and now you cannot modify it - isn't it what you want?


Andres Felipe Gallego commented Feb 01 '16, 10:51 a.m.

  that is the problem the field don't have anny restriccion, in this moment the current vale is READ ONLY for "inner from atributes". an the problem is the test envionment is duplique or I thing so. other verificacion is necesary?


Andres Felipe Gallego commented Feb 01 '16, 10:56 a.m.

 add this coment: not i need the field have only read in state especific. but in the screen say the attribute is not modifiable thanks.

Be the first one to answer this question!


Register or to post your answer.