AtlassianPS / JiraPS

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

Get-JiraUser wildcard search no longer works #360

Closed lmf-mx closed 5 years ago

lmf-mx commented 5 years ago

Description

The Atlassian API no longer returns all users using the '%' wildcard search.

Steps To Reproduce

  1. Run: Get-JiraUser -UserName '%'
  2. Get error: No results when searching for user %

Expected behavior

Return a list of all users.

Screenshots Shell

$alljirausers = Get-JiraUser -UserName "%" -MaxResults 1000 -Verbose
VERBOSE: [Get-JiraUser] Function started
VERBOSE: [Get-JiraConfigServer] Function started
VERBOSE: [Get-JiraConfigServer] Complete
VERBOSE: [Get-JiraUser] Processing [%]
VERBOSE: [Invoke-JiraMethod] Function started
VERBOSE: [ConvertTo-GetParameter] Making HTTP get parameter string out of a hashtable
VERBOSE:
Name                           Value

----                           -----

maxResults                     1000

username                       %25

VERBOSE: [Get-JiraSession] Function started
VERBOSE: [Get-JiraSession] Complete
VERBOSE: [Invoke-JiraMethod] Get https://REDACTED.atlassian.net/rest/api/latest/user/search?maxResults=1000&username=%25
VERBOSE: [Test-ServerResponse] Checking response headers for authentication errors
VERBOSE: [Invoke-JiraMethod] Status code: 200
VERBOSE: [Invoke-JiraMethod] Function ended
Get-JiraUser : No results when searching for user %
At line:1 char:17
+ $alljirausers = Get-JiraUser -UserName "%" -MaxResults 1000 -Verbose
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-JiraUser

VERBOSE: [Get-JiraUser] Complete

Your Environment

Versions irrelevant. Change is in Atlassian API.

Get-Module JiraPS -ListAvailable | Select Name, Version JiraPS 2.11.0 $PSVersionTable PSVersion 5.1.14409.1018

Possible Solution