znuny / Znuny

Znuny/Znuny LTS is a fork of the ((OTRS)) Community Edition, one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management.
https://www.znuny.org
GNU General Public License v3.0
335 stars 82 forks source link

Bug – Deleting a ticket leaves mentions behind. #459

Closed dignin closed 1 year ago

dignin commented 1 year ago

Environment

Expected behaviour

A mention should be deleted, if the ticket is deleted.

Actual behaviour

If users are mentioned in a ticket, and the ticket is deleted, then the mentoin remains.

How to reproduce

Steps to reproduce the behavior:

  1. Mention a user in a ticket.
  2. Delete the ticket.
  3. Notice the mention is still shown for the user.
bin/otrs.Console.pl Maint::Ticket::Delete --ticket-id 1

MariaDB [znuny]> select * from mention\G
*************************** 1. row ***************************
         id: 1
    user_id: 2
  ticket_id: 1
 article_id: 3
create_time: 2023-07-07 06:12:23
1 row in set (0.001 sec)

MariaDB [znuny]> select ticket_id from mention where ticket_id not in (select id from ticket);
+-----------+
| ticket_id |
+-----------+
|         1 |
+-----------+
1 row in set (0.001 sec)

Additional information

Screenshots

Snag_34abb13

dignin commented 1 year ago

github #458 internal 670

dennykorsukewitz commented 1 year ago

Fixed in rel-6_5_4 - rel-6_5-dev - 501e2fd6538f4b2bd57889caaf4dfc4f43802da1 rel-7_0_8 - rel-7_0-dev - 513cccbd8417a05170ce0ad9ec06f37d1ee5a217