Jira API: JQL Datetime Format Doesn't Support Seconds and Milliseconds

Vamshidhar Velpula
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!
September 8, 2020

Hi,

We have an integration need to query issues that were updated since the last time the integration ran. For this when building the Jira API query, I am trying to filter by using the 'updated' field. However, I need to pass a precise value in 'updated', including seconds (and perhaps milliseconds also). However the Jira API doesn't like a datetime format that includes seconds. It only accepts yyyy-MM-dd HH:mm format. This is not enough since the updated time stamp can contain seconds (and milliseconds). So the API results are not precise. How do I solve this? 

 

Thanks,

Vamshi

1 answer

0 votes
Lauri Korpela
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!
October 16, 2020

We had the same issue and couldn't figure out any other way than requesting issues with minute precision and then checking the returned tickets with more precise time comparison to filter out those that won't fit.

Another finding was that JQL queries return timestamps without milliseconds (https://jira.atlassian.com/browse/JRASERVER-28238) and as it was critical for us to compare on that precision, we needed to add even more logic and retrieve all the tickets got with the JQL query one by one to get milliseconds.

Suggest an answer

Log in or Sign up to answer