Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-41907

Logging work with floating point value "4.1h" leads to wrong time display (4h 5m)

      When I try to log work with the time spent value of "4.1h" I expect the display of the resulting worklog to show 4h 6m. But due to the nature of floating point multiplications in java this is not the case.In my case the JiraDurationUtils class multiplies the long value 3600 by the double value 4.1 which results in something like 14759.9999~ (usually one expects 14760).

      This value (14759) is then stored in the database entry for this worklog and is displayed in the frontend as 4h 5m. While this only steals one minute, it might add up if I have multiple worklogs like that. Am I doing something wrong here?

      Is this behaviour known and if so are there any plans to fix this? I was only able to reproduce it with the value "4.1" but there might be more of these cases.

      Thanks

        1. picture1.png
          picture1.png
          37 kB
        2. picture2.png
          picture2.png
          3 kB

            [JRASERVER-41907] Logging work with floating point value "4.1h" leads to wrong time display (4h 5m)

            Jakub Cegiel made changes -
            Resolution New: Won't Fix [ 2 ]
            Status Original: Needs Triage [ 10030 ] New: Closed [ 6 ]

            Thank you for taking the time to file and comment on this issue. Feedback like yours helps us release valuable Jira features that solve problems for the greater customer base. To that end, we aim to keep our issues up-to-date so that they accurately reflect current customer needs.

            Because there has been no customer activity on this issue in a long time, we have marked it as closed. If you still feel that this issue is still relevant to your needs, please feel free to raise a new issue and link to this one.

            Jakub,

            Jira DC Quality Engineering

            Jakub Cegiel added a comment - Thank you for taking the time to file and comment on this issue. Feedback like yours helps us release valuable Jira features that solve problems for the greater customer base. To that end, we aim to keep our issues up-to-date so that they accurately reflect current customer needs. Because there has been no customer activity on this issue in a long time, we have marked it as closed. If you still feel that this issue is still relevant to your needs, please feel free to raise a new issue and link to this one. Jakub, Jira DC Quality Engineering
            Bugfix Automation Bot made changes -
            Minimum Version New: 6
            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2827502 ] New: JAC Bug Workflow v3 [ 2920265 ]
            Owen made changes -
            Symptom Severity Original: Minor [ 14432 ] New: Severity 3 - Minor [ 15832 ]
            Owen made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v7 - Restricted [ 2577813 ] New: JAC Bug Workflow v2 [ 2827502 ]
            Status Original: Open [ 1 ] New: Needs Triage [ 10030 ]
            Ignat (Inactive) made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v6 - Restricted [ 1541742 ] New: JIRA Bug Workflow w Kanban v7 - Restricted [ 2577813 ]
            Confluence Escalation Bot (Inactive) made changes -
            Labels New: affects-server
            jonah (Inactive) made changes -
            Symptom Severity New: Minor [ 14432 ]
            Owen made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v6 [ 797283 ] New: JIRA Bug Workflow w Kanban v6 - Restricted [ 1541742 ]

              Unassigned Unassigned
              f623528f4871 jtw-ic
              Affected customers:
              7 This affects my team
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: