It's all about the answers!

Ask a question

Customization Attribute

De'Shea Bennett (166) | asked Apr 10 '13, 6:10 p.m.
edited Apr 11 '13, 1:26 a.m. by Ralph Schoon (63.2k33646)

It seems like my js script is not being taken into account for the attribute even though i have set the task attribute as a calculated value for it's value.

The attribute never updates; please assist.

It seems like it's holding the value of an old script.

2 answers

permanent link
Don Yang (7.7k21110139) | answered Apr 11 '13, 1:34 a.m.
If you change a fixed value in the js script, then you need to go to Calculated Value's configuration and reload the js script and save it. After that, the value should be updated.
If this is not the case, please provide the details how to implement and in which scenario you expect the value should be updated.

De'Shea Bennett commented Apr 11 '13, 11:18 a.m.

I did a reload and save and the script calculated value is still not loading the value. Below is the script:

(function() {
    dojo.declare("com.example.ValueProvider", null, {
        getValue: function(attribute, workItem, configuration) {             var result= 5788;
        return result;         

It's very simple. I just want to test a very simple script.

The calculated values does not display 5788. It stays 0.

When I go to "Types and Attributes" tab, the calculated value is listed for the attribute I want.

Please help. Why isn't it changing the attibute value?

Don Yang commented Apr 11 '13, 7:42 p.m.

What version of RTC did you try with?
I can see the custom attribute value set to 5788 using your above script.
What I did is:
. Create a new calculated value attribute called Test and point the above script in Eclipse client
. In "Types and Attributes", under task, create a new string type of attribute: test
and see calculated value as Test
. In Task's workitem editor presentations's overview tab, add new presentation and select test, set kind as string, save it
. Create a new task work item and see 5788 is set to test.

Did you do the same and see the value set to 0 instead of 5788?

permanent link
Piotr Aniola (3.7k11738) | answered Apr 11 '13, 4:48 a.m.
Please make sure that the relevant property is set to true in advanced properties. The property name is "Enable process attachment scripts" and can be set in https://<host>:9443/ccm/

De'Shea Bennett commented Apr 11 '13, 11:20 a.m.

It is.   

Piotr Aniola commented Apr 12 '13, 4:33 a.m. | edited Apr 12 '13, 4:33 a.m.

I would suggest that you reproduce the problem (save the workitem that has the custom attribute that you expect to be updated), note the exact time, and look into ccm.log (possibly also jts.log) for any errors with a matching timestamp.

Ralph Schoon commented Apr 12 '13, 5:10 a.m.

As described in Lab 5 and in the JavaScript related logs are not in the application (ccm, jts) log files. They are the Eclipse client and server logs. The location is described in the links above.

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.