Home Analytics

Resolved by?

Magnus_Lundgren1Magnus_Lundgren1 Customer Adept IT Monkey ✭✭
Is there a way to properly report back the resolved by user.
The dashboards on the portal all report back the assigned to user on resolved and closed incidents.
I want to show who actually resolved the workitem.
There are many cases where our analysts resolv incidents without assigning them to themselfs first.


  • David_Morris1David_Morris1 Member Advanced IT Monkey ✭✭✭
    The resolved user isn't a relationship within SCSM, this information exists in the history and can be found in the DB (but isn't particularly easy to find) 
  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    Additionally you could address this process gap through SCO/SMA monitoring for a Resolved Incident where the Assigned To is null. Then if null, grab the Resolved By relationship and set that user as the Assigned To.
  • Magnus_Lundgren1Magnus_Lundgren1 Customer Adept IT Monkey ✭✭
    Made simple powershell script to change the "Assigned To" if the resolved to is not the same as assigned or if the assigned to is null.
    If the resolved by user is NULL, its a autoresolved SCOM incident and i skip it

    Import-module smlets -Force
    $IRClass = get-scsmclass -name System.WorkItem.Incident$
    $AssignedToRel = get-scsmrelationshipclass -name System.WorkItemAssignedToUser$
    $resolvedByRel = Get-SCSMRelationshipClass -name System.WorkItem.TroubleTicketResolvedByUser$
    $IRs = get-SCSMObject -class $IRClass -Filter "Status -eq 2b8830b6-59f0-f574-9c2a-f4b4682f1681"
    foreach ($IR in $IRs) {
    $AssignedToUser = Get-SCSMRelatedObject -SMObject $IR -Relationship $AssignedToRel
    $ResolvedByUser = Get-SCSMRelatedObject -SMObject $IR -Relationship $resolvedByRel
    if ($ResolvedByUser -eq $null)
    Write-host "SCOM Alert" -ForegroundColor Yellow
    Elseif ($ResolvedByUser.id -ne $AssignedToUser.id -or $AssignedToUser -eq $null) {
    New-SCSMRelationshipObject -Relationship $AssignedToRel -Source $IR -Target $ResolvedByUser -Bulk
    Write-host $IR.Id "Changed Assigned to" $ResolvedByUser.DisplayName -ForegroundColor Red
    Write-Host "already correct" -ForegroundColor Green

  • Jeff_LangJeff_Lang Customer Ninja IT Monkey ✭✭✭✭
    You can get the actual Resolved By user correctly with a SQL Query, i haven;t got the query on hand at the moment, but basically you need to get it from the ServiceManager DB in the specific workitem log table (eg dbo.MT_System$WorkItem$Incident_Log) the record where it is changed from not resolved to resolved.

    one of the fields in the workitem log  table is EntityChangeLogId, this is used to link to the "EntityChangeLog" table.

    Once you get the linked record from the entity changed log table, the EntityId field in the record is the GUID for the object required, you can use that to get the user object from the dbo.MT_System$Domain$User table which will give you the users username/DisplayName etc
  • Roland_KindRoland_Kind Partner Advanced IT Monkey ✭✭✭


    not sure, but maybe the following query will help:


Sign In or Register to comment.