File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,11 @@ function New-JiraIssue {
45
45
[PSCustomObject ]
46
46
$Fields ,
47
47
48
+ [Parameter ( ValueFromPipelineByPropertyName )]
49
+ [AllowNull ()]
50
+ [String []]
51
+ $Components ,
52
+
48
53
[Parameter ()]
49
54
[System.Management.Automation.PSCredential ]
50
55
[System.Management.Automation.Credential ()]
@@ -107,6 +112,13 @@ function New-JiraIssue {
107
112
}
108
113
}
109
114
115
+ if ($Components ) {
116
+ $requestBody [" components" ] = [System.Collections.ArrayList ]@ ()
117
+ foreach ($item in $Components ) {
118
+ $null = $requestBody [" components" ].Add( @ { id = " $item " } )
119
+ }
120
+ }
121
+
110
122
if ($FixVersion ) {
111
123
$requestBody [' fixVersions' ] = [System.Collections.ArrayList ]@ ()
112
124
foreach ($item in $FixVersion ) {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Creates a new issue in JIRA
17
17
18
18
``` powershell
19
19
New-JiraIssue [-Project] <String> [-IssueType] <String> [-Summary] <String> [[-Priority] <Int32>]
20
- [[-Description] <String>] [[-Reporter] <String>] [[-Labels] <String[]>] [[-Parent] <String>]
20
+ [[-Description] <String>] [[-Reporter] <String>] [[-Labels] <String[]>] [[-Components] <String[]>] [[- Parent] <String>]
21
21
[[-FixVersion] <String[]>] [[-Fields] <PSCustomObject>] [[-Credential] <PSCredential>] [-WhatIf] [-Confirm]
22
22
[<CommonParameters>]
23
23
```
@@ -274,6 +274,21 @@ Default value: None
274
274
Accept pipeline input : False
275
275
Accept wildcard characters : False
276
276
` ` `
277
+ ### -Components
278
+
279
+ List of component ids which will be added to the issue.
280
+
281
+ ` ` ` yaml
282
+ Type : String[]
283
+ Parameter Sets : (All)
284
+ Aliases :
285
+
286
+ Required : False
287
+ Position : 12
288
+ Default value : None
289
+ Accept pipeline input : False
290
+ Accept wildcard characters : False
291
+ ` ` `
277
292
278
293
### -WhatIf
279
294
You can’t perform that action at this time.
0 commit comments