Using the endpoint:
GET /rest/agile/1.0/issue/{issueIdOrKey}
I can obtain the details of an issue, like the "timeSpent". However, if an issue spans across several sprints ( Sprint A, Sprint B, Sprint C ), the value of "timeSpent" will be the sum of all its time spent across the multiple sprints, but I only want to find the "timeSpent" for one specific sprint ( like Sprint B ).
How can I find the "timeSpent" of an issue for one specific sprint?
Hi John,
I understand that you are looking to find out an issue's time logged during a sprint. However the timeSpent field in Jira is intentionally bound to the issue itself. Hence, it is meant to measure the time logged on that issue over the life of that issue.
Instead of trying to use the timeSpent field, perhaps you use the worklog field instead. You can call the REST API endpoint of GET /rest/api/2/issue/{issueIdOrKey}/worklog. This will return all the worklog entries and their times. The drawback of doing this is that you don't have an easy way to see which work log corresponds to a specific sprint. You would need to compare the entry of that worklog against the known start/stop time of that sprint to see if it applies there or not.
I hope this helps.
Andy
Thanks for the advice. Seems like I will be solving it this way. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have spent hours searching an answer for this problem. It seems this is the right approach. Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, we've been facing similar although not the same, https://community.atlassian.com/t5/Jira-questions/Re-Jira-TimeSpent-query-for-the-users-who-logs-hours/qaq-p/1825128/comment-id/504005#M504005 might be of interest, thanks Tom
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.