diff --git a/src/Service/JobOrderHandler/ResqJobOrderHandler.php b/src/Service/JobOrderHandler/ResqJobOrderHandler.php index 9a9a44a5..3fe0a7bd 100644 --- a/src/Service/JobOrderHandler/ResqJobOrderHandler.php +++ b/src/Service/JobOrderHandler/ResqJobOrderHandler.php @@ -1661,10 +1661,14 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface $em->persist($obj); $em->flush(); - // check if hub has valid mobile number - $phone_number = $this->country_code . $hub->getNotifNumber(); - if (!empty($phone_number)) - $this->sendSMSHubRejection($phone_number, $obj, $jo); + // check the reason. if administrative, do not send SMS + if ($obj->getReason() != JORejectionReason::ADMINISTRATIVE) + { + // check if hub has valid mobile number + $phone_number = $this->country_code . $hub->getNotifNumber(); + if (!empty($phone_number)) + $this->sendSMSHubRejection($phone_number, $obj, $jo); + } } return $error_array;