Don't send a new project email if the manager, reviewer, and producer are all the same

This commit is contained in:
Alex Cabal 2024-12-23 12:10:49 -06:00
parent b7776503cd
commit d94c057e20

View file

@ -389,7 +389,7 @@ final class Project{
if($this->Status == Enums\ProjectStatusType::InProgress){ if($this->Status == Enums\ProjectStatusType::InProgress){
// The manager is also the reviewer, just send one email. // The manager is also the reviewer, just send one email.
if($this->ManagerUserId == $this->ReviewerUserId){ if($this->ManagerUserId == $this->ReviewerUserId){
if($this->Manager->Email !== null){ if($this->Manager->Email !== null && $this->Manager->Name != $this->ProducerName){
$em = new Email(); $em = new Email();
$em->From = ADMIN_EMAIL_ADDRESS; $em->From = ADMIN_EMAIL_ADDRESS;
$em->To = $this->Manager->Email; $em->To = $this->Manager->Email;