diff --git a/application/Espo/Modules/Crm/Jobs/SubmitPopupReminders.php b/application/Espo/Modules/Crm/Jobs/SubmitPopupReminders.php index 2daa2ddd1c..6f1f4b8613 100644 --- a/application/Espo/Modules/Crm/Jobs/SubmitPopupReminders.php +++ b/application/Espo/Modules/Crm/Jobs/SubmitPopupReminders.php @@ -50,6 +50,7 @@ class SubmitPopupReminders extends \Espo\Core\Jobs\Base 'type' => 'Popup', 'remindAt<=' => $now, 'startAt>' => $nowShifted, + 'isSubmitted' => false, ])->find(); $submitData = []; @@ -100,6 +101,10 @@ class SubmitPopupReminders extends \Espo\Core\Jobs\Base } $submitData[$userId][] = $data; + + $reminder->set('isSubmitted', true); + + $this->getEntityManager()->saveEntity($reminder); } foreach ($submitData as $userId => $list) { diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Reminder.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Reminder.json index ca162afe59..d677fcec49 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Reminder.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Reminder.json @@ -31,6 +31,9 @@ "userId": { "type": "varchar", "maxLength": 50 + }, + "isSubmitted": { + "type": "bool" } }, "collection": {