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

Problems with Calculated Attribute in RTC 3.0

I am trying to get the calculated attribute example working in RTC 3.0. I have followed the steps documented in Example 2: A value provider that calculates the 'Risk Exposure' but the Risk Exposure field in the editor doesn't do anything when I change the values of the Risk Probability and Risk Impact attributes.

I've copied the provided code and put it in a file called ExposureProvider.js in a folder called resources in Java project called com.example.common.ExposureProvider. I have added an attachment in the Links tab of the Project Area, specifying the local file location and the Attachment Path as /workitem/scripts/common/ExposureProvider.js
Having saved the project configuration, I have then touched and resaved the Process Configuration Source's XML as suggested at the end of the example.

This is the first time I have ever done any DOJO - does RTC need to be enable somehow? Or have I just managed to miss something obvious? Until I can get this working I can't attempt to work out how I'd get the things I really want to calculate (eg the age of a workitem).

Any help gratefully received.
Rachel

1

0 votes



One answer

Permanent link
To follow up this problem, in case someone else finds it useful:

I had originally missed the server configuration needed to use scripts deployed as process attachments. So I had to request the server admin add the following line to the server installation's teamserver.properties (typically found in the .../server/conf/jazz directory):

'com.ibm.team.workitem.process.scripts.enabled=true' 


However, the calculated attributes still didn't work!

It turns out that there is a change in the RTC api between 2.x and 3.x, so the dojo script class com.example.common.ExposureProvider needed to be altered. The calculated attribute example has now been updated to include the difference required between RTC 2.x and RTC 3.x:

// Use the following two lines for 2.0.0.2

var impactAttribute=configuration.getChild("impactAttribute").id;
var probabilityAttribute=configuration.getChild("probabilityAttribute").id;

// Use the following two lines for 3.x
var impactAttribute= configuration.getChild("impactAttribute").getIdentifier();
var probabilityAttribute=configuration.getChild("probabilityAttribute").getIdentifier();


Hope that helps
Rachel

I am trying to get the calculated attribute example working in RTC 3.0. I have followed the steps documented in Example 2: A value provider that calculates the 'Risk Exposure' but the Risk Exposure field in the editor doesn't do anything when I change the values of the Risk Probability and Risk Impact attributes.

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

Question asked: Dec 07 '10, 8:27 a.m.

Question was seen: 7,839 times

Last updated: Dec 07 '10, 8:27 a.m.

Confirmation Cancel Confirm