Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Update ticket numbers format

Hi,
I have a problem with sorting ticket numbers in the list. I read in github that this can happen, if ticket number has first letters and then -number, so i decided to update all ticket numbers to a new format, from XX-####### to #######-XX.

My help topics use 4 different numbers so, i created and run the following queries :
UPDATE `ost_ticket`
SET number = CONCAT(CAST((SUBSTRING(NUMBER, 4)) AS CHAR(7)) ,"-CC")
WHERE number like "CC-%";
UPDATE `ost_ticket`
SET number = CONCAT(CAST((SUBSTRING(NUMBER, 4)) AS CHAR(7)) ,"-DI")
WHERE number like "DI-%";
UPDATE `ost_ticket`
SET number = CONCAT(CAST((SUBSTRING(NUMBER, 4)) AS CHAR(7)) ,"-OP")
WHERE number like "OP-%";
UPDATE `ost_help_topic`
SET number_format = CONCAT(CAST((SUBSTRING(number_format, 4)) AS CHAR(7)) ,"-CC")
WHERE number_format like "CC-%";
UPDATE `ost_help_topic`
SET number_format = CONCAT(CAST((SUBSTRING(number_format, 4)) AS CHAR(7)) ,"-EB")
WHERE number_format like "EB-%";
UPDATE `ost_help_topic`
SET number_format = CONCAT(CAST((SUBSTRING(number_format, 4)) AS CHAR(7)) ,"-DI")
WHERE number_format like "DI-%";
UPDATE `ost_help_topic`
SET number_format = CONCAT(CAST((SUBSTRING(number_format, 4)) AS CHAR(7)) ,"-OP")
WHERE number_format like "OP-%";

Is it anything else i forgot to do or thats it?

Regards
George

Comments

  • Not that I can think of off the top of my head.
    unless ticket numbers are also 'cached' in the cdata tables.

Sign In or Register to comment.