Is it possible to set originalEstimate via CURL?

Lee Correll
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.
May 10, 2012

I've searched thru the answers here (and via google) but I can't seem to find out if it's possible to set the Original Hours field via a CURL update. I can set fixversion, assignee, etc.

I'm using:

curl -X PUT --data @[json below] [our URL]

I also tried:

curl -X POST --data @[json below] [our URL] (and got HTTP method not allowed for the requested resource)

My json file is one line:

{"update":{"timetracking":{"originalEstimate":"4h"}}}

Am I looking in the wrong place?

Thanks!

2 answers

1 accepted

1 vote
Answer accepted
Dieter
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.
May 10, 2012
Did you already check the example at https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Create+Issue#JIRARESTAPIExample-CreateIssue-Addingaworklogentryduringcreate ?

It mentions that you should also disable the legacy time tracking mode to be able to change other time tracking fields than remaining estimate

Lee Correll
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.
May 10, 2012

I'm using ondemand, so I believe that time tracking mode isn't mine to enable/disable - ergo, it's disabled. The example there is what i used to derive my JSON to begin with - there's just not an example of it being "updatable" - which is different from generating it when the issue is created.

Dieter
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.
May 10, 2012

I have just verified that the following works for me in 5.1-m3. I hope it works on OnDemand too.

{
   "fields": {
        "timetracking":
        {
           "originalEstimate": "11d 2h",
           "remainingEstimate": "3h 26m"
        }
    }
}

Dieter
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.
May 10, 2012

BTW: I have verified it using the REST API browser which comes with the Atlassian Developer Toolbox plugin. Cool stuff!

I have used PUT
Lee Correll
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.
May 11, 2012

Ah, when I tried to set both the original and the remaining estimates - it worked. Thanks!

0 votes
Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 10, 2012

Are you able to modify the original estimate through the main JIRA interface? Check to make sure that you have disabled 'legacy time tracking' in JIRA's admin interface - http://confluence.atlassian.com/display/JIRA/Configuring+Time+Tracking#ConfiguringTimeTracking-configuringtimetracking

Also ensure that the user you are logging in with via curl has permission to modify the time estimates. :-)

Lee Correll
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.
May 10, 2012

Yes, I can edit it via the web interface; we're on OnDemand, so legacy time tracking isn't the problem. :)

Suggest an answer

Log in or Sign up to answer