Job Entry and MES - Auto Closing lines

I'm trying to find a way to automatically close an operation if the
previous operation has been completed. Example, operation 50 was
complete, but operation 10 is still open. I'd like to be able to have
operation 10 complete automatically if the finally operation,
operation 50, has been complete.