Set Ticket modified field on create and update#3142
Set Ticket modified field on create and update#3142marcelfolaron merged 4 commits intoLeantime:masterfrom
Conversation
marcelfolaron
left a comment
There was a problem hiding this comment.
Thanks, this is helpful. Can you use the dtHelper() function though so we ensure the date stored in the db is based on the users date in UTC.
| $stmn->bindValue(':editTo', $values['editTo'], PDO::PARAM_STR); | ||
| $stmn->bindValue(':sortIndex', $values['sortIndex'] ?? '', PDO::PARAM_STR); | ||
| $stmn->bindValue(':editorId', $values['editorId'], PDO::PARAM_STR); | ||
| $stmn->bindValue(':modified', date('Y-m-d H:i:s'), PDO::PARAM_STR); |
There was a problem hiding this comment.
Can you use the dtHelper() function to set the date? That way we ensure the date in the db is set to utc since date() itself will default the server timezone.
so just use: dtHelper()->userNow()->formatDateTimeForDb()
|
|
||
| $stmn = $this->db->database->prepare($sql); | ||
| $stmn->bindValue(':id', $id, PDO::PARAM_STR); | ||
| $stmn->bindValue(':modified', date('Y-m-d H:i:s'), PDO::PARAM_STR); |
There was a problem hiding this comment.
dtHelper()->userNow()->formatDateTimeForDb()
| $stmn->bindValue(':id', $id, PDO::PARAM_STR); | ||
| $stmn->bindValue(':dependingTicketId', $values['dependingTicketId'], PDO::PARAM_STR); | ||
| $stmn->bindValue(':milestoneid', $values['milestoneid'], PDO::PARAM_STR); | ||
| $stmn->bindValue(':modified', date('Y-m-d H:i:s'), PDO::PARAM_STR); |
There was a problem hiding this comment.
dtHelper()->userNow()->formatDateTimeForDb()
| $stmn->bindValue(':status', $status, PDO::PARAM_INT); | ||
| $stmn->bindValue(':sortIndex', $ticketSorting, PDO::PARAM_INT); | ||
| $stmn->bindValue(':ticketId', $ticketId, PDO::PARAM_INT); | ||
| $stmn->bindValue(':modified', date('Y-m-d H:i:s'), PDO::PARAM_STR); |
There was a problem hiding this comment.
dtHelper()->userNow()->formatDateTimeForDb()
|
|
||
| $stmn = $this->db->database->prepare($query); | ||
| $stmn->bindValue(':id', $id, PDO::PARAM_STR); | ||
| $stmn->bindValue(':modified', date('Y-m-d H:i:s'), PDO::PARAM_STR); |
There was a problem hiding this comment.
dtHelper()->userNow()->formatDateTimeForDb()
Description
Link to ticket
#3141
Type