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

Calculated value customization does not fire "on save".

I created a calculated value customization and associated it with an attribute that is of type "Enumeration".
I used the default template (Fill in example) offered by RTC to create the customization an use it without changes.
I followed the instructions described here to activate and go into Debug mode.
According to the wiki the script of a calculated value is triggered on save.
However this does not happen.
The only way to trigger my event is to create a dependency between the calculated attribute and some other and try to change the value of the dependent attribute.
Only then does the event fire and my break point gets reached.
I tried establishing a dependency with the State attribute (which is the motivation for this calculated value) but still nothing.

I tried to debug on Firefox and Chrome.
I noticed that both browsers give me the following message on the console 3 times when I press "Save":
[Value Conversion]: could not interpret [object Object] as a string. Returning as empty string.
at the file: com.ibm.team.workitem.web.internal.model.types.StringAttributeType, line 74

Also, after the first save, every time I change the State (without pressing save), I get the following warning:
[New API Debug] Attribute changed event emitted on a non-chnaged attribute.
at the file com.ibm.team.workitem.web.mvvm.model.AttributeModel, line 179

I don't know if these messages are relevant but maybe they can give you a hint.

I run RTC 4.0.

I thank you in advance.
Giorgos

1 vote

Comments

You'd better post your script here, otherwise it's almost impossible to say what's wrong with it.


Accepted answer

Permanent link
If you have read some related posts on this forum, you will notice it has been mentioned many times that the script is executed on both the client side (browser) and the server side. The first two cases mentioned in the Wiki where the calculated script is executed are on the server side, so you cannot debug it using a browser. You will need to use the "console.log" technique for this purpose. And you can find the output in the CCM/RTC eclipse log file (server/tomcat/work/Catalina/localhost/ccm/eclipse/workspace/.metadata/.log). The third case is on the client side and that is what you have seen.

You should also make sure that there is no error in your script, and those errors are not a good sign.
Georgios Antonopoulos selected this answer as the correct answer

0 votes

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,131

Question asked: Oct 19 '15, 11:55 a.m.

Question was seen: 3,118 times

Last updated: Oct 19 '15, 9:08 p.m.

Confirmation Cancel Confirm