Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.16
-
Fix Version/s: 4.7.19
-
Component/s: Core CiviCRM
-
Labels:None
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Contributed Code
-
Verified?:No
Description
To reproduce:
- visit civicrm/admin/job?action=add&reset=1, enter a time, and submit the form
- inspect the database and find that the field is NULL
The cause:
Timestamp fields are explicitly excluded from $dao->save() operations.
The conservative fix:
Update CRM/Admin/Form/Job.php. Execute a second query (not using $dao->save()) to save the timestamp after the initial insert. (Actually, there is too much business logic in this form. That logic should be moved to a BAO and the fix should be made there, thinning out the form layer.)
The fix that seems more right but which will probably break a bunch of stuff:
How arbitrary that timestamps can't be saved via the DAO! Not all timestamp fields are "on update CURRENT_TIMESTAMP" fields. Strip that junk out!
Attachments
Issue Links
- supplements
-
CRM-20178 Writes to timestamp fields are silently ignored by $dao->save()
- Done/Fixed