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

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!

0 votes



4 answers

Permanent link
 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!

1 vote

Comments

do you have any id for the custom attribute. use that instead of typename.


Permanent link
instead of name try with id of that field

0 votes


Permanent link
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

0 votes

Comments

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


Permanent link
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.

0 votes

Your answer

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
× 10,935
× 152
× 42
× 34

Question asked: Jan 17 '13, 3:28 a.m.

Question was seen: 7,394 times

Last updated: Apr 02 '13, 4:43 a.m.

Confirmation Cancel Confirm