RT newb here, I’m trying to write a script to gather and collate reminders to send batch notifications ( slack, email, etc ) to users with reminders.
The heart of the script is
my $tickets = RT::Tickets->new($RT::SystemUser);
my $search = RT::Search::FromSQL->new(
TicketsObj => $tickets,
Argument => ‘Type = “reminder” and (Status = “open” or Status = “new”)’,
);
$search->Prepare();
my $reminders;
while ( my $ticket = $tickets->Next() ) {
push( @{ $reminders->{ $ticket->Owner() }->{reminders} }, $ticket );
}
Here you can see I’m pulling the reminders, but upon inspection of the objects ( using Data::Dumper ), I’m not seeing any way to access the associated actual ticket related to the reminder. Is there any way to do this? I’ve spent a few hours searching but haven’t come up with anything useful.
Thanks!