5 Replies Latest reply on May 14, 2014 3:25 AM by webintegral

    Get CurrentUser in calculation precondition



      I need to let only 'created by' user and 'Raise User' to close an incident

      I create a precondition with calculation ype to test if created by ( or raise user) is the current user

      My code is :

      import System

      static def GetAttributeValue(Incident):

      Value = 'False'

      if Incident.RaiseUser== '$CurrentUser$' or Incident.CreationUser =='$CurrentUser$': Value = 'True'

      return Value

      This is not working for me.

      How can I solve this.What is wrong?

      Please see attached file to have an idea of my resolution process part