JQL query for History log in Work log

María Elena de León December 20, 2022

How do I get the date when a user enters work log in a date range.

I need a query to get the list of issues where a user updated the worklog in a certain date range (from the history field)

My query in natural language would be 

Project= “Project Name” AND worklogDate>”2022/09/1” AND worklogDate<”2022/09/30” AND historyDate>"2022/10/01"

I dont know how the get the "historyDate" field

2 answers

1 vote
Yuliia_Borivets__SaaSJet_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
December 20, 2022

Hi @María Elena de León 

As I understand, you need to get changes for the custom field of "History Date" for a specific period. For this case, you can try Issue History for Jira app if you are ok with it. Here you can find changes for any custom or standard field. It's also possible to choose the date range.

assignee activity in jira.png

*The app is developed by my team.

Let me know if you have any questions.

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 20, 2022

Hello @María Elena de León 

Can you provide more information about what you mean by the "history" field. There is no such field natively in Jira. There is a History tab that shows all the changes to the issue, but this is not a single field. Rather it is a set of records where each record has multiple fields.

Worklogs also are a set of records, each one with multiple fields that detail a single worklog entry (date started, time spent, user logging the work, etc.).

Can you share a screen image and point out the "historyDate" field from which you are trying to get a date?

And can you explain how you are trying to use that date as it relates to work log entries?

Matt Doar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 20, 2022

I read that as pseudo JQL not actual JQL

Matt Doar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 20, 2022

I don't think you can do this with JQL. But you could use a JQL search to retrieve all the issues with work logged in the chosen range. Then use a script to extract just those issues and process the issue history in each one, outside Jira. 

Something such as https://community.atlassian.com/t5/Jira-Software-questions/Re-Get-history-of-tickets-transitions-with-python-API/qaq-p/1460070/comment-id/93827#M93827

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 20, 2022

I got that it was not actually JQL. I'm not understanding what the user is trying to accomplish and how the "history date" element factors in to it.

Is the user trying to retrieve issues, or worklogs? How is the "history date" supposed to be used to constrain the results.

María Elena de León January 25, 2023

Hello everyone. What I'm trying to get is information of what users have logged hours in the past on incidents within a certain period of time. For example, in this week which users recorded hours attributable to the past month (ie: How can I know if yesterday Maria recorded 2 hrs in task xx as she executed it on December)

thanks

Like Tom De Coninck likes this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 25, 2023

Hello @María Elena de León 

Jira does not provide capabilities natively for querying time logged in that manner.

You will need to investigate third party apps to find one that can fulfill your requirement.

Here is a search from the Atlassian Marketplace to help you get started.

https://marketplace.atlassian.com/search?hosting=cloud&product=jira&query=time%20tracking

Like María Elena de León likes this

Suggest an answer

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

Atlassian Community Events