Page 1 of 1

Add note doesn't update field Updated

Posted: Tue Nov 07, 2017 11:50 am
by mcaneel
When a note has been added to a ticket the field Updated still shows the date and time from the previous reply. Why doesn't HESK update the field Updated when a note has been added?

Re: Add note doesn't update field Updated

Posted: Tue Nov 07, 2017 7:26 pm
by Klemen
Adding notes doesn't effect tickets database table, so the last change is never triggered. This was one of design decisions along the way.

However, you should be able to change this relatively easy:
1. backup existing files
2. download and install Notepad++
3. open file admin/admin_ticket.php in Notepad++
4. find line

Code: Select all

/* Notify assigned staff that a note has been added if needed */
5. just ABOVE that line add

Code: Select all

hesk_dbQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` SET `lastchange`=CURRENT_TIMESTAMP WHERE id=".intval($ticket['id']));
6. save, upload and test

Re: Add note doesn't update field Updated

Posted: Mon Nov 13, 2017 11:30 am
by mcaneel
Thank you for your answer, we have changed the code and it seems to work all well!