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

Set-JiraIssue not working properly #446

Open
macflurry7 opened this issue Sep 20, 2021 · 3 comments
Open

Set-JiraIssue not working properly #446

macflurry7 opened this issue Sep 20, 2021 · 3 comments

Comments

@macflurry7
Copy link

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

@BuckcherrySpain
Copy link

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?.

@JD-LV
Copy link

JD-LV commented Mar 8, 2023

I got this working by beginning to modify the psm1 file:
image

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.

@Rogueit
Copy link

Rogueit commented Mar 9, 2023

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

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

No branches or pull requests

4 participants