Skip to content

Commit f49e5e4

Browse files
authored
Merge pull request #358 from lipkau/fix/addingOfIssueLabels
Fixed method for adding labels to issue
2 parents 2f2432d + 5edd70a commit f49e5e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

JiraPS/Public/Set-JiraIssueLabel.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
# Find the proper object for the Issue
7070
$issueObj = Resolve-JiraIssueObject -InputObject $_issue -Credential $Credential
7171

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

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

0 commit comments

Comments
 (0)