I have a shell now almost working. However, when editing an event - e.g. by double-clicking it and making changes or by dragging it to a new day - I get this error in the log:[code]Row data [1]
TimesheetID => 1
StartDate => 2017-02-20 11:15
EndDate => 2017-02-20 15:50
Notes => A note…or whatever
TaskID => 2
UserAssignedToID => 1
SubmittedOn => 2017-02-20 16:10:00
AuthorisedOn => null
AuthorisedBy => null
AuthoriseEmailSent => null
ProjectID => 1
ClientID => 1
!nativeeditor_status => updated
UPDATE t_timesheet SET StartDate
=‘2017-02-20 11:15’,EndDate
=‘2017-02-20 15:50’,Notes
=‘A note…or whatever’,TaskID
=‘2’,UserAssignedToID
=‘1’,SubmittedOn
=‘2017-02-20 16:10:00’,AuthorisedOn
=‘null’,AuthorisedBy
=‘null’,AuthoriseEmailSent
=‘null’ WHERE TimesheetID
=‘1’
exception ‘Exception’ with message ‘MySQL operation failed
Incorrect datetime value: ‘null’ for column ‘AuthorisedOn’ at row 1’ in D:\Projects\Web\PHP\Timesheet\IPN\1.01\Scheduler\codebase\connector\db_mysqli.php:14
Stack trace:
#0 D:\Projects\Web\PHP\Timesheet\IPN\1.01\Scheduler\codebase\connector\db_common.php(742): MySQLiDBDataWrapper->query(‘UPDATE t_timesh…’)
#1 [internal function]: DBDataWrapper->update(Object(DataAction), Object(DataRequestConfig))
#2 D:\Projects\Web\PHP\Timesheet\IPN\1.01\Scheduler\codebase\connector\dataprocessor.php(221): call_user_func(Array, Object(DataAction), Object(DataRequestConfig))
#3 D:\Projects\Web\PHP\Timesheet\IPN\1.01\Scheduler\codebase\connector\dataprocessor.php(168): DataProcessor->check_exts(Object(DataAction), ‘update’)
#4 D:\Projects\Web\PHP\Timesheet\IPN\1.01\Scheduler\codebase\connector\dataprocessor.php(97): DataProcessor->inner_process(Object(DataAction))
#5 D:\Projects\Web\PHP\Timesheet\IPN\1.01\Scheduler\codebase\connector\base_connector.php(492): DataProcessor->process(Object(DataConfig), Object(DataRequestConfig))
#6 D:\Projects\Web\PHP\Timesheet\IPN\1.01\Scheduler\codebase\connector\base_connector.php(411): Connector->render()
#7 D:\Projects\Web\PHP\Timesheet\IPN\1.01\Scheduler\data\GetTasks.php(25): Connector->render_table(‘t_timesheet’, ‘TimesheetID’, ‘StartDate,EndDa…’)
#8 {main}
Edit operation finished
0 => action:error; sid:1; tid:1;
Done in 0.0047311782836914s[/code]The relevant columns allow NULL so I know it’s not that. It seems as if the query is having every value treated as a string, hence the surrounding single-quote marks in the log. If I run the query (suitably edited to be the way it should be) using MySQL Workbench, i.e.
UPDATE t_timesheet SET `StartDate`='2017-02-20 11:15',`EndDate`='2017-02-20 15:50',`Notes`='A note...or whatever',`TaskID`='2',`UserAssignedToID`='1',`SubmittedOn`='2017-02-20 16:10:00',`AuthorisedOn`=NULL,`AuthorisedBy`=NULL,`AuthoriseEmailSent`=NULL WHERE `TimesheetID`='1'
the record is updated correctly.
Where/how do I tell the Scheduler how to deal correctly with NULL values?