Calculated value custom attribute dont work in Web UI
Alvaro Riera (40●2●14●18)
| asked Jan 17 '13, 3:28 a.m.
edited Apr 02 '13, 4:42 a.m. by Ralph Schoon (63.5k●3●36●46)
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
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!
Comments
Ayan Paul
commented Jan 17 '13, 4:38 a.m.
do you have any id for the custom attribute. use that instead of typename.
|
|
Ralph Schoon (63.5k●3●36●46)
| answered Jan 17 '13, 4:40 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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 Comments
Alvaro Riera
commented Jan 17 '13, 5:40 a.m.
Hi Ralph, i use Opera just to debug.
I forgot write that i have tried it in FF15, Chrome and IE 9.
Same result, scripts dont work.
Server is configured correctly all works in Eclipse and some other scripts runs ok in web UI but those calculated value dont.
Ty for your answers
|
Ralph Schoon (63.5k●3●36●46)
| answered Apr 02 '13, 4:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You say your logs are clear. Please note that the logs that show JavaScript are not ccm.log or jazz.log. Please see https://jazz.net/library/article/1093 for more details. Lab 5 talks about Java Script. The workshop has been verified with 4.x.
|
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.