"Unable to load" Script Based Calculated Value
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):
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?
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
7 other answers
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;
},
});
})();
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?
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
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
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.
--
Gabriel Enriquez, IBM Rational, Tracking & Planning
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
It was a "validators" customization. I deleted the attribute and tried again. It seems to be working now. Thanks!
--
Gabriel Enriquez, IBM Rational, Tracking & Planning
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
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
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
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
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
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.
Thanks Ralph, I found this to be very useful! Replacing the script under the Links section seems to have done the trick!
Regards,
Andrew
Glad I could help.