Add the preUpdate function with updating date for the project and task entities