Hi Team,
We are using following JQL to get time spent log for June 2020 month for specific user.
project = UTSMS AND (worklogDate >= "2020/06/01" AND worklogDate <"2020/06/29" ) AND worklogAuthor = currentUser() and key="UTSMS-186" ORDER BY priority DESC, updated DESC
but when we are checking for specific isuses, time spent showing all the work log done by all the users. Can you please help to get exact time spent by specific user and for specific month?
Thanks,
Amit
Hello @Amit Vaidya
Thank you for reaching out.
Per your description, I understand you expect the JQL query you created to only display the worklog entries from the author you selected when opening the issues returned. Is that correct?
I believe you might be misunderstanding how the JQL search works in Jira, which can totally happen due to the complexity of the Jira application. Please, allow me to provide you with some concepts so we can confirm we are on the same page:
The JQL search in Jira was created with the single purpose to return issues based on the specific parameters added in the filter. That being said, the filter parameters are only applied to issues, not to other fields (like Time spent, Summary, etc).
Because of the concept above, the JQL you created will return all the issues that you have logged work, however, it will not filter the worklog added from other users or hide any other details in the issues returned.
That being said, we understand that a JQL query to return the work logs of a specific user would be useful for reporting purposes, so we created the following feature request to get this implemented:
Ability to add Worklog components as columns when viewing results with 'List View'
Feel free to vote and watch the suggestion to increase its priority and also receive notifications about any updates.
Some options to create the report as you need:
Worklogs - Time Tracking and Reports
Let us know if you have any questions.
I'm not understanding this answer. JQL is the mechanism available to filter issues and should be able to do for any and all fields including "other fields" (like Time spent, Summary).
This answer is particularly confusing since the both the summary and time spent field are queryable via JQL.
Amit's question appears to be concerned about the accuracy of the results returned.
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.
I tend to agree with @Tony Rice as well.
The same goes then for the rest entry point: /rest/api/2/search
Request body:
{
"jql": "issue in (TP-1)",
"maxResults": 500,
"expand": [
"schema",
"names"
],
"fields": [
"timeSpent",
"assignee",
"summary"
],
"startAt": 0
}
I get the result for summary and assignee, but no info for timeSpent.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, there is another thing a gave a shot to, if you use "timespent" instead "timeSpent" you actually get the timeSpent in seconds back. :face_palm:
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.