Reset ticket counts for new school year

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
smegnl
Posts: 24
Joined: Wed Jun 20, 2012 8:40 pm

Reset ticket counts for new school year

Post by smegnl »

Script URL: http://support.highlandschools.org/hesk24
Version of script: 2.4
Hosting company: self
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
"reset ticket numbers" "ticket counts"
Write your message below:

What would be your suggested way to reset the ticket count for a new school year? Id like to start back at 1. It is nice to be able to compare volume of tickets from year to year. Also to do reports on different years to see if we have the same issues following us into the new school year.

Again, thanks for the great product. Worth every dollar.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Reset ticket counts for new school year

Post by Klemen »

To reset the count back to 1 you would need to truncate(empty and reset) the hesk_tickets database table:

Code: Select all

TRUNCATE TABLE hesk_tickets
Warning: Truncating a table will delete all tickets inside the database. If this is what you wish I would recommend making a backup copy before proceeding.

If you wish to reset you may also want to truncate the "hesk_replies" and "hesk_attchments" tables and delete any files inside "attachments" folder except index.htm


That said, why not just start ticket numbering from a higher number, for example from 1000 or 10000? To achieve this:

Code: Select all

ALTER TABLE hesk_tickets AUTO_INCREMENT=10000
This way you would keep all existing tickets and the tickets for the new school year would start with ID 10001, 10002, 10003, ... Then next year you can do the same and start tickets from 20001, 20002, 20003...
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
smegnl
Posts: 24
Joined: Wed Jun 20, 2012 8:40 pm

Re: Reset ticket counts for new school year

Post by smegnl »

I did not have to reset my ticket counts for last school year because I moved from V24 to V25 via a reinstall. Is

ALTER TABLE hesk_tickets AUTO_INCREMENT=10000

something I would execute via a sql command or in a config file somewhere? Is it the only table I would need to alter?

Sorry for the dumb question, but I am very limited in sql.
smegnl
Posts: 24
Joined: Wed Jun 20, 2012 8:40 pm

Re: Reset ticket counts for new school year

Post by smegnl »

***NEVERMIND***

being lazy, I used webmin to change the auto increment ticket number of the last ticket for last year to 2999. Then I put in a test ticket and it was ticket 3000. So I am set.

Once again, a great program!!!
Post Reply