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

Find users assignable to projects + query #223

Open
imilchev opened this issue Jul 1, 2023 · 1 comment
Open

Find users assignable to projects + query #223

imilchev opened this issue Jul 1, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request Jira Software Cloud V2 Jira Cloud V2 V3 Jira Cloud V3

Comments

@imilchev
Copy link

imilchev commented Jul 1, 2023

Is your feature request related to a problem? Please describe.
I would like to get a list of users that are assignable to a project but I would also like to apply a query to the list. This is useful whenever there are many Jira users in a specific project and one would try to find a specific user from that list. The current interface doesn't have a function that allows writing such a request.

Describe the solution you'd like
I would like to have a function similar to Projects (as defined here) but that also allows me to specify the query parameter.

I already saw in the Jira API docs that such a request is possible. It's just a matter of exposing it in the library API.

Describe alternatives you've considered
none

Additional context
I am happy to open a PR implementing this if you could provide some guidance on the right approach. I would assume that simply adding an extra parameter to the existing Projects function won't be a good idea because that would be a breaking change.

Creating a new function for this feature would work too but then I'm not sure what a good name for it would be. I'm open for suggestions

@imilchev imilchev added the enhancement New feature or request label Jul 1, 2023
@ctreminiom
Copy link
Owner

Hi @imilchev, thank you for the interest on this project.

I think the best method name would be ByProjects(), using the naming convention By + $Jira_Entity_In_Plural, and taking into account the other methods has not been mapped on the library.
image

So, it'll be easier for the dev's using these methods:

  • jiraClient.User.Search.ByProjects()
  • jiraClient.User.Search.ByIssues()
  • jiraClient.User.Search.ByPermissions()
  • jiraClient.User.Search.Do()
  • jiraClient.User.Search.ByQuery()
  • jiraClient.User.Search.ByUserQuery()
  • jiraClient.User.Search.ByBrowseGrant()

I'm aware the endpoint is already mapped on the library, but not the params are mapped and changing it will results on a breaking change.

Also, you're free to open a new PR, but right now I'm working on migrating the client interface to a new one and the architecture changes may affects your PR with the changes I've done. #224.

@ctreminiom ctreminiom added Jira Software Cloud V2 Jira Cloud V2 V3 Jira Cloud V3 labels Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Jira Software Cloud V2 Jira Cloud V2 V3 Jira Cloud V3
Projects
Status: In progress
Development

No branches or pull requests

2 participants