Trouble with Updated column not updating always
Posted: Wed Mar 27, 2013 6:01 pm
Script URL:
Version of script: 2.4.2
Hosting company: self hosted
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: Updated column, lastchange
Write your message below:
Klemen,
Since updating to version 2.4.2 from version 2.3 we have noticed that in some cases the Updated column does not update when another response is added to a ticket. Today this annoyance made me find the time to locate the issue. The trouble is when two responses in a row are made by the original submitter. Setting lastchange equaling NOW() was removed for some reason between versions 2.3 and 2.4.2 or maybe even 2.4.
reply_ticket.php => line 140 => $sql = "UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `status`='1',`lastreplier`='0' WHERE `id`=".hesk_dbEscape($ticket['id'])." LIMIT 1";
admin/admin_ticket.php => line 207 => $sql = "UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `lastchange`=NOW(), `lastreplier`='".hesk_dbEscape($last_replier)."', `replierid`=".hesk_dbEscape($replier_id)." $status_sql WHERE `id`=".hesk_dbEscape($ticket['id'])." LIMIT 1";
The trouble occurs as I've said when the original submitter responds twice to a ticket. The UPDATE sql is smart enough to know that no changes occur and therefore does not update the lastchange column in the tickets table. I'm adding the SET `lastchange`=NOW() into the reply_ticket.php file. What I'm wondering is will this break something else I'm not seeing at the moment?
We love Hesk and enjoy your continued support!
J
Version of script: 2.4.2
Hosting company: self hosted
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: Updated column, lastchange
Write your message below:
Klemen,
Since updating to version 2.4.2 from version 2.3 we have noticed that in some cases the Updated column does not update when another response is added to a ticket. Today this annoyance made me find the time to locate the issue. The trouble is when two responses in a row are made by the original submitter. Setting lastchange equaling NOW() was removed for some reason between versions 2.3 and 2.4.2 or maybe even 2.4.
reply_ticket.php => line 140 => $sql = "UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `status`='1',`lastreplier`='0' WHERE `id`=".hesk_dbEscape($ticket['id'])." LIMIT 1";
admin/admin_ticket.php => line 207 => $sql = "UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `lastchange`=NOW(), `lastreplier`='".hesk_dbEscape($last_replier)."', `replierid`=".hesk_dbEscape($replier_id)." $status_sql WHERE `id`=".hesk_dbEscape($ticket['id'])." LIMIT 1";
The trouble occurs as I've said when the original submitter responds twice to a ticket. The UPDATE sql is smart enough to know that no changes occur and therefore does not update the lastchange column in the tickets table. I'm adding the SET `lastchange`=NOW() into the reply_ticket.php file. What I'm wondering is will this break something else I'm not seeing at the moment?
We love Hesk and enjoy your continued support!
J