It's all about the answers!

Ask a question

Attribute Customization script can't be executed


Julie bai (356) | asked Jan 08 '14, 4:29 a.m.
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)

Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered Jan 08 '14, 4:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.
Julie bai selected this answer as the correct answer

Comments
Julie bai commented Jan 08 '14, 6:23 a.m.

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?


Ralph Schoon commented Jan 08 '14, 6:38 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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



permanent link
Dinesh Kumar B (4.1k413) | answered Jan 08 '14, 5:35 a.m.
JAZZ DEVELOPER
edited Jan 08 '14, 5:37 a.m.
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.

Comments
Julie bai commented Jan 08 '14, 6:25 a.m.

Thanks so much! It's helpful especially for new starter such as me:)

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.