How can I get the remaining estimate using Jquery

How can I get the remaining estimate using Jquery

3 answers

1 accepted

Achived using Java script.

1 vote
Colin Goudie Community Champion Dec 29, 2011

Check out the JIRA REST API documentation - http://docs.atlassian.com/jira/REST/latest/#id2474348

Providing you can find out the JIRA issue you want to get the remaining estimate from (e.g. via the URL or other) then you could call this endpoint

/api/2.0.alpha1/issue/{issueKey}

This returns the issue in JSON and this part has the details you need

"timetracking": {
            "name": "timetracking",
            "type": "timetracking",
            "value": {
                "timeoriginalestimate": 10,
                "timeestimate": 3,
                "timespent": 6
            }
        },

1 vote

jQuery("#tt_aggregate_values_remain").text() will do it - of course in the JIRA world, we'd prefer you to use AJS.$("#tt_aggregate_values_remain").text() to do this. It's actually very easy to work this kinfd of thing out with the right tools - if you're using Firefox then install Firebug and when you right click, you have an inspect element option which will then allow you to see what the element id is (always the preferred way to get something - if the element doesn't have an id then you need to craft a jQuery selector to find it.

Colin Goudie Community Champion Dec 29, 2011

This would be the preferred way if you are already on an issues screen for sure.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Marketplace Apps

Tips on how to choose the best estimation method for your planning

Planning and grooming sessions all come with their own sets of rules. Team members meet to estimate stories or other work items, all according to an agreed-upon process. And with every session comes ...

65 views 0 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you