Adding new contact note: `Column 'note_date' cannot be null`
Overview
Adding a new note to the contact, civicrm crashes.
Reproduction steps
- Open a Contact.
- Add a new Note, enter a subject and a text, but not a "Note Date" (it is not required). Click Save.
- Got an error "Fatal error: DB Error: constraint violation".
Current behaviour
"message" => "DB Error: constraint violation"
"exception" => PEAR_Exception {#1974
#cause: DB_Error {#1973
+userinfo: "INSERT INTO `civicrm_note` (`entity_table` , `entity_id` , `note` , `contact_id` , `note_date` , `subject` , `privacy` ) VALUES ('civicrm_contact' , 19862 , 'nota di prova' , 19867 , NULL , 'test' , NULL ) [nativecode=1048 ** Column 'note_date' cannot be null]"
Environment information
- CiviCRM: 5.45.1
- PHP: 7.4
- CMS: WordPress 5.8
- Database: MySQL 5.7.7