=====GrandChildTicket===== **Level:** __Major__ **Purpose:** Notify operations that is a grand child ticket is on the system. **Scenario:** Grand child tickets prevent a user from moving a ticket to a new state. Issue occurs occasionally when automated system and a user parent a ticket at the exact same time. **Resolution:** Run the "Grand Child Tickets" report which gives you a query to run to resolve the issue. **Manual Action Steps:** Query to check for grand child tickets. SELECT pt.id AS child_id, pt.parent_id AS parent_id, gc.id AS grand_child_id, gc.parent_id AS grand_child_parent_id FROM ticketer.ticket pt JOIN ticketer.ticket gc ON gc.parent_id = pt.id WHERE pt.parent_id IS NOT NULL; From the query above take the child_id value and set the parent_id to null update ticketer.ticket set parent_id = NULL where id = ; Just execute the below query: update ticketer.ticket set parent_id = NULL where id in (select * from (SELECT pt.id AS child_id FROM ticketer.ticket pt JOIN ticketer.ticket gc ON gc.parent_id = pt.id WHERE pt.parent_id IS NOT NULL) a); **Auto Clear:** Will clear when there are no grand child tickets on system.