Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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)

0 votes


Accepted answer

Permanent link
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

2 votes

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

Permanent link
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.

0 votes

Comments

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

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Jan 08 '14, 4:29 a.m.

Question was seen: 6,162 times

Last updated: Jan 08 '14, 6:38 a.m.

Confirmation Cancel Confirm