Change status of custom lifecycle with __Approval

I managed to make approvals working with the __Approval queue, but I’ve made a custom lifecycle for a workflow, and I’d like to change my custom status when a ticket is approved or declined. I’ve mapped my custom status to the default as well, but still, I can’t manage to make an approval change the status.

Thanks for your help!

I believe you need to do a local overlay of the approvals code in share/html/Approvals/index.html since it looks like the status values are hard coded:

    my ($val, $msg);
    if ( $ARGS{$arg} eq 'deny' && $ticket->Status !~ /^(rejected|deleted)/ ) {
        ( $val, $msg ) = $ticket->SetStatus('rejected');
    }
    elsif ( $ARGS{$arg} eq 'approve' && $ticket->Status ne 'resolved') {
        ( $val, $msg ) = $ticket->SetStatus('resolved');
    }
    push ( @actions, loc("Approval #[_1]: [_2]",$ticket->id, $msg )) if ($msg);
}