I am trying to ascertain between two 3rd party support services which of our tickets are showing as closed on both portals. I have a CSV export of the tickets and both have the relevant fields.
Thus far I have this:
$EXTrange = Import-Csv -Path '/Range.csv'
$INTrange = Import-Csv -Path '/export (14).csv'
$ClosedInternal = $INTrange |
Where-Object status -eq "Closed"
$ICTickets = $EXTrange |
Where-Object "Customer Ticket Reference" -eq $ClosedInternal
foreach ($thing in $ClosedInternal) {
Write-Host $ICTickets."Ticket ID"
}
Customer Ticket Reference and ID fields will match up as they're our ticket numbers.
I just need to compare these two lists, match up the external and internal reference fields, check if it is closed in status and if it is then tell me the external company ticket ref held in $EXTrange."Ticket ID"
.
I feel like im close but can't figure out how to return the ticket ID for each matching ticket that is closed.