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

Updating remaining estimate with REST causes original estimate to also be modified, regardless of the state of time spent field

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Medium
    • None
    • 5.0.1, 5.1.6, 6.4.2
    • REST API

    Description

      Summary

      The following command can be used to reproduce this problem:

       curl -D- -u user:password -X PUT --data "{\"fields\":{\"timetracking\":{\"remainingEstimate\":\"3d 1h\"}}}" -H "Content-Type: application/json" http://url/rest/api/latest/issue/issuekey
      

      Result:

            "timetracking":{  
               "originalEstimate":"3d 1h",
               "remainingEstimate":"3d 1h",
              ....
            },
      

      Setting originalEstimate updates remainingEstimate also, so attempted workaround by resetting originalEstimate to whatever it was before the change does not work.

      Steps to reproduce:

      1. create an issue
      2. set the original estimate (eg: 2h)
      3. log work in the issue (eg: 10 mins) . Refer to screenshot BeforeRESTCommand.png
      4. run REST command to update the Remaining Estimate
      5. refresh issue view screen and the Original Estimate is also updated . Refer to screenshot AfterRESTCommand.png

      Workaround

      Two possible workarounds:

      1. The issue does not occur if you enable time tracking 'Legacy Mode'
      2. Always set both, originalEstimate and remainingEstimate. This way it works fine:
        • REQUEST:
          {
          "fields": {
          	"timetracking": { 
          		"remainingEstimate": "55m",
          		"originalEstimate":"2h"
          		}
          	}
          } 
          
        • RESULT:
                "timetracking":{  
                   "originalEstimate":"2h",
                   "remainingEstimate":"55m",
                   "originalEstimateSeconds":7200,
                   "remainingEstimateSeconds":3300
                }, 
          

      Attachments

        1. AfterRESTCommand.png
          AfterRESTCommand.png
          119 kB
        2. BeforeRESTCommand.png
          BeforeRESTCommand.png
          105 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jgorycki Janusz Gorycki (Inactive)
              Votes:
              18 Vote for this issue
              Watchers:
              18 Start watching this issue

              Dates

                Created:
                Updated: