Page 1 of 1
All old tickets dates were updated during the hesk update.
Posted: Sun Mar 29, 2015 4:44 pm
by MOB
Script URL:
Version of script: 2.6.2
Hosting company: canaca.com
URL of phpinfo.php: PHP version: 5.4.26 (MySQL)
URL of session_test.php: MySQL version: 5.0.96-community-log
What terms did you try when SEARCHING for a solution: updated
Write your message below:
I just updated hesk from 2.5.5 to 2.6.2.
The issue is that all (old) past tickets dates have been updated to the date when the database update was done. So now all old tickets can't be sorted from newest to oldest (at least the last true date it was last updated).
For example, if I open an old ticket. The last reply was done in 2009. But on the top and also on the Home page all the tickets have the same "updated" date when I updated the database (install).
Is there a way to fix this? I still have a full back of the database and also files. I can revert it back and start all over.
The only thing I did prior to the 2.6.2 update was that I had installed the Patch Update for HESK 2.5.4-2.5.5 back in February 2015.
Re: All old tickets dates were updated during the hesk updat
Posted: Sun Mar 29, 2015 6:07 pm
by Klemen
This happens because the database structure was modified in 2.6.0 and ticket values need to be updated.
There is no officially-supported way around this, but it may be possible with some PHP/MySQL knowledge:
Option 1: write a script that will get the "lastchange" value from old 2.5 database (hesk_tickets table) and manually overwrite values in the 2.6 database.
- or -
Option 2: before updating 2.5.x to 2.6.x, change the "lastchange" column structure by removing the "ON UPDATE CURRENT_TIMESTAMP" property, do the update then apply "ON UPDATE CURRENT_TIMESTAMP" back to the column structure.
Re: All old tickets dates were updated during the hesk updat
Posted: Sun Mar 29, 2015 8:50 pm
by MOB
Option 2 seems to be easier to do. I'll give it a whirl right now.
Just for reference. I've never been able to export just a column from a table. Do you happen to know how? If yes a script somewhere? I sort of love phpBB built-in backup tool, where we can select a table and choose whether we want the structure as well as the data. But for a column from a table, isn't an option. Plus then how to make sure the data imported will fall in according to the ticket ID column order and so on?
Another thing. From time to time, I've noticed that when we first login to desk. The last solved ticket update date gets refreshed and starts from the start. Why is that? I wonder? Is it a bug or part of what you tried to fix with update 2.6.2?
Re: All old tickets dates were updated during the hesk updat
Posted: Mon Mar 30, 2015 6:46 am
by Klemen
phpMyAdmin is a great tool for exporting/importing/editing MySQL databases and most hosts have it available. To export just a column though you would have to write a custom script to read that column values from the database.
When you login to HESK it checks for tickets that should be resolved based on your "Autoclose tickets after X days" setting, that's why you see some newly resolved ones. You can set this setting to 0 to disable auto-resolving of old tickets.
Re: All old tickets dates were updated during the hesk updat
Posted: Mon Mar 30, 2015 10:45 am
by MOB
Thanks! But I do like the auto-resolve feature.
I was able to do option 2 (above) and that did not update all my old tickets. So it was a success.
Was just thinking.... how about you add a feature during the upgrade install that it will do it in these steps: The goal is to make it noob friendly.
First Step
After pressing the upgrade button, it should update the
desk_tickets table and on the
lastchange column to update it to temp remove the
ON UPDATE CURRENT_TIMESTAMP.
2nd Step
After the above step, to have another button to proceed to update the database changes and files.
3rd Step
After the above step, to have another button to proceed to revert the changes made in First Step by restoring
ON UPDATE CURRENT_TIMESTAMP on the
lastchnage column for the
desk_tickets table.
4th Step
Message saying that update was complete or other messages where it tells you to remove certain old files or directories and also remove the install folder and etc.
Re: All old tickets dates were updated during the hesk updat
Posted: Mon Mar 30, 2015 4:34 pm
by Klemen
I won't give any promises, but will indeed consider removing the ON UPDATE CURRENT_TIMESTAMP during updates to avoid future confusion.
Re: All old tickets dates were updated during the hesk updat
Posted: Fri Jun 05, 2015 6:25 am
by unitednetworks
I have this issue as well and I don't think that we as customers should be tasked with writing a script to resolve the issue or reverting to a backup and losing tickets created since the update occurred. That's a lot of work to resolve an issue that shouldn't have happened in the first place. Please create a script for us to run to resolve this in a more user-friendly fashion. If all of the dates are simply lost then you've lost a customer.
Re: All old tickets dates were updated during the hesk updat
Posted: Fri Jun 05, 2015 11:16 am
by Klemen
This change has been included for HESK 2.6.3 (expected release in 1-2 weeks).
However, if you already upgraded to 2.6.2 the only way to take advantage of this is to restore previous version then update to 2.6.3 directly when available.