Uploaded image for project: 'Jira Server and Data Center'
  1. Jira Server and Data Center
  2. JRASERVER-16883

Custom Field "Number Field" is truncated to the 3rd decimal place

    XMLWordPrintable

Details

    • 3.13
    • 1
    • Severity 3 - Minor
    • Hide
      Atlassian Update – 16 November 2017

      Hi everyone,

      The issue has not collected enough votes, watches, comments or support cases during it's lifetime. In this sense overal interest in the reported problem is low.
      Jira team is focusing on bigger and more impactful issues at the moment and we are not likely to look at the current bug soon. Therefore I'm resolving the issue as Timed Out.

      Atlassian will continue to watch issue for the further updates, so please don't hesitate to share your feedback in the issue comments.

      Cheers,
      Ignat Alexeyenko
      Jira bugmaster.

      Show
      Atlassian Update – 16 November 2017 Hi everyone, The issue has not collected enough votes, watches, comments or support cases during it's lifetime. In this sense overal interest in the reported problem is low. Jira team is focusing on bigger and more impactful issues at the moment and we are not likely to look at the current bug soon. Therefore I'm resolving the issue as Timed Out . Atlassian will continue to watch issue for the further updates, so please don't hesitate to share your feedback in the issue comments. Cheers, Ignat Alexeyenko Jira bugmaster.

    Description

      Hello,

      whatever value is inserted in a Custom Field type "Number Field" the data will be correctly stored in the database as intended:

      centos02-jira=# SELECT * FROM customfieldvalue ;
        id   | issue | customfield | parentkey | stringvalue | numbervalue | textvalue | datevalue | valuetype 
      -------+-------+-------------+-----------+-------------+-------------+-----------+-----------+-----------
       10022 | 10000 |       10000 |           |             |     0.12345 |           |           | 
       10031 | 10020 |       10000 |           |             |    0.123456 |           |           | 
      

      but will be truncated to the 3rd decimal place on the issue screen.

      If the file atlassian-jira/WEB-INF/classes/templates/plugins/fields/view/view-number.vm is amended with a format string like so:

      #if ($value)
          $!numberTool.format("0000000000000000.000000", $value)
      #end
      

      the value will be displayed properly (note however that it will give an error if the encoding string contains '#' wich would be preferable as it would omit unnecessary '0's).

      The value will then be rendered truncated once again in the "edit issue" screen and if saved will overwrite the database with the wrong value. The responsible macro should be: /atlassian-jira/WEB-INF/classes/templates/plugins/fields/edit/edit-number.vm.

      Please let me know if you require further information

      Regards,
      Edoardo

      Attachments

        Issue Links

          Activity

            People

              fschmitz Felix Schmitz [Atlassian]
              ecausarano Edoardo Causarano [Atlassian]
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: