protected function getCustomStatus(Pap_Contexts_Action $context) {
        $context->debug("    Trying to get custom status from request parameter '".Pap_Tracking_ActionRequest::PARAM_ACTION_CUSTOM_STATUS."'");

        $status = $context->getCustomStatusFromRequest();
        if($status != '') {
            $context->debug("        Found custom status: ".$status.", checking");
             
            if(in_array($status, array(Pap_Common_Constants::STATUS_APPROVED, Pap_Common_Constants::STATUS_PENDING, Pap_Common_Constants::STATUS_DECLINED))) {
                $context->debug("        Setting custom status to $status");
                $context->setStatusForAllCommissions($status);
                return true;
            } else {
                $context->debug("        Custom status is incorrect, it must be one of: A, P, D");
            }
        }

        return false;
    }