Forums

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

Jira REST API v3 - Get issue worklog query parameter "startedAfter" is exclude same time?

uenoyama_dominosoft
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!
August 20, 2024

Hi,

I use th Jira Cloud REST API  "GET rest/api/3/issue/{issueIdOrKey}/worklog" with query parameter "startedAfter".

I have noticed that the work log recorded at 2024-08-21T00:00:00.000+0900 is not included in the results of the API with 2024-08-21T00:00:00.000+0900 specified for startedAfter.
Is this specification?

I thought the time specified in startedAfter was included, but not the time specified in startedBefore.

This is my query:

https://{host}/rest/api/3/issue/{issue_key}/worklog?startedAfter=1724166000000

I live in Japan, so 1724166000000 means 2024-08-21T00:00:00.000+09:00.

Best regards,
Satoshi

1 answer

1 accepted

0 votes
Answer accepted
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.
August 20, 2024 edited

Hello @uenoyama_dominosoft 

You seem to be trying to find an issue that was started at the exact stroke of midnight GMT +9hrs, not one single millisecond afterwards. I find it hard to believe that you have an issue that was started at that exact point in time and not one single millisecond before or thereafter.

The startedAfter parameter can only return issues that were started AFTER that exact time (IE >= 2024-08-21T00:00:00.001+09:00) not AT that exact time.

uenoyama_dominosoft
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!
August 20, 2024

Thanks, David!

The JIRA REST API document didn't write whether startedAfter or startedBefore included the exact time, so I assumed that one of them did.

I understood that the spec is to not include either one.

Best regards,
Satoshi

Suggest an answer

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

Atlassian Community Events