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

Added -Exact flag to Get-JiraUser #351

Merged
merged 1 commit into from
Apr 26, 2019
Merged

Added -Exact flag to Get-JiraUser #351

merged 1 commit into from
Apr 26, 2019

Conversation

mirrorgleam
Copy link
Contributor

@mirrorgleam mirrorgleam commented Apr 26, 2019

Description

If JIRA has usernames such as "jsmith", "jsmithy", "jsmith1", "jsmithson" and you are trying to assign the ticket to "jsmith" it will fail because the assignee field needs a single user object to get a single string from but Get-JiraUser is returning an array of user objects.

By adding the Exact flag to the Get-JiraUser function within the Invoke-JiraIssueTransition this issue is resolved as only one user object is returned.

Motivation and Context

If JIRA has usernames such as "jsmith", "jsmithy", "jsmith1", "jsmithson" and you are trying to assign the ticket to "jsmith" it will fail because the assignee field needs a single user object to get a single string from but Get-JiraUser is returning an array of user objects.
closes #349

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.

If JIRA has usernames such as "jsmith", "jsmithy", "jsmith1", "jsmithson" and you are trying to assign the ticket to "jsmith" it will fail because the assignee field needs a string but this function is returning an array of strings.
By adding the Exact flag to the Get-JiraUser function this issue is resolved as only one user object is returned.
@lipkau lipkau merged commit 3c86746 into AtlassianPS:master Apr 26, 2019
@ghost ghost removed the Status:In Review label Apr 26, 2019
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.

Fix Provided: Get-JiraUser function inside Invoke-JiraIssueTransition function can return an array of users
2 participants