Identify and Update Invalid Parent Group Of Tasks
- Last UpdatedSep 15, 2022
- 1 minute read
This script will identify the incorrect parent group listed for a task in a report (SSRS and Auditor Plus) after upgrading to the current version of AVEVA Mobile Operator.
Resolution:
Execute the following script to fix invalid parent group status.
;with itemparent (item_pk, parentGroupFK) as
(
select item_pk, (select group_pk from SATFN_Util_FindParentGroup(ismgt_item.Item_PK)) as parentGroupFK
from ismgt_item
)
UPDATE ISMGT_ITEM
SET ParentGroupFK = p.parentGroupFK
FROM ismgt_item
INNER JOIN itemparent p ON ISMGT_ITEM.ITEM_PK = p.item_pk
WHERE p.parentGroupFK != ISMGT_ITEM.ParentGroupFK