diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php
index 6547b98471a..fb0ce5a91f5 100644
--- a/htdocs/core/class/notify.class.php
+++ b/htdocs/core/class/notify.class.php
@@ -81,7 +81,8 @@ class Notify
'EXPENSE_REPORT_VALIDATE',
'EXPENSE_REPORT_APPROVE',
'HOLIDAY_VALIDATE',
- 'HOLIDAY_APPROVE'
+ 'HOLIDAY_APPROVE',
+ 'ACTION_CREATE'
);
@@ -502,12 +503,18 @@ class Notify
$object_type = 'holiday';
$mesg = $outputlangs->transnoentitiesnoconv("EMailTextHolidayValidated", $link);
break;
- case 'HOLIDAY_APPROVE':
- $link = ''.$newref.'';
- $dir_output = $conf->holiday->dir_output;
- $object_type = 'holiday';
- $mesg = $outputlangs->transnoentitiesnoconv("EMailTextHolidayApproved", $link);
- break;
+ case 'HOLIDAY_APPROVE':
+ $link = ''.$newref.'';
+ $dir_output = $conf->holiday->dir_output;
+ $object_type = 'holiday';
+ $mesg = $outputlangs->transnoentitiesnoconv("EMailTextHolidayApproved", $link);
+ break;
+ case 'ACTION_CREATE':
+ $link = ''.$newref.'';
+ $dir_output = $conf->agenda->dir_output;
+ $object_type = 'action';
+ $mesg = $outputlangs->transnoentitiesnoconv("EMailTextActionAdded", $link);
+ break;
}
$ref = dol_sanitizeFileName($newref);
$pdf_path = $dir_output."/".$ref."/".$ref.".pdf";
@@ -718,6 +725,12 @@ class Notify
$object_type = 'holiday';
$mesg = $langs->transnoentitiesnoconv("EMailTextHolidayApproved", $link);
break;
+ case 'ACTION_CREATE':
+ $link = ''.$newref.'';
+ $dir_output = $conf->agenda->dir_output;
+ $object_type = 'action';
+ $mesg = $langs->transnoentitiesnoconv("EMailTextActionAdded", $link);
+ break;
}
$ref = dol_sanitizeFileName($newref);
$pdf_path = $dir_output."/".$ref."/".$ref.".pdf";
diff --git a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php
index c5a4f450e42..a6078796478 100644
--- a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php
+++ b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php
@@ -46,7 +46,8 @@ class InterfaceNotification extends DolibarrTriggers
'EXPENSE_REPORT_VALIDATE',
'EXPENSE_REPORT_APPROVE',
'HOLIDAY_VALIDATE',
- 'HOLIDAY_APPROVE'
+ 'HOLIDAY_APPROVE',
+ 'ACTION_CREATE'
);
/**
diff --git a/htdocs/install/mysql/data/llx_c_action_trigger.sql b/htdocs/install/mysql/data/llx_c_action_trigger.sql
index eeca137dbc0..c72a8ab7f40 100644
--- a/htdocs/install/mysql/data/llx_c_action_trigger.sql
+++ b/htdocs/install/mysql/data/llx_c_action_trigger.sql
@@ -145,4 +145,4 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_CREATE','Task created','Executed when a project task is created','project',150);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_MODIFY','Task modified','Executed when a project task is modified','project',151);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_DELETE','Task deleted','Executed when a project task is deleted','project',152);
-
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ACTION_CREATE','Action added','Executed when an action is added to the agenda','agenda',700);
diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang
index 7495291cf3f..40f4f019793 100644
--- a/htdocs/langs/en_US/other.lang
+++ b/htdocs/langs/en_US/other.lang
@@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Expense report validated (approval required)
Notify_EXPENSE_REPORT_APPROVE=Expense report approved
Notify_HOLIDAY_VALIDATE=Leave request validated (approval required)
Notify_HOLIDAY_APPROVE=Leave request approved
+Notify_ACTION_CREATE=Added action to Agenda
SeeModuleSetup=See setup of module %s
NbOfAttachedFiles=Number of attached files/documents
TotalSizeOfAttachedFiles=Total size of attached files/documents
@@ -215,6 +216,7 @@ EMailTextExpenseReportValidated=Expense report %s has been validated.
EMailTextExpenseReportApproved=Expense report %s has been approved.
EMailTextHolidayValidated=Leave request %s has been validated.
EMailTextHolidayApproved=Leave request %s has been approved.
+EMailTextActionAdded=The action %s has been added to the Agenda.
ImportedWithSet=Importation data set
DolibarrNotification=Automatic notification
ResizeDesc=Enter new width OR new height. Ratio will be kept during resizing...
diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang
index 0a5abbfbf3a..5120fd52e67 100644
--- a/htdocs/langs/fr_FR/other.lang
+++ b/htdocs/langs/fr_FR/other.lang
@@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Note de frais validée (approbation requise)
Notify_EXPENSE_REPORT_APPROVE=Note de frais approuvé
Notify_HOLIDAY_VALIDATE=Demande de congé validée (approbation requise)
Notify_HOLIDAY_APPROVE=Demande de congé approuvée
+Notify_ACTION_CREATE=Ajout d'action à l'agenda
SeeModuleSetup=Voir la configuration du module %s
NbOfAttachedFiles=Nombre de fichiers/documents liés
TotalSizeOfAttachedFiles=Taille totale fichiers/documents liés
@@ -218,6 +219,7 @@ EMailTextExpenseReportValidated=La note de frais %s a été validée.
EMailTextExpenseReportApproved=La note de frais %s a été approuvée.
EMailTextHolidayValidated=La demande de congé %s a été validée.
EMailTextHolidayApproved=La demande de congé %s a été approuvée.
+EMailTextActionAdded=L'action %s a été ajoutée à l'Agenda.
ImportedWithSet=Lot d'importation (Import key)
DolibarrNotification=Notification automatique
ResizeDesc=Entrer la nouvelle largeur OU la nouvelle hauteur. Le ratio d'aspect est conservé lors du redimensionnement…