Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-80440

Jira REST API: Setting the original estimate to zero creates a very high "work ratio" (likely division by zero)

    XMLWordPrintable

Details

    Description

      Issue Summary

      We have noticed that, if you call the edit issue endpoint with a payload like this …

      {
          "fields": 
          {
              "timetracking": {
                  "originalEstimate": "0m",
                  "remainingEstimate": "2d",
              }
          }
      }
      

      the issue then has an extremely high work ratio field value - e.g., 9223372036854776000%. I suspect that there’s ax division by zero somewhere.

      In Bento, this doesn’t happen, however Bento uses another, non-public endpoint for this update.

      This is reproducible on Data Center: no

      Steps to Reproduce

      1. Add timetracking field to screen of an issue (/jira/settings/issues/screens)
      2. On issue view screen click Configure and add Work Ratio field to layout.
      3. Call PUT /rest/api/2/issue/(issueIdOrKey) with the payload specified above
      4. Look at value for workratio

      Expected Results

      Value for workratio should be 100?

      Actual Results

      Value for workratio is a very high number, `9223372036854775807.`

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jclark@atlassian.com Joe Clark
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: