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

Both sides previous revisionPrevious revision
Next revision
Previous revision
resolution_area:prometheus_resolutions:res-p9118 [2022/12/15 13:52] 10.91.110.100resolution_area:prometheus_resolutions:res-p9118 [2022/12/23 16:02] (current) 10.91.110.100
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 22: Line 22:
 WHERE WHERE
   pt.parent_id IS NOT NULL;   pt.parent_id IS NOT NULL;
-WHERE +</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 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.1671112377.txt.gz · Last modified: 2022/12/15 13:52 by 10.91.110.100