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

[bug] Jira Server user search API triggers 404 error with accountID #301

Open
kopytovs opened this issue Jun 4, 2020 · 6 comments
Open

Comments

@kopytovs
Copy link

kopytovs commented Jun 4, 2020

Describe the bug

Current Jira Server API has user search method which unavailable after
f50cb07

To Reproduce

  1. Use Jira Server API
  2. Try to search user with accoundID user, _, error := client.User.Get(accountID)
  3. Catch error Either the 'username' or the 'key' query parameters need to be provided: request failed. Please analyze the request body for more details. Status code: 404

Expected behavior

No reproduce 404 error with valid request

https://docs.atlassian.com/software/jira/docs/api/REST/8.9.0/#api/2/user-findUsers

Possible Solution

Add both (Cloud and Server) compatibility

Your Environment

Include as many relevant details about the environment you experienced the problem in

  • go-jira version (git tag or sha): de60bbe
  • Go version (go version): v1.14.4
  • Jira version: v8.5.3
  • Jira type (cloud or on-premise): Server
  • Operating System and version: macOS 10.15.4
@github-actions
Copy link

github-actions bot commented Jun 4, 2020

Hi! Thank you for taking the time to create your first issue! Really cool to see you here for the first time. Please give us a bit of time to review it.

@ghostsquad
Copy link
Contributor

ghostsquad commented Jun 4, 2020

We are currently working on V2 which will have better compatibility between server and cloud versions.

@kopytovs
Copy link
Author

kopytovs commented Jun 4, 2020

@ghostsquad 👍

@ghostsquad
Copy link
Contributor

In the mean time, if you have some ideas on how to fix this issue, we happily accept PRs!

@ghostsquad
Copy link
Contributor

I think the solution is to implement a new method like GetByUsername, which would have the old code prior to the "bugfix" which apparently only fixed cloud versions, but broke server versions.

@github-actions
Copy link

github-actions bot commented Aug 4, 2020

This issue has been automatically marked as stale because it has not had recent activity in the last 60 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants