diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-06-04 00:16:28 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-06-04 00:16:28 -0700 |
commit | 7588a4ac90a9b07c08a3107cd1107d773be1c991 (patch) | |
tree | 55b8bedb5f899e705da0ba7f608267943bf89e94 /rt/lib/RT/Reminders.pm | |
parent | 98d2b25256055abb0dfcb9f586b434474fa97afd (diff) |
RT 4.0.13
Diffstat (limited to 'rt/lib/RT/Reminders.pm')
-rw-r--r-- | rt/lib/RT/Reminders.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/rt/lib/RT/Reminders.pm b/rt/lib/RT/Reminders.pm index 2b663256a..42f4e1d2f 100644 --- a/rt/lib/RT/Reminders.pm +++ b/rt/lib/RT/Reminders.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -116,6 +116,16 @@ sub Add { @_ ); + my $ticket = RT::Ticket->new($self->CurrentUser); + $ticket->Load($self->Ticket); + if ( !$ticket->id ) { + return ( 0, $self->loc( "Failed to load ticket [_1]", $self->Ticket ) ); + } + + if ( $ticket->Status eq 'deleted' ) { + return ( 0, $self->loc("Can't link to a deleted ticket") ); + } + my $reminder = RT::Ticket->new($self->CurrentUser); my ( $status, $msg ) = $reminder->Create( Subject => $args{'Subject'}, |