[rt-users] Delete "reminders"

Kenneth Crocker kfcrocker at lbl.gov
Tue Mar 15 11:59:52 EDT 2011


Jose,

I had to use the following scrip in 3.6.x. In 3.8.x, I don't believe this is
necessary.

Scrip "On Resolve"
Condition: On Resolve
Action: User-Defined
Template: Global template: Blank
Stage: TransactionBatch

Custom Action Prep Code:
# Resolve all Ticket reminders when the Ticket is resolved

my $ticket = $self->TicketObj;
my $trans = $self->TransactionObj;
my $tickets = new RT::Tickets(RT->SystemUser);
my $id = $ticket->id;

if  (defined($id))
    {
     $tickets->FromSQL('Type = "reminder" AND RefersTo="'.$id.'"');
#  Loop thru all Reminders
     while (my $reminder = $tickets->Next) {
        $RT::Logger->info("Closing associated reminder");
        $reminder->SetStatus("resolved");
     }
    }

return 1;

Custom Action Cleanup Code:
return 1;

I got this off the RT wiki. There's a lot of neat stuff there.

Kenn
LBNL

2011/3/15 José Gregorio Díaz Unda <xt4mhz at yahoo.com>

> Hi all and thanks in advance.
>
> How can I delete reminders in RT 3.6.8 ?
>
> Debian Lenny with RT working like a charm.
>
> Thanks again.
>
> José Gregorio.
>
> Enviado desde mi dispositivo movil BlackBerry® de Digitel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110315/9834c640/attachment.htm>


More information about the rt-users mailing list