Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Organization API From and To request options. Swap Unix() with UnixMilli() #323

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

m1keru
Copy link

@m1keru m1keru commented Sep 23, 2024

Atlassian API wants Epoch in milliseconds

I noticed during the debug that requests to the API go with Unix timestamp in seconds but Atlassian API wants milliseconds.

Here is the reference to their API:
https://developer.atlassian.com/cloud/admin/organization/rest/api-group-events/#api-v1-orgs-orgid-events-get

Atlassian API wants Epoch in milliseconds
@ctreminiom
Copy link
Owner

Hi @m1keru, thank you for investing for time in this project.

Can you please review the test cases?, it seems the change broke them..

2024-09-29T23:43:32.9335955Z     mock.go:337: 
2024-09-29T23:43:32.9336324Z         
2024-09-29T23:43:32.9336798Z         mock: Unexpected Method Call
2024-09-29T23:43:32.9337506Z         -----------------------------
2024-09-29T23:43:32.9338131Z         
2024-09-29T23:43:32.9338965Z         NewRequest(context.backgroundCtx,string,string,string,<nil>)
2024-09-29T23:43:32.9340124Z         		0: context.backgroundCtx{emptyCtx:context.emptyCtx{}}
2024-09-29T23:43:32.9340845Z         		1: "GET"
2024-09-29T23:43:32.9342965Z         		2: "admin/v1/orgs/organization-sample-uuid/events?action=user_added_to_group&cursor=cursor-id-sample&from=1589197526371&q=qq&to=1605177926371"
2024-09-29T23:43:32.9359180Z         		3: ""
2024-09-29T23:43:32.9359614Z         		4: <nil>
2024-09-29T23:43:32.9359999Z         
2024-09-29T23:43:32.9360474Z         The closest call I have is: 
2024-09-29T23:43:32.9360999Z         
2024-09-29T23:43:32.9361755Z         NewRequest(context.backgroundCtx,string,string,string,<nil>)
2024-09-29T23:43:32.9362872Z         		0: context.backgroundCtx{emptyCtx:context.emptyCtx{}}
2024-09-29T23:43:32.9363859Z         		1: "GET"
2024-09-29T23:43:32.9369426Z         		2: "admin/v1/orgs/organization-sample-uuid/events?action=user_added_to_group&cursor=cursor-id-sample&from=1589197526&q=qq&to=1605177926"
2024-09-29T23:43:32.9385964Z         		3: ""
2024-09-29T23:43:32.9434364Z         		4: <nil>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Atlassian Admin enhancement New feature or request
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

2 participants