Skip to content

Commit

Permalink
Merge pull request #358 from lipkau/fix/addingOfIssueLabels
Browse files Browse the repository at this point in the history
Fixed method for adding labels to issue
  • Loading branch information
lipkau authored Jul 2, 2019
2 parents 2f2432d + 5edd70a commit f49e5e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions JiraPS/Public/Set-JiraIssueLabel.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
# Find the proper object for the Issue
$issueObj = Resolve-JiraIssueObject -InputObject $_issue -Credential $Credential

$labels = [System.Collections.ArrayList]@($issueObj.labels)
$labels = [System.Collections.ArrayList]@($issueObj.labels | Where-Object {$_})

# As of JIRA 6.4, the Add and Remove verbs in the REST API for
# updating issues do not support arrays of parameters - you
Expand Down Expand Up @@ -114,7 +114,7 @@
$parameter = @{
URI = $issueObj.RestURL
Method = "PUT"
Body = ConvertTo-Json -InputObject $requestBody -Depth 4
Body = ConvertTo-Json -InputObject $requestBody -Depth 6
Credential = $Credential
}
Write-Debug "[$($MyInvocation.MyCommand.Name)] Invoking JiraMethod with `$parameter"
Expand Down

0 comments on commit f49e5e4

Please sign in to comment.