AtlassianPS / JiraPS

PowerShell module to interact with Atlassian JIRA
https://AtlassianPS.org/module/JiraPS
MIT License
323 stars 131 forks source link

Get-JiraUser -Filter parameter added #306

Open stevenyoungs opened 6 years ago

stevenyoungs commented 6 years ago

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:

lipkau commented 6 years ago

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.