Attributes with script based calculated values - configuration
David Murphy (11●1●4●3)
| asked Apr 01 '13, 4:49 p.m.
edited Apr 02 '13, 3:51 a.m. by Ralph Schoon (63.5k●3●36●46) 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
|
2 answers
Ralph Schoon (63.5k●3●36●46)
| answered Apr 02 '13, 4:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Another thing you can try is.
You scrips should show up like in the image below.
Comments
David Murphy
commented Apr 02 '13, 11:05 a.m.
did this, but no luck
Ralph Schoon
commented Apr 02 '13, 11:11 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Is " Enable Process Attachment Scripts" set to true in the Advanced Properties of the CCM Server?
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.
David Murphy
commented Apr 10 '13, 10:17 a.m.
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?
Ralph Schoon
commented Apr 10 '13, 10:22 a.m.
| edited Apr 10 '13, 10:33 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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 .
Ralph Schoon
commented Apr 10 '13, 10:35 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Which is confusing, because your original script screenshot actually shows the correct statement to get the value.
David Murphy
commented Apr 10 '13, 5:37 p.m.
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
|
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. Comments
David Murphy
commented Apr 02 '13, 11:04 a.m.
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
David Murphy
commented Apr 02 '13, 3:20 p.m.
Krzysztof Kaźmierczyk
commented Apr 03 '13, 2:35 a.m.
Hi David,
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
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.