Skip to content

Commit fafeeac

Browse files
committed
Updating New-HaloPSATicket script to not log duplicate notes
1 parent af8faf4 commit fafeeac

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Modules/CippExtensions/Public/Halo/New-HaloPSATicket.ps1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ function New-HaloPSATicket {
2020

2121
$Ticket = Invoke-RestMethod -Uri "$($Configuration.ResourceURL)/Tickets/$($ExistingTicket.TicketID)?includedetails=true&includelastaction=false&nocache=undefined&includeusersassets=false&isdetailscreen=true" -ContentType 'application/json; charset=utf-8' -Method Get -Headers @{Authorization = "Bearer $($token.access_token)" }
2222
if (!$Ticket.hasbeenclosed) {
23-
Write-Information 'Ticket is still open, adding new note'
24-
$Object = [PSCustomObject]@{
23+
Write-Information "Ticket is still open"
24+
return "Ticket is still open"
25+
<#$Object = [PSCustomObject]@{
2526
ticket_id = $ExistingTicket.TicketID
2627
outcome = 'Private Note'
2728
outcome_id = 7
@@ -45,7 +46,7 @@ function New-HaloPSATicket {
4546
Write-Information "Failed to add note to HaloPSA ticket: $Message"
4647
Write-Information "Body we tried to ship: $body"
4748
return "Failed to add note to HaloPSA ticket: $Message"
48-
}
49+
}#>
4950
}
5051
}
5152
}

0 commit comments

Comments
 (0)