Get-JiraUser tries to be too helpful, sometimes returning multiple users when a unique Jira username was specified. This is as a result of always searching for matching users when the -UserName parameter is specified.
This PR modifies Get-JiraUser in line with the suggestion in #49. The existing -UserName parameter meaning is changed. It no longer searches and now returns only a single user with an exactly matching username.
A new parameter, -Filter, has been added which provides the search capability previously provided by -UserName.
For a single user, one server round trip is now saved when using -UserName, as groups are expanded in the initial call.
Outstanding Questions
I was not sure of the best behaviour for pipeline input. Suggestions and comments appreciated.
Motivation and Context
closes #49
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[x] I have added Pester Tests that describe what my changes should do.
As this changes the behavior of what the functions returns, this has been tagged as breaking change.
I will create a branch for the next major version and merge this once it's available.
Description
Get-JiraUser tries to be too helpful, sometimes returning multiple users when a unique Jira username was specified. This is as a result of always searching for matching users when the -UserName parameter is specified. This PR modifies Get-JiraUser in line with the suggestion in #49. The existing -UserName parameter meaning is changed. It no longer searches and now returns only a single user with an exactly matching username. A new parameter, -Filter, has been added which provides the search capability previously provided by -UserName. For a single user, one server round trip is now saved when using -UserName, as groups are expanded in the initial call.
Outstanding Questions
I was not sure of the best behaviour for pipeline input. Suggestions and comments appreciated.
Motivation and Context
closes #49
Types of changes
Checklist: