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

Attributes with script based calculated values - configuration

I am getting the following error and I presume my script needs to be somewhere it is not as indicated by the relative path in the error message.  Where is that?  I don't have easy access to my server so I am not familiar with the directory structure, but if I knew where to place my script I could put it there.

!ENTRY com.ibm.team.rtc.common.scriptengine 2 0 2013-04-01 16:21:43.224
!MESSAGE unable to find file: ./../com/ca/tools/Creator-valueProvider.js

0 votes



2 answers

Permanent link
Another thing you can try is.

  1. Check that Process Attachment Scripts are enabled.
  2. Open the Project Area Editor in Eclipse and try to locate your script in the Links Tab in the Attachments section.
  3.  Delete the scripts
  4. Upload them from the Workitem Customization section

You scrips should show up like in the image below.

1 vote

Comments

did this, but no luck

Is " Enable Process Attachment Scripts" set to true in the Advanced Properties of the CCM Server?
Upload one of the example scripts for a string attribute e.g. calculated value.

Consider running through Lab 5 of https://jazz.net/library/article/1093 .

Javascript example that does now work All I am trying to do is capture the Created By and Creation Date of a work item in another field. I tried using the example javascript from article 1003 and received NULL so that script example does not work. I added the debug/log statement, the only change.

Well, I an not the JavaScript expert, but I would consider If(creationDate) not to be a condition, especially since creationDate is a string value. So I'd suggest trying if(creationDate!=null) or if(creationDate!="") if you ever want to reach the statements in the if clause.

I have the javascript behaving properly now, but it is returning "creationDate" and not the actual value.  My return statement looks like... 

      return WorkItemAttributes.CREATION_DATE;

any ideas?

David, you should really at least read https://jazz.net/wiki/bin/view/Main/AttributeCustomization and consider running through Lab 5 of https://jazz.net/library/article/1093 .

Right now you are returning the constant that would be used in a workItem.getValue(WorkItemAttributes.CREATION_DATE) to get the value you are looking for.

Which is confusing, because your original script screenshot actually shows the correct statement to get the value.

I now have my javascript returning a GMT formatted date string.  I want to format it differently, e.g., Apr 10, 2013 5:36 PM

Any ideas?

showing 5 of 8 show 3 more comments

Permanent link
Hello David,
You do not need to put manually any file to the server. It will be uploaded automatically.

I believe, that you have this error message in your .log file for Eclipse client. When exactly does this message appear in the log? When the value need to be used?
I believe, that it is worth of checking what is error message in ccm.log. You can use RSS feed to browse it if you do not have an access to the server.

You can try reloading and saving calculated value script again.

0 votes

Comments

 I get this immediately after the creation of a work item, ie. after I click OK to the type dialog.

Don't know how to setup the RSS feed for CCM.log

RTC Error Log

Hi David,
Try this one to see your ccm.log as a feed: https://example.com:9443/ccm/events

I would rather suggest reading https://jazz.net/library/article/1093 and discover where the logs are really located (ccm.log does not provide ANY information about executing JavaScript at all), make sure scripting is enabled and try a basic downloaded example script.

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
× 6,121

Question asked: Apr 01 '13, 4:49 p.m.

Question was seen: 5,214 times

Last updated: Apr 10 '13, 5:37 p.m.

Confirmation Cancel Confirm