[rt-users] Open Ticket On Resolve Of Dependants?
Christian Loos
cloos at netcologne.de
Tue Feb 12 03:09:21 EST 2013
Hi Kevin,
I can't understand that my scrip didn't work for you as we use this
scrip in our RT without any problem.
If you change your line
$l->BaseObj->SetStatus('open');
to
$l->BaseObj->SetStatus('open')
unless $l->BaseObj->HasUnresolvedDependencies;
the parent ticket is only open until all child tickets are resolved.
Chris
Am 06.02.2013 20:36, schrieb Kevin Comer:
> Christian,
>
> I tried this script you sent and was not able to get any results.
>
> The script in the first post does work, just not in the way we would like.
>
> we would like for the script to not fire until all the tickets have been
> resolved.
> How can I modify this script?
>
> Condition: On Status Change
> Action: User Defined
> Template: Global Template Blank
>
> Customer action: return 1;
> Custom action cleanup code:
> return 1 if ($self->TransactionObj->NewValue !~
> /^(?:resolved|deleted|rejected)$/);
> my $DepOnBy = $self->TicketObj->DependedOnBy;
> while( my $l = $DepOnBy->Next ) {
> next unless( $l->BaseURI->IsLocal );
> next unless( $l->BaseObj->Status =~ /^(?:new|open|stalled)$/ );
>
> # here you can add any action
> # see also example below
> $l->BaseObj->SetStatus('open');
> }
> $DepOnBy = undef;
> return 1;
>
>
>
> Kevin Comer
More information about the rt-users
mailing list