Question

Currently I run some tests with OTRS.

I searched for a possibility to delete the waste queues and found somewhere a tip to do that via deleting the records in the database.

Proceed:

  • Removing constraint:

    ALTER TABLE queue_standard_response DROP FOREIGN KEY ‘FK_queue_standard_response_queue_id_id’;

  • Deleting the records

    For one thing in the queue table, and for another thing in the queue_standard_response table.

  • ADD constraint again

    ALTER TABLE queue_standard_response ADD CONSTRAINT FK_queue_standard_response_queue_id_id FOREIGN KEY (queue_id) REFERENCES queue (id);

The problem is, that I still see the deleted queues in Queue Manager also after clearing the browser cache. Out of which table is OTRS fetching these information?

Do someone have a solution?

Was it helpful?

Solution

It's the local OTRS application cache. If you'd run bin/otrs.DeleteCache.pl on the command line, you'd be fine.

OTHER TIPS

For people who read this thread later and want to delete a queue in OTRS via database and its related tickets, the following fragment can be used:

USE `otrs_database`;

# We eliminate the verification of the foreign keys 
# so as not to have to eliminate the constraints
SET FOREIGN_KEY_CHECKS = 0;

# TICKETS
DELETE FROM ticket_index WHERE queue_id = QUEUE_ID;
DELETE FROM ticket_history WHERE queue_id = QUEUE_ID;
DELETE FROM ticket WHERE queue_id = QUEUE_ID;
# QUEUE
DELETE FROM queue_preferences WHERE queue_id = QUEUE_ID;
DELETE FROM queue_standard_template WHERE queue_id = QUEUE_ID;        
DELETE FROM queue_auto_response WHERE queue_id = QUEUE_ID;
DELETE FROM personal_queues WHERE queue_id = QUEUE_ID;
DELETE FROM queue WHERE id = QUEUE_ID;

# We add again the verification of the foreign keys
SET FOREIGN_KEY_CHECKS = 1;

Logically, before you need to know the unique id of your queue to delete.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top