How to format Number field to Dollar amount?

Bradley Kyer
Contributor
July 31, 2011

Is there a straight forward way in JIRA to format a Custom Field to represent monet? By straight forward I mean an existing setting, or validate rule as opposed to extending a plugin or addin / changing base code or any such thing.

The custom field type is "Number Field - A custom field that stores and validates (floating point) input". Honestly, I have no idea if this is generic to JIRA or if my predecessor custom created it. Anyway, users would like to enter 12000 and have it be formatted to either "$12,000" or just "12,000".

2 answers

1 accepted

0 votes
Answer accepted
Dennis Kromhout van der Meer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 31, 2011

Hi Brad, unfortunately there is no straight forward way, but the best think in this situation is to create new custom field type, which shouldn't be too difficult. Please view our documentation here: How to create a new Custom Field Type.

0 votes
Fabrice Porcher July 31, 2011

Not sur to understand your problem ?!?

your users input "12.000"

Your users want to see either $12,000 or just 12,000

--> so the point should be converted to comma ?

Did you check the renderer pattern ?

  • templates/plugins/fields/view/view-number.vm
  • templates/plugins/fields/edit/edit-number.vm
  • templates/plugins/fields/xml/xml-number.vm

?

What is you JVM language (catalinou.out at the jira startup) ?

  • user.language
  • user.country

Suggest an answer

Log in or Sign up to answer