The customer_id is indeed stored with the ticket. That would be why you can't see it. New tickets won't have that problem.
To test on your test server, either:
option 1
make sure the customer user has the correct new customerid, then:
change customers on a ticket, then change to the original customer
or
option 2 - the faster way, but it's also the more dangerous way
Code: Select all
UPDATE ticket SET customer_id="customerID" WHERE customer_user_id="customeruserid";
customerID is the string that you assigned to the company/customer.
customeruserid is a little bit more difficult to determine. It's a unique value to the customer user that could be the email address, the username, an index number...
If I knew a ticketnumber (tn), I'd do this:
Code: Select all
SELECT tn, title, customer_user_id, customer_id FROM ticket WHERE tn="ticketnumber";
Obviously, the only thing that is important is the third column, but "seeing" the other information can give you a better piece of mind that you've got the right ticket, therefore the correct customer_user_id.
Standard disclaimers: backup, verify backup, test, your results may vary, at your own risk, etc.