1 # $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Action/Attic/OpenDependent.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
2 # This Action will open the BASE if a dependent is resolved.
4 package RT::Action::OpenDependent;
5 require RT::Action::Generic;
7 @ISA=qw(RT::Action::Generic);
9 #Do what we need to do and send it out.
11 #What does this type of Action does
16 return (ref $self . " will stall a [local] BASE if it's open and a dependency link is created.");
31 my $Links=RT::Links->new($RT::SystemUser);
32 $Links->Limit(FIELD => 'Type', VALUE => 'DependsOn');
33 $Links->Limit(FIELD => 'Target', VALUE => $self->TicketObj->id);
35 while (my $Link=$Links->Next()) {
36 next unless $Link->BaseIsLocal;
37 my $base=RT::Ticket->new($self->TicketObj->CurrentUser);
38 # Todo: Only work if Base is a plain ticket num:
39 $base->Load($Link->Base);
40 $base->Open if $base->Status eq 'stalled';
45 # Applicability checked in Commit.
47 # {{{ sub IsApplicable