Time Spent Field is not showing data as per JQL

Amit Vaidya June 29, 2020

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

1 answer

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 30, 2020

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:

  1. You can export your issues to CSV and create an external report with the worklog entries
  2. Use a third-party app that provides you with the worklogs of specific users over a specific amount of time. Here are some options:

Time Reports

Worklogs - Time Tracking and Reports 

Let us know if you have any questions.

Tony Rice
Contributor
January 20, 2022

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.

Aaron Whigham February 1, 2022

@Tony Rice I totally agree with your point.

Alex Yessipovskiy _Decadis AG_ February 4, 2022

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.

Alex Yessipovskiy _Decadis AG_ February 4, 2022

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:

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events