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

formatting workitem attribute value

Hi -

we use RTC 2.0.0.2 ifix4 server and eclipse client.

We have one custom attribute called "Grade". When user comes out of attribute..it should format with % symbol at the end of value. But below things i did is not working . help me out to fix the issue.

the process configuration source looks like below
<customAttributes category="com.ibm.team.workitem.workItemType.task">
<customAttribute id="grade" name="Grade" type="smallString"/>
</customAttributes>

<attributeDefinitions>
<attributeDefinition id="grade" name="Grade" type="smallString">
<dependsOn id="grade"/>
<valueProvider providerId="gradeValue"/>
</attributeDefinition>
</attributeDefinitions>


<configuration-data xmlns="http://com.ibm.team.workitem/providers" id="com.ibm.team.workitem.configuration.providers">
<valueProviders>
<valueProvider id="gradeValue" providerId="com.ibm.team.workitem.shared.common.internal.valueProviders.ScriptAttributeValueProvider" name="Formatting Percentage">
<script class="com.example.common.FormatPercentage"/>
<myGrade id="grade"/>
</valueProvider>
</valueProviders>
</configuration-data>


and the dojo script is written as below and added to links tab

dojo.provide("com.example.common.FormatPercentage");

(function() {


dojo.declare("com.example.common.FormatPercentage", null, {

getValue: function(attribute, workItem, configuration) {

var formatted = attribute.getValue();

return formatted + " %" ;
}

});

})();

0 votes


Be the first one to answer this question!

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: Sep 19 '10, 6:23 a.m.

Question was seen: 3,783 times

Last updated: Sep 19 '10, 6:23 a.m.

Confirmation Cancel Confirm