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 + " %" ; } }); })(); |
Be the first one to answer this question!
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.