I'm trying to find the trigger that displays, Date Completed {{time}}, when user changes status to completed. I've looked, but I seem to can't find it. I want to input an algorithm to when status change from completed to billed, to not remove those fields from view, only when status change from completed to billed.
Announcement
Collapse
No announcement yet.
Can't find the trigger for task status, completed
Collapse
X
-
Code:application/Espo/Modules/Crm/Repositories/Task.php protected function beforeSave(Entity $entity, array $options) { parent::beforeSave($entity, $options); if ($entity->isFieldChanged('status')) { if ($entity->get('status') == 'Completed') { $entity->set('dateCompleted', date('Y-m-d H:i:s')); } else { $entity->set('dateCompleted', null); } }
-
When I change the one line of code to, $entity->get('status') == 'Billed', to see if from the user side will display the label of DATE COMPLETED and the time, it doesn't show. I know I can keep the field, datecompleted, in the db to still have to the time it completed it's task, but for the user's visual comfort, I want the label of DATE COMPLETED and time still be visible when status has been changed from completed to billed. I can write the algorithm on the server to do that, but from the client side, when user changes status to completed, there is some trigger to display the label of DATE COMPLETED and the time. I'm looking for that.
Comment
Comment