diff options
| author | cvs2git <cvs2git> | 2002-08-12 06:17:10 +0000 | 
|---|---|---|
| committer | cvs2git <cvs2git> | 2002-08-12 06:17:10 +0000 | 
| commit | 160be29a0dc62e79a4fb95d2ab8c0c7e5996760e (patch) | |
| tree | 94ebadb17321b138fd7bfd9a5c379eec97c5d328 /rt/lib/RT/Action/StallDependent.pm | |
| parent | 3ef62a0570055da710328937e7f65dbb2c027c62 (diff) | |
This commit was manufactured by cvs2svn to create branch 'BESTPRACTICAL'.
Diffstat (limited to 'rt/lib/RT/Action/StallDependent.pm')
| -rw-r--r-- | rt/lib/RT/Action/StallDependent.pm | 68 | 
1 files changed, 0 insertions, 68 deletions
| diff --git a/rt/lib/RT/Action/StallDependent.pm b/rt/lib/RT/Action/StallDependent.pm deleted file mode 100644 index 09d3448a8..000000000 --- a/rt/lib/RT/Action/StallDependent.pm +++ /dev/null @@ -1,68 +0,0 @@ -# This Action will stall the BASE if a dependency or membership link -# (according to argument) is created and if BASE is open. - -# TODO: Rename this .pm - -package RT::Action::StallDependent; -require RT::Action::Generic; -@ISA=qw|RT::Action::Generic|; - -# {{{ sub Describe  -sub Describe  { -  my $self = shift; -  return (ref $self . " will stall a [local] BASE if it's dependent [or member] of a linked up request."); -} -# }}} - - -# {{{ sub Prepare  -sub Prepare  { -    # nothing to prepare -    return 1; -} -# }}} - -sub Commit { -    my $self = shift; -    # Find all Dependent -    my $arg=$self->Argument || "DependsOn"; -    unless ($self->TransactionObj->Data =~ /^([^ ]+) $arg /) { -	warn; return 0; -    } -    my $base_id=$1; -    my $base; -    if ($1 eq "THIS") { -	$base=$self->TicketObj; -    } else { -	$base_id=&RT::Link::_IsLocal(undef, $base_id) || return 0; -	$base=RT::Ticket->new($self->TicketObj->CurrentUser); -	$base->Load($base_id); -    } -    $base->Stall if $base->Status eq 'open'; -    return 0; -} - - -# {{{ sub IsApplicable  - -# Only applicable if: -# 1. the link action is a dependency -# 2. BASE is a local ticket - -sub IsApplicable  { -  my $self = shift; - -  my $arg=$self->Argument || "DependsOn"; - -  # 1: -  $self->TransactionObj->Data =~ /^([^ ]*) $arg / || return 0; - -  # 2: -  # (dirty!) -  &RT::Link::_IsLocal(undef,$1) || return 0; - -  return 1; -} -# }}} - -1; | 
