How can I get the remaining estimate using Jquery

How can I get the remaining estimate using Jquery

3 answers

1 accepted

Accepted Answer
0 votes

Achived using Java script.

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.

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
Community showcase
Posted Tuesday in Featured Groups

Tuesday tips & tricks: What is the Atlassian Community?

It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...

121 views 6 8
View post

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