Skip to content

Conversation

ATMackay
Copy link

@ATMackay ATMackay commented Sep 16, 2025

What type of PR is this?

  • feature

What this PR does / why we need it:

Jira exposes get all users endpoints distinct from user search. Search endpoints are better for interactive/fuzzy lookup and have different behavior/limits. Adding a distinct GetAllUsers avoids mixing search semantics with full user enumeration.

Which issue(s) this PR fixes:

No issue, I am currently using go-jira with custom wrappers and thought this would be useful.

Special notes for your reviewer:

Great project, keep up the good work!

@github-actions github-actions bot added the jira-cloud Changes related to the Jira Cloud client label Sep 16, 2025
cloud/user.go Outdated
// GetAllUsers returns a list of all users, including active users, inactive users and previously deleted users that have an Atlassian account.
//
// JIRA API docs: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-rest-api-2-users-get
func (s *UserService) GetAllUsers(ctx context.Context) ([]User, *Response, error) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Jira docs, it looks like that this function can accept startAt and maxResults as input parameters. What do you think about adding this capability here as well?

Otherwise, adding those later would be a breaking change.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ATMackay ATMackay changed the title feat(cloud): add UserService.GetAllUsers(ctx) wrapper for full user enumeration feat(cloud): add UserService.GetAllUsers(ctx,options) wrapper for full user enumeration Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira-cloud Changes related to the Jira Cloud client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants