The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Deleted user
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
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 Champions.
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