How to manually update a client/user phone number in osTicket 1.8.1.x

I'm not sure why anyone would WANT to do this, but on the off chance someone thinks that they need to and wants to try it here is how you can manually add or update an existing client/user phone number in osTicket at the SQL level.

  • First Look up user id in ost_user

SELECT id FROM ost_user where name='THE NAME';lets pretend it returns '15'.

  • Next look up the client phone field (by default this is 3, but we should check just in case.)

SELECT * FROM ost_form_field WHERE label = 'Phone Number';let's pretend that it returns an id = 3.

  • Look for it in ost_form_entry_values

SELECT * FROM ost_form_entry_values where entry_id = 15 and (field_id = 3 OR field_id = 10);You may get two records back. That look something like this:
where XXXXX is a phone number.

To add a missing number
INSERT INTO ost_form_entry_values VALUES(15,Y,'phonenumber','');where Y is 3 or 10 (the missing one)

To update an existing number
UPDATE ost_form_entry_values SET value='NEWphoneNUM' WHERE entry_id=15 AND field_id='Y';where Y is 3 or 10 (the one you want to update)