User Tools
resolution_area:prometheus_resolutions:res-p9118
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| resolution_area:prometheus_resolutions:res-p9118 [2022/09/26 12:23] – 10.91.110.100 | resolution_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. | ||
| - | < | + | <del>< |
| 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 | + | |
| - | 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;</ | + | pt.parent_id IS NOT NULL; |
| + | </ | ||
| | | ||
| 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 | ||
| - | < | + | < |
| + | 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 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.1664191407.txt.gz · Last modified: 2022/09/26 12:23 by 10.91.110.100