Cannot delete or update a parent row: a foreign key constraint fails

Moderator: crythias

Locked
amdkryn
Znuny expert
Posts: 187
Joined: 02 Oct 2012, 02:52
Znuny Version: 5.0.27

Cannot delete or update a parent row: a foreign key constraint fails

Post by amdkryn »

I created a row "Delete" and moved about 30 tickets for her. I used a task created a few months ago and it has always worked but not working anymore. I try to delete some tickets and the error occurs below, however, Articles and other information are deleted but the ticket is still in the system (only with the subject, type, owner and responsible).

Does anyone know how to solve?

Thu Jan 8 14:42:00 2015 error OTRS-CGI-10 Cannot delete or update a parent row: a foreign key constraint fails (`otrs`.`ticket_index`, CONSTRAINT `FK_ticket_index_ticket_id_id` FOREIGN KEY (`ticket_id`) REFERENCES `ticket` (`id`)), SQL: 'DELETE FROM ticket WHERE id = ?'
Thu Jan 8 14:42:00 2015 notice OTRS-CGI-10 Delete Ticket (1048501/51179).
Thu Jan 8 14:42:00 2015 notice OTRS-CGI-10 Run GenericAgent Job 'Delete Tickets!!!!' from db.
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Cannot delete or update a parent row: a foreign key constraint fails

Post by jojo »

tickets can only be deleted via generic agent
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
amdkryn
Znuny expert
Posts: 187
Joined: 02 Oct 2012, 02:52
Znuny Version: 5.0.27

Re: Cannot delete or update a parent row: a foreign key constraint fails

Post by amdkryn »

Yes, I used only the "Generic agent".
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Cannot delete or update a parent row: a foreign key constraint fails

Post by jojo »

try update to 3.3.11
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Locked