andygrunwald / andygrunwald/go-jira
User.Find impossible to use correctly
- Ngôn ngữ chính
- Go
- Star
- 1.6k
- Fork
- 500
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
## Describe the bug
I wanted to use an accounts key to find out the account id, by calling `client.User.Find("ntr0")` but I only got this
`error getting user data for account id ntr0: The username query parameter was not provided: request failed. Please analyze the request body for more details. Status code: 400`
## Expected behavior
I get a list of users with matching usernames.
## Possible Solution
I think the short solution would be to replace the "query" arg with the desired "username" arg.
https://github.com/andygrunwald/go-jira/blob/a1f44bdb69597830eb0e02fe678b8fd94b8e1ec1/user.go#L238
It should also be possible to provide a User.GetByKey and User.GetByUsername methods would be really nice to have, since these would only return a single user with exact matching key or username.
## Your Environment
* go-jira version v1.13.0
* Go version 1.16.5:
* Jira version: v8.16.1
* Jira type on-premise):
* Involved Jira plugins: unknown
* Operating System and version: Client runs on Linux
## Additional context
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.