One of the things we track is who helps along an incident that is not their own, we call this a "touch".
To make it easier to know if someone "touched" an incident I have added a CurrentOwner attribute to my assignments, resolutions, notes, etc. The calculation is pretty basic so stunned as to why it keeps failing, I must be missing something but can't see it.
The attribute is a 100 Character attribute with a default value of Blank, before save calc. The dependencies auto selected Process or incident depending on the object. I have since changed that to Createdon and description on the same object (i.e. Note). I never want this to change so once it changes the value it will never change it again. The problem is that almost every time I get "blank" and I expect a name.
import System
static def GetAttributeValue(Assignment):
if Assignment._CurrentOwner == "Blank":
return Assignment.Process._CurrentAssignedAnalyst
On Incident I have a 100 character string attribute called CurrentAssignedAnalyst that is a After Read type calc that works. Some values end up being null but most end up with owners.:
import System
static def GetAttributeValue(Incident):
Value = ''
if Incident.Category.Title != null:
Assignment = Incident.Assignments.Max("SerialNumber")
if Assignment.User != null:
Value = Assignment.User.Title
return Value