Open macflurry7 opened 2 years ago
I have the same problem. Seem that the same thing is happening when I try to use Get-JiraUser with the -exact parameter Please, somebody found a solution for it?.
I got this working by beginning to modify the psm1 file:
These references were using rest/api/2 along with an invalid query
When manually using invoke-jiramethod and rest/api/3 and resulting query, things worked.
I switched over to basic auth and hitting the api endpoint to get it to work
$reporter = "bob@aol.com"
$api = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
$JiraToken = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("$Reporter`:$API"))
$jira_headers = @{
"Authorization" = "Basic $JiraToken"
}
$url = "$JiraServer" + "rest/api/3/user/search?query=" + $reporter
$Accountinfo = invoke-restmethod -uri $url -Headers $jira_headers
$AccountID = $Accountinfo.accountid
$AccountID
When I try to use "Set-JiraIssue" cmdlet to assign one issue to one user it tells me to use accountid query. However, I tried with inserting the accountid of the user and it does not work.
Can you please guide me/fix this?
Regards