Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA JQL Filter on Worklog timestamp

Kerry Ayers March 27, 2018

Currently I retrieve worklogs by worklogauthor for a give date range: 

worklogAuthor in () AND worklogDate >= "2018/03/07" AND worklogDate <= "2018/03/20"

I would like to add TIME to the to the criteria - I see that time is captured, as it appears in my download from JIRA: 

worklog timestamp.PNG

1 answer

0 votes
Dave Norton
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2018

G'day Kerry,

Unfortunately, you've run into a bit of a bug here. The documentation says that you can use a time stamp (like "2018/03/07 10:00"), however that's not working correctly.

For Cloud, the bug report is over at https://jira.atlassian.com/browse/JRACLOUD-63241, and you can find the server version over at https://jira.atlassian.com/browse/JRASERVER-63241. As always, I recommend you vote and watch those issues, so you can get notified when they're fixed.

As an alternative, I had a look at the REST API to see if we could search for those issues - and the search endpoint returned the same error as well.

If you're comfortable running SQL queries against your database, you can use the following as a basis to find the issues that match your criteria. For example...

select CONCAT(p.pkey, '-', ji.issuenum) AS IssueKey, wl.author, wl.startdate, wl.updated
FROM worklog wl
JOIN jiraissue ji ON wl.issueid = ji.id
JOIN project p ON ji.project = p.id
WHERE wl.created > '2018-03-07 10:00:00'

That'll get you the issue key and who updated the worklog from the date in the WHERE clause. You can add more conditions - so searching for a specific project key; as well as add another date for a range.

Running SQL queries isn't the most ideal solution; so if that's not something you're comfortable with; that's OK too :) Can you let me know a bit more about what you're looking to achieve, just in case there's a better way to get you what you need? (If not, that's OK)

Cheers,
Dave

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events