User Tools

Site Tools


resolution_area:prometheus_resolutions:res-p9118

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
resolution_area:prometheus_resolutions:res-p9118 [2022/09/26 12:15] – created 10.91.110.100resolution_area:prometheus_resolutions:res-p9118 [2022/12/23 16:02] (current) 10.91.110.100
Line 4: Line 4:
  
  
-**Purpose:** Notify operations that a grand child ticket is on the system.+**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. **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.
Line 11: Line 11:
  
 **Manual Action Steps:** Query to check for grand child tickets. **Manual Action Steps:** Query to check for grand child tickets.
-<code>SELECT+<del><code> SELECT
   pt.id AS child_id,   pt.id AS child_id,
   pt.parent_id AS parent_id,   pt.parent_id AS parent_id,
Line 17: Line 17:
   gc.parent_id AS  grand_child_parent_id   gc.parent_id AS  grand_child_parent_id
 FROM FROM
-  ticket pt +  ticketer.ticket pt 
-JOIN ticket gc ON+JOIN ticketer.ticket gc ON
   gc.parent_id = pt.id   gc.parent_id = pt.id
 WHERE WHERE
-  pt.parent_id IS NOT NULL;</code>+  pt.parent_id IS NOT NULL; 
 +</code>
      
 From the query above take the child_id value and set the parent_id to null From the query above take the child_id value and set the parent_id to null
-<code>update ticketer.ticket set parent_id = NULL where id = <child_id>;</code> +<code>update ticketer.ticket set parent_id = NULL where id = <child_id>;</code></del>
  
 +Just execute the below query:
 +<code>
 +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);
 +</code>
  
-**Auto Clear:** Will not clear when there are no grand child tickets on system.+**Auto Clear:** Will clear when there are no grand child tickets on system.
resolution_area/prometheus_resolutions/res-p9118.1664190921.txt.gz · Last modified: 2022/09/26 12:15 by 10.91.110.100