AtlassianPS / JiraPS

PowerShell module to interact with Atlassian JIRA
https://AtlassianPS.org/module/JiraPS
MIT License
321 stars 131 forks source link

New-JiraIssue with Components failing from June, 2023 #482

Open micheleliberman opened 1 year ago

micheleliberman commented 1 year ago

Jira has moved the components from a custom field to an internal field. This happed around 11 days ago 11th of June, 2023. This has caused New-JiraIssue to fail. The solution was to add a new parameter to function New-JiraIssue in JiraPS.psm1: [Parameter( ValueFromPipelineByPropertyName )] [String[]] $Components, and further down in New-JiraIssue process section, add the components in a format receivable by the Rest 2.0 API: if ($Components) { $requestBody["components"] = [System.Collections.ArrayList]@() foreach ($item in $Components) { $null = $requestBody["components"].Add( @{ id = "$item" } ) } }