0 Replies Latest reply on Oct 10, 2009 9:38 PM by dmshimself

    Using a scheduled calculation for current assignment on an upgrade to 7.3

    dmshimself ITSMMVPGroup

      The new calculation feature of 7.3 allows a field (or more) to show the current assignment (group, user, role) of an incident and this is a neat way of doing what was a little more complex in 7.2.  However as it's a beforesave calculation, the assignment value will only show correctly when a new assignment is made.  Untouched incidents will have a null value in the calculation.  This is fine for a new installation but for upgrades, I'd recommend setting the calculation to be a scheduled one initially and crank all your incidents through it.  Then flick the switch in BOD to make the calculation a before save and it will then be right from that point onwards.

       

      As an FYI I've found the following calculation a little tighter than the one regularly used.  It might be more careful than you need at the moment, but it seems to work for all the test cases we have put it through.  My thanks to a more logical brain than mine for refining this for me.  Just the group is shown.

       

      import System
      static def GetAttributeValue(Incident):
      if Incident.Assignments.Count == 0:
        return ""
      lastAssig = Incident.Assignments.Latest()
      if lastAssig.Group == null:
        return ""
      Value = lastAssig.Group.Title
      return Value

       

      Also have manual dependancies of

      Assignments
      Assignments/User
      Assignments/Group