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

Get-JiraUser -Filter parameter added #306

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

stevenyoungs
Copy link

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • I have added Pester Tests that describe what my changes should do.
  • I have updated the documentation accordingly.

A new parameter, -Filter, has been added which returns information
on all users matching the supplied text.
The meaning of the existing -UserName parameter has been modified. It now returns
the user whose username is the supplied text.
@stevenyoungs stevenyoungs requested review from a team as code owners July 31, 2018 21:58
@ghost ghost added the Status:In Review label Jul 31, 2018
Copy link
Member

@lipkau lipkau left a comment

Choose a reason for hiding this comment

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

Nice job!
looks awesome.

@lipkau
Copy link
Member

lipkau commented Aug 1, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants