It's all about the answers!

Ask a question

"Unable to load" Script Based Calculated Value


Thibault Leclercq (9011013) | asked Jun 24 '11, 8:43 a.m.
edited Mar 19 '13, 12:39 p.m. by Ralph Schoon (63.1k33646)
Hi,

On 3.0 iFix01 I have been using script based calculated value to generate the content of a field from the content of some other fields, which worked fine.

Since the upgrade to 3.0.1, I get an error message when RTC tried to calculate the value (i.e. each time I enter a character in the fields used for the value calculation):

Error: Unable to load /ccm/web/_js/?exclude=A~C~D~E~F~G~H~I~J~K~L~P~S~U~X~Y~Z&include=com.situation.script.generateTestValue.js&_proxyURL=%2Fccm&locale=en-us status:500


Note that com.situation.script.generateValue.js is the name of the script used to calculate the value.

What changed between 3.0 iFix01 and 3.0.1?

Accepted answer


permanent link
Thibault Leclercq (9011013) | answered Jun 27 '11, 11:23 a.m.
Problem solved: the upgrade to 3.0.1 had reset the "process attachment scripts" setting back to disabled (default value). This setting simply needed to be re-enabled.
Ralph Schoon selected this answer as the correct answer

7 other answers



permanent link
Sachin Nairy (5111220) | answered Dec 31 '11, 7:51 a.m.
Problem solved: the upgrade to 3.0.1 had reset the "process attachment scripts" setting back to disabled (default value). This setting simply needed to be re-enabled.


Dear tleclercq,

I am trying to write a script to add two numbers from to attribute and placing in to another, if you have any script place provide me.

i tried some script using below link.
https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Configuring_a_script_based_custo

dojo.provide("calval");

dojo.require("int1");
dojo.require("int2");
(function() {
dojo.declare("calval", null, {

getValue: function(attributeId, workItem, configuration) {
var prva1= configuration.getChild("prva1").identifier();
var prva2= wconfiguration.getChild("prva2").identifier();
var prva3= configuration.getChild("prva3").identifier();
var item1=this._getLastIntSegment(workItem.getValue(prva1));
var item2=this._getLastIntSegment(workItem.getValue(prva2));
var item3=this._getLastIntSegment(workItem.getValue(prva3));
item3 = item1*item2*10;
return item3;
},
_getLastIntSegment: function(identifier)
{
if(identifier !=null){
var lastSeparator= identifier.lastIndexOf('.');
var numberString= identifier.substring(lastSeparator+1);
return parseInt(numberString, 10);
}
return -1;
},
});
})();

permanent link
Ewan Grantham (6) | answered Dec 31 '11, 11:46 a.m.
Problem solved: the upgrade to 3.0.1 had reset the "process attachment scripts" setting back to disabled (default value). This setting simply needed to be re-enabled.


Interesting. I didn't think it would normally reset values when you were just upgrading. Did you notice any other settings change, or just this one?

permanent link
Alicia McPherson (7131418) | answered May 21 '12, 10:49 a.m.
Hi,

I added com.ibm.team.workitem.process.scripts.enabled=true to the teamserver.properties file but still getting the error below.

I'm using RTC 3.0.1.2.

Error: Unable to load /ccm/web/_js/?exclude=B~C~D~E~F~G~H~I~J~K~L~M~N~O~P~Q~R~S~T~U~V~W~X~Y~Z~a~b~c~d~e~f&
include=org.example.CreatorIsOwnerValidator.js&_proxyURL=%2Fccm&locale=en-us status:500

permanent link
Gabriel Enriquez (3463) | answered May 21 '12, 8:46 p.m.
JAZZ DEVELOPER
Is this for a "Calculated Values" customization? Can you provide any more details on how to reproduce the error?
I tested a very basic script for this type of customization on 3.0.1.2 and it worked.

Hi,

I added com.ibm.team.workitem.process.scripts.enabled=true to the teamserver.properties file but still getting the error below.

I'm using RTC 3.0.1.2.

Error: Unable to load /ccm/web/_js/?exclude=B~C~D~E~F~G~H~I~J~K~L~M~N~O~P~Q~R~S~T~U~V~W~X~Y~Z~a~b~c~d~e~f&
include=org.example.CreatorIsOwnerValidator.js&_proxyURL=%2Fccm&locale=en-us status:500


--
Gabriel Enriquez, IBM Rational, Tracking & Planning

permanent link
Alicia McPherson (7131418) | answered May 22 '12, 9:48 a.m.
It was a "validators" customization. I deleted the attribute and tried again. It seems to be working now. Thanks!

Is this for a "Calculated Values" customization? Can you provide any more details on how to reproduce the error?
I tested a very basic script for this type of customization on 3.0.1.2 and it worked.

Hi,

I added com.ibm.team.workitem.process.scripts.enabled=true to the teamserver.properties file but still getting the error below.

I'm using RTC 3.0.1.2.

Error: Unable to load /ccm/web/_js/?exclude=B~C~D~E~F~G~H~I~J~K~L~M~N~O~P~Q~R~S~T~U~V~W~X~Y~Z~a~b~c~d~e~f&
include=org.example.CreatorIsOwnerValidator.js&_proxyURL=%2Fccm&locale=en-us status:500


--
Gabriel Enriquez, IBM Rational, Tracking & Planning

permanent link
Matthias Buettgen (23612331) | answered Nov 22 '12, 1:10 p.m.
Hi there,

I'm currently facing the same problem described here with a Calculated Value. It works as expected in the Eclipse Full Client. When it's executed on the web I got the above mentioned error message.

It's really strange because I've implemented the same script in another project area on the same server and in that project area it works as expected.

Any idea how this could happen?

It's actually really frustrating because I don't have an idea how this could happen.

Many thanks.

Regards
Matthias

permanent link
Andrew Trobec (49712144139) | answered Mar 19 '13, 10:53 a.m.
Hello,

I am having a similar problem with RTC 3.0.1.1.  When adding a new Calculated Value script, suddenly a Validator script will give the error:

Error: Unable to load /ccm/web/_js/?exclude=B~C~E~F~G~H~I~J~K~L~P~Q~R~S~T&include=<script.js>&_proxyURL=%2Fccm&locale=en-us status:500

for absolutely no reason.  It worked perfectly and then suddenly couldn't be found.  In the Eclipse client I don't have any issues.

It's very frustrating.

Has anybody found a solution?

Regards,

Andrew

Comments
Ralph Schoon commented Mar 19 '13, 12:42 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Not sure what is wrong here. I would suggest to use the eclipse client to save the script somewhere. Go to the Links tab of the process editor, locate the script in the attachments, delete it, save and upload it again. If that does not fix the problem I would check for other possible issues in the logs and if nothing helps, open a PMR or work item.


Andrew Trobec commented Mar 22 '13, 7:45 a.m.

Thanks Ralph, I found this to be very useful!  Replacing the script under the Links section seems to have done the trick!


Regards,

Andrew


Ralph Schoon commented Mar 22 '13, 7:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Glad I could help.

Your answer


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