Describe the bug
When the undo-workitemresolution function is called, the resolved by user relationship is still present on the workitem
Help us reproduce the bug
Version of the connector you are using:5.0.3
Expected behavior
The Resolved By User Relationship should be deleted as well
Location and Environment
Where are you running this from? : Workflow
What SCSM version are you running? (i.e. 2012R2, 2016, 2016 UR3, 1801, etc.): 2019
The function does not have any code where the relationship gets deleted. SO maybe "bug" is not correct here.
I added the following code to the customevents "Invoke-AfterReactivate" function
Describe the bug When the undo-workitemresolution function is called, the resolved by user relationship is still present on the workitem
Help us reproduce the bug Version of the connector you are using:5.0.3
Expected behavior The Resolved By User Relationship should be deleted as well
Location and Environment Where are you running this from? : Workflow What SCSM version are you running? (i.e. 2012R2, 2016, 2016 UR3, 1801, etc.): 2019
The function does not have any code where the relationship gets deleted. SO maybe "bug" is not correct here.
I added the following code to the customevents "Invoke-AfterReactivate" function
if($workItem.ClassName -in 'System.WorkItem.Incident','System.WorkItem.Problem') { $resbyUserObject = Get-SCSMRelationshipObject -BySource $workItem -Filter "RelationshipId -eq '$($workResolvedByUserRelClass.Id)'" @scsmMGMTParams if($resbyUserObject) { try { remove-scsmrelationshipobject -SMObject $resbyUserObject } catch { $logMessage = $_.Exception.Message New-SMEXCOEvent -Source "CustomEvents" -EventId 25 -LogMessage $logMessage -Severity "Warning" } } }
but imo this would be fine for the base connector