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

Customization Attribute

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.

0 votes



2 answers

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

1 vote

Comments

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

dojo.provide("com.example.ValueProvider");
(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?

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
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/admin#action=com.ibm.team.repository.admin.configureAdvanced

0 votes

Comments

It is.   

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.

As described in https://jazz.net/library/article/1093 Lab 5 and in https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Debugging_scripts 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.

1 vote

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: Apr 10 '13, 6:10 p.m.

Question was seen: 4,432 times

Last updated: Apr 12 '13, 5:10 a.m.

Confirmation Cancel Confirm