Add note doesn't update field Updated

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
mcaneel
Posts: 4
Joined: Tue Nov 07, 2017 9:27 am

Add note doesn't update field Updated

Post 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?
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: Add note doesn't update field Updated

Post 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
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
mcaneel
Posts: 4
Joined: Tue Nov 07, 2017 9:27 am

Re: Add note doesn't update field Updated

Post by mcaneel »

Thank you for your answer, we have changed the code and it seems to work all well!
Post Reply