public/api-v2/issue-type/Invoke-JiraDeleteIssueType.ps1
#https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-rest-api-2-issuetype-id-delete function Invoke-JiraDeleteIssueType { [CmdletBinding()] param ( # The ID of the issue type [Parameter(Mandatory,Position=0)] [string] $IssueTypeId, # ID of an issue type to replace this issue type, if the deleted type is currently in use [Parameter(Position=1)] [string] $ReplacementId, # The JiraContext object to use for the request [Parameter()] [JiraContext] $JiraContext ) process { $functionPath = "/rest/api/2/issuetype/$IssueTypeId" $verb = "DELETE" $query = New-Object RestMethodQueryParams if($PSBoundParameters.ContainsKey("ReplacementId")){$query.Add("alternativeIssueTypeId",$ReplacementId)} $method = New-Object RestMethod @($functionPath,$verb,$query) $method.Invoke($JiraContext) } } |