Calculated value custom attribute dont work in Web UI
Hi, i have create some calculated value scripts and all are working well in Eclipse but not in Web UI.
Im working with CLM 4.0.1
My logs are clear so no errors of javascript.
An example of a basic script:
dojo.provide("com.example.SolicitanteCodigoTicket");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
dojo.declare("com.example.SolicitanteCodigoTicket", null, {
getValue: function(attribute, workItem, configuration) {
return "some string";
}
});
})();
Ok, i have debugged it with Opera and in lang.Runtime.js i can see that dojo.getObjet(typeName); returns undefined.
typeName's value is "com.example.SolicitanteCodigoTicket" so its ok.
"lang.Runtime.js"
dojo.mixin(com.ibm.jdojo.lang.Runtime, {
typeForName : function typeForName_$0(typeName) {
var ctor= dojo.getObject(typeName);
if (!ctor) {
loader.load_sync(typeName);
ctor= dojo.getObject(typeName);
}
if (ctor == null) {
throw new Error("Unknown type");
}
return ctor; // <-------- ctor calue is UNDEFINED
},
Any idea of how can i solve it please?
Tya!
4 answers
If you use Opera, you might want to try one of the supported Browsers instead. See the system requirements for what is supported.
See the Enactment workshop Lab 5 for more tips on JavaScript: https://jazz.net/library/article/1093
See the Enactment workshop Lab 5 for more tips on JavaScript: https://jazz.net/library/article/1093
Hi Ayan,
The error occurs in lang.Runtime.js i cant modify it, its internal from jdojo (com.ibm.jdojo.lang.Runtime).
The typeName's value "com.example.SolicitanteCodigoTicket" its ok cause is the class i have provided in my script: dojo.provide("com.example.SolicitanteCodigoTicket");
but dojo.getObject(typeName); returns undefined
Thank you anyway!