Resolve "Filter SMS Hub Rejection" #1664

Merged
korina.cordero merged 3 commits from 738-filter-sms-hub-rejection into master 2023-02-28 10:14:21 +00:00
Showing only changes of commit 5dc4d9f3f8 - Show all commits

View file

@ -1661,10 +1661,14 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface
$em->persist($obj); $em->persist($obj);
$em->flush(); $em->flush();
// check if hub has valid mobile number // check the reason. if administrative, do not send SMS
$phone_number = $this->country_code . $hub->getNotifNumber(); if ($obj->getReason() != JORejectionReason::ADMINISTRATIVE)
if (!empty($phone_number)) {
$this->sendSMSHubRejection($phone_number, $obj, $jo); // 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; return $error_array;