Attribute Customization script can't be executed
Hi RTC Experts:
I had Enable Process Attachment Scripts in RTC server, but the script can't be executed ,and the script works well on my pilot RTC server that installed by myself , and the error shows below.
In the error log, /mcd_ornot.js isn't exist at all, this script already be removed, and my new script can't run.
What's the problem, does it shows script function still isn't t enabled?
Script always is stored in /workitem/scripts/common, where can I find this folder?
Thanks so much!
-------------------------------------Error log------------------------------------------------------------------
!ENTRY com.ibm.team.workitem.common 4 0 2014-01-08 17:20:10.503
!MESSAGE Error invoking value provider 'com.ibm.team.workitem.valueproviders.VALUE_PROVIDER._VwwWAGCvEeOVc5plItJR5w'
!STACK 0
com.ibm.team.repository.common.TeamRepositoryException: Process Attachment /workitem/scripts/common/mcd_ornot.js does not provide a dojo type
at com.ibm.team.workitem.shared.common.internal.ProcessAttachmentScriptTypeResolver.initializeProjectAttachmentScripts(ProcessAttachmentScriptTypeResolver.java:65)
at com.ibm.team.workitem.shared.common.internal.ScriptEnvironmentManager.updateCache(ScriptEnvironmentManager.java:51)
I had Enable Process Attachment Scripts in RTC server, but the script can't be executed ,and the script works well on my pilot RTC server that installed by myself , and the error shows below.
In the error log, /mcd_ornot.js isn't exist at all, this script already be removed, and my new script can't run.
What's the problem, does it shows script function still isn't t enabled?
Script always is stored in /workitem/scripts/common, where can I find this folder?
Thanks so much!
-------------------------------------Error log------------------------------------------------------------------
!ENTRY com.ibm.team.workitem.common 4 0 2014-01-08 17:20:10.503
!MESSAGE Error invoking value provider 'com.ibm.team.workitem.valueproviders.VALUE_PROVIDER._VwwWAGCvEeOVc5plItJR5w'
!STACK 0
com.ibm.team.repository.common.TeamRepositoryException: Process Attachment /workitem/scripts/common/mcd_ornot.js does not provide a dojo type
at com.ibm.team.workitem.shared.common.internal.ProcessAttachmentScriptTypeResolver.initializeProjectAttachmentScripts(ProcessAttachmentScriptTypeResolver.java:65)
at com.ibm.team.workitem.shared.common.internal.ScriptEnvironmentManager.updateCache(ScriptEnvironmentManager.java:51)
Accepted answer
You can find the the attachments in the Links section (Lower right) of the Project Area editor in Eclipse.
Since I don't know how your script is named, which version of RTC you use, on which environment that fails (compared to your pilot) etc. I can not say more about the error message. I would assume a malformed file that is missing some dojo declaration or a mismatch of class names etc.
Since I don't know how your script is named, which version of RTC you use, on which environment that fails (compared to your pilot) etc. I can not say more about the error message. I would assume a malformed file that is missing some dojo declaration or a mismatch of class names etc.
Comments
Thanks!
I removed the incorrect js file:mcd_ornot.js from links Attachments , then other script works. Does it mean ,the script in the attachment will running always each time , even those some script don't related some work item?
You should be able to remove a script by removing the customization. I have seen that failing some times though. If customization is configured, the scripts will be run when needed.
- Avoid using same script file names when uploading files
- Create a good naming convention for scripts and classes to make it easier to tell what is where
- If a script is configured for an attribute, it will run for any work item that has this attribute
See https://jazz.net/library/article/1093 Lab 5 for more information. The first sections discuss important considerations.
One other answer
looking at the error
Process Attachment /workitem/scripts/common/mcd_ornot.js does not provide a dojo type
I would review the script for
a. dojo.provide to match the dojo.declare statements
Can you review the provide statement to see if it provides exactly the same class as declared in the dojo.declare statement
b. syntax of the dojo.provide statement for its validity
and
c. that this exact name was not used in any other scripts dojo.provide or dojo.declare statements.
hope this helps.
and like Raplh mentioned, if you are looking to find the script, you have to look at the project configuration in eclipse client > links tab.
I have never been able to locate them directly in the file system as I believe they are maintained in the repository not the file system.
Process Attachment /workitem/scripts/common/mcd_ornot.js does not provide a dojo type
I would review the script for
a. dojo.provide to match the dojo.declare statements
Can you review the provide statement to see if it provides exactly the same class as declared in the dojo.declare statement
b. syntax of the dojo.provide statement for its validity
and
c. that this exact name was not used in any other scripts dojo.provide or dojo.declare statements.
hope this helps.
and like Raplh mentioned, if you are looking to find the script, you have to look at the project configuration in eclipse client > links tab.
I have never been able to locate them directly in the file system as I believe they are maintained in the repository not the file system.