Hello,
I am making a plugin that needs to extract the time tracking fields (Original Estimate, Remaining Estimate, and Time Spent) of an Issue. I am currently trying to use the methods listed here: http://docs.atlassian.com/jira/latest/com/atlassian/jira/issue/Issue.html#getEstimate%28%29
I have an Issue object that I am calling getEstimate() on, which returns a long which should be the estiamte time in milliseconds, however the values it is returning is incorrect (it seems to be off by a factor of 10000 milliseconds). I am not sure what is going on here, is this the correct way to get the time tracking fields from an Issue? Also does anyone know if in JIRA if you set the time estimate to be something like 3 weeks, does that mean 3 workings weeks (120 hours) or 3 total weeks (504 hours)?
Community moderators have prevented the ability to post new answers.
Hours in a week depends on what you configured in the time tracking settings.
https://confluence.atlassian.com/display/JIRA/Configuring+Time+Tracking
And yes, getting time using those APIs is the right way to do it. I don't remember if it was miliseconds or seconds but the API says ms.
My settings are set up for 8 working hours a day, 5 working days in a week. When I extract the estimate from an Issue and convert the milliseconds to hours and minutes some the data is off. For example I have an issue in which the original estimate is 3 weeks (120 hours) however the value I keep getting is 120. This only seems to be happening for time values over 1 week. Any idea of what is happening here? Here is my code for converting the time:
long time = mi.getOriginalEstimate().longValue(); String minutes = Integer.toString((int)((time % 3600) / 60)); String hours = Integer.toString((int)(time / 3600));
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
oh yeah, that's right. You need to add them up!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Although the API Javadoc says that Issue.getEstimate() and Issue.getOriginalEstimate() return milliseconds they actually return seconds.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just realized it is because the Issue class methods to get the estimates do not count the values for the subtasks. Is there a way for that to be easily included without having to manually get each Issue's list of subtasks, calculate their estimate times, and add them back to the main task?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.