Forums

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

Fetch issues which worklog added within time frame with jql c#

Harsha Khapre
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 25, 2023

I am trying to fetch all issues which have newly worklog added. some how my api is working if only send date with jql query but if i provide time as well it is not working and bad request error occurred.

Working:
api/3/search?jql=worklogDate >= '2023-12-22' AND worklogDate <= '2023-12-25' AND project = PROD

Not working:

api/3/search?jql=worklogDate >= '2023-12-22 10:23:12' AND worklogDate <= '2023-12-25 05:38:12' AND project = PROD

2 answers

0 votes
Sunny Ape
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 25, 2023

Hello @Harsha Khapre 

You would have gotten an error message back such as:

"Date value '2023-12-22 10:23:12' for field 'worklogDate' is invalid. Valid formats include: 'YYYY/MM/DD', 'YYYY-MM-DD', or a period format e.g. '-5d', '4w 2d'."

 

... which gives the reason why it's not working; the worklogDate field doesn't support a time, only a day, so you cannot use JQL to find worklogs at a more granular level than on a particular day.
If you Google 'jira worklogdate time bug' the first result is the bug that's already logged for this.
0 votes
Craig Nodwell
Community Champion
December 25, 2023

Hi @Harsha Khapre welcome to the community.  What is the time format in your system?  

Harsha Khapre
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 25, 2023

format :     yyyy-MM-dd HH:MM:SS 

timezone: est 

Suggest an answer

Log in or Sign up to answer