Merge pull request #23265 from OPEN-DSI/develop_new_notify_contributor_when_new_public_message_on_ticket
NEW : notify also the contributor affected to a ticket if a new message public is post
This commit is contained in:
commit
c3b293fc45
@ -2449,6 +2449,16 @@ class Ticket extends CommonObject
|
|||||||
$assigned_user_dont_have_email = $assigned_user->getFullName($langs);
|
$assigned_user_dont_have_email = $assigned_user->getFullName($langs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!empty($conf->global->TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_ALSO_CONTRIBUTOR)) {
|
||||||
|
$contactList = $object->liste_contact(-1, 'internal', 0, 'CONTRIBUTOR');
|
||||||
|
if (is_array($contactList)) {
|
||||||
|
foreach ($contactList as $contactArray) {
|
||||||
|
if (!empty($contactArray['email'])) {
|
||||||
|
$sendto[] = dolGetFirstLastname($contactArray['firstname'], $contactArray['lastname']) . " <" . $contactArray['email'] . ">";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (empty($sendto)) {
|
if (empty($sendto)) {
|
||||||
if (!empty($conf->global->TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL)) {
|
if (!empty($conf->global->TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL)) {
|
||||||
$sendto[] = $conf->global->TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL;
|
$sendto[] = $conf->global->TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user