1 # This Action will stall the BASE if a dependency or membership link
2 # (according to argument) is created and if BASE is open.
4 # TODO: Rename this .pm
6 package RT::Action::StallDependent;
7 require RT::Action::Generic;
8 @ISA=qw|RT::Action::Generic|;
13 return (ref $self . " will stall a [local] BASE if it's dependent [or member] of a linked up request.");
28 my $arg=$self->Argument || "DependsOn";
29 unless ($self->TransactionObj->Data =~ /^([^ ]+) $arg /) {
35 $base=$self->TicketObj;
37 $base_id=&RT::Link::_IsLocal(undef, $base_id) || return 0;
38 $base=RT::Ticket->new($self->TicketObj->CurrentUser);
39 $base->Load($base_id);
41 $base->Stall if $base->Status eq 'open';
46 # {{{ sub IsApplicable
49 # 1. the link action is a dependency
50 # 2. BASE is a local ticket
55 my $arg=$self->Argument || "DependsOn";
58 $self->TransactionObj->Data =~ /^([^ ]*) $arg / || return 0;
62 &RT::Link::_IsLocal(undef,$1) || return 0;