Unable to get calculated attribute working
I followed the example on the Wiki.
Under <data>, I have: <configuration-data xmlns="http://com.ibm.team.workitem/providers" id="com.ibm.team.workitem.configuration.providers"> under <configuration-data xmlns="http://com.ibm.team.workitem/workitemTypes" id="com.ibm.team.workitem.configuration.workItemTypes">, I have: <customAttributes category="com.ibm.team.workitem.workItemType"> under <attributeDefinitions>, I have <attributeDefinition id="riskExposure" name="Risk Exposure" readOnly="true" type="long"> under the presentations section, I have: <section id="com.ibm.team.workitem.section.details"> under the enumerations, I have: <enumeration attributeTypeId="risk.probability"> I uploaded the ExposureProvider.js sample to the attachments for the project area with the path /workitem/scripts/common/ExposureProvider.js However, when I create a new Task and select a value for Risk Impact and Risk Probability, the exposure does not get updated. Saving doesn't change that. Am I missing something, or is there a way to debug why this is not working? Thanks in advance. |
6 answers
Some more information. I've found in the jazz.log the error below. Any ideas how to debug this?
2010-08-27 14:16:59,107 ERROR com.ibm.team.workitem.common - Error invoking value provider 'exposure' org.mozilla.javascript.JavaScriptException: (loader.js#354) at org.mozilla.javascript.gen.c159._c18(loader.js:353) at org.mozilla.javascript.gen.c159.call(loader.js) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834) at org.mozilla.javascript.gen.c159.call(loader.js) at org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1831) at com.ibm.team.rtc.common.scriptengine.util.JSUtils.dojoRequire(JSUtils.java:123) ... |
Still more information:
In the server/tomcat/work/Catalina/localhost/jazz/eclipse/workspace/.metadata/.log file there is this error: !ENTRY com.ibm.team.rtc.common.scriptengine 4 0 2010-08-27 15:00:20.388 It doesn't look like it uploaded the ExposureProvider.js file. The only place this file exists on the drive is in the directory I uploaded from. Any idea where this file should be located in the server and why it doesn't upload? Thanks. |
Solved. I was missing the teamserver.properties update.
|
Hi,
Is there a way to add a drop down text attribute? Is javascript the way to populate the dropdown? I know exactly how to script in CQ. Can you post how to do this in RTC work items? Thanks Solved. I was missing the teamserver.properties update. |
Solved. I was missing the teamserver.properties update. Hi, Even i face the same error as shown above. Could you please tell me what changes have you done to the teamserver.properties file in ccm ? I tried with Dcom.ibm.team.repotools.rcp.allowInvalidBundles=true com.ibm.team.workitem.process.scripts.enabled=true Still it doesn't seem to recognize the custom advisor. |
Millard Ellingsworth (2.5k●1●24●31)
| answered May 22 '12, 12:06 p.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER Solved. I was missing the teamserver.properties update. Hi, Even i face the same error as shown above. Could you please tell me what changes have you done to the teamserver.properties file in ccm ? I tried with Dcom.ibm.team.repotools.rcp.allowInvalidBundles=true com.ibm.team.workitem.process.scripts.enabled=true Still it doesn't seem to recognize the custom advisor. Hi, Pavithra. Could you please start a new thread with details about your issue? Adam's issue seemed to only be missing the property to enable scripts to work. If updating that didn't fix your issue, it may be something else (and we'll need more details to be able to help). |
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.