dhils...@performair.com schrieb:
I had a technician close a ticket with a state of "closed unsuccessful," when in fact it should have been "closed successful."

Where can I go in the tables to change that?

If you really want to do it in the database directly, here's how I would get to it. I'm going from memory here, so consult mysql manuals in case of any doubts.

- log into mysql (either as root or as otrs user, as you need read/write access
- "use otrs;" to chooose the database
- "show tables;" to list all tables

You will need several tables. There's the ticket state table for one. I don't know the exact name, I assume ticket_state.
- "explain ticket_state;" to have mysql tell you about all fields in this table
- "select * from ticket_state;" (short list probably) to list all entries

This will give you the state ids you need: The id for "closed unsuccessfully" and the id for "closed successfully".

Now on to exploring where the ticket state is saved. If I remember correctly, that's either in the ticket table or in the article table. Have mysql tell you that via "explain ticket;".

You do not want to do a "select * from ticket" without more details. But you should know the ticket number for the offending ticket. So you can look at the current entry via "select * from ticket where tn="your ticket number";"

(Read the rest completely before executing!)

Now to change the value, once you are very sure you know the where statement will select the right table row, it's something like (I'm guessing the names, verify them!)

"update ticket set state_id=<closed_successfully_id> where tn="your ticket 
number";"

(replace table name, field name, and the id for the "closed successfully" state in this command!)

Before you do that update command, first lock the otrs tables via "lock tables otrs.*;" (look up syntax if mysql objects). Then repeat the last select command to ensure your where clause is still the correct one. Only you can do changes now, so once this is verified, no one can spoil it any more. Then you do the update. And then you do "unlock tables;" so others can work with the database again. The more users your OTRS system has, the better prepare this block of commands, as no one can change anything in the system while you keep the tables locked. Which is exactly why you lock them in the first place!

Hope that helps you along,

Susan

---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

Reply via email to