diff --git a/JiraPS/Public/New-JiraIssue.ps1 b/JiraPS/Public/New-JiraIssue.ps1 index 6e42b581..3facaa68 100644 --- a/JiraPS/Public/New-JiraIssue.ps1 +++ b/JiraPS/Public/New-JiraIssue.ps1 @@ -29,8 +29,9 @@ function New-JiraIssue { $Reporter, [Parameter( ValueFromPipelineByPropertyName )] + [Alias("Labels")] [String[]] - $Labels, + $Label, [Parameter( ValueFromPipelineByPropertyName )] [String] @@ -105,9 +106,9 @@ function New-JiraIssue { $requestBody["parent"] = @{"key" = $Parent} } - if ($Labels) { + if ($Label) { $requestBody["labels"] = [System.Collections.ArrayList]@() - foreach ($item in $Labels) { + foreach ($item in $Label) { $null = $requestBody["labels"].Add($item) } } diff --git a/JiraPS/Public/Set-JiraIssue.ps1 b/JiraPS/Public/Set-JiraIssue.ps1 index bd6f4b93..5ab0fb47 100644 --- a/JiraPS/Public/Set-JiraIssue.ps1 +++ b/JiraPS/Public/Set-JiraIssue.ps1 @@ -41,6 +41,7 @@ function Set-JiraIssue { [Object] $Assignee, + [Alias("Labels")] [String[]] $Label, diff --git a/Tests/Functions/New-JiraIssue.Unit.Tests.ps1 b/Tests/Functions/New-JiraIssue.Unit.Tests.ps1 index 3b580c79..780d0349 100644 --- a/Tests/Functions/New-JiraIssue.Unit.Tests.ps1 +++ b/Tests/Functions/New-JiraIssue.Unit.Tests.ps1 @@ -134,7 +134,7 @@ Describe "New-JiraIssue" -Tag 'Unit' { defParam $command 'Summary' defParam $command 'Description' defParam $command 'Reporter' - defParam $command 'Labels' + defParam $command 'Label' defParam $command 'Fields' defParam $command 'Credential' } diff --git a/docs/en-US/commands/New-JiraIssue.md b/docs/en-US/commands/New-JiraIssue.md index c8abf675..6cbab25f 100644 --- a/docs/en-US/commands/New-JiraIssue.md +++ b/docs/en-US/commands/New-JiraIssue.md @@ -17,7 +17,7 @@ Creates a new issue in JIRA ```powershell New-JiraIssue [-Project] [-IssueType] [-Summary] [[-Priority] ] - [[-Description] ] [[-Reporter] ] [[-Labels] ] [[-Components] ] [[-Parent] ] + [[-Description] ] [[-Reporter] ] [[-Label] ] [[-Components] ] [[-Parent] ] [[-FixVersion] ] [[-Fields] ] [[-Credential] ] [-WhatIf] [-Confirm] [] ``` @@ -192,7 +192,7 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Labels +### -Label List of labels which will be added to the issue.