#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
}
}
- $obj->SetStatus(
- Status => $obj->QueueObj->Lifecycle->DefaultStatus('approved') || 'open',
- Force => 1,
- );
+ $obj->SetStatus( Status => $obj->FirstActiveStatus, Force => 1 )
+ if $obj->FirstActiveStatus;
}
my $passed = !$top->HasUnresolvedDependencies( Type => 'approval' );
$top->Correspond( MIMEObj => $template->MIMEObj );
if ($passed) {
+ my $new_status = $top->LifecycleObj->DefaultStatus('approved') || 'open';
+ if ( $new_status ne $top->Status ) {
+ $top->SetStatus( $new_status );
+ }
+
$self->RunScripAction('Notify Owner', 'Approval Ready for Owner',
TicketObj => $top);
}