1 Reply Latest reply on Sep 18, 2014 2:55 PM by Jamie Cannon

    Getting Minutes To Breach on Process

    Jamie Cannon ITSMMVPGroup

      I have a request to show the remaining minutes to breach on a query written against Process Management.  I see where Incident and such is written, but writing 'return Process.MinutesToBreach()' like to sing out an error for me.

       

      I can get Breach Time but I just want to show the minutes to breach.  Is this going to involve a calc subtracting creation and breach time?

       

      Thanks,

        • 1. Re: Getting Minutes To Breach on Process
          Jamie Cannon ITSMMVPGroup

          This seems to work for me:

           

          Wrote this as an after read attribute on Process.

           

           

          import System

          static def GetAttributeValue(Process):

                 Value = ""

                

                 if Process.Class.Name != null:

                

                        if Process.Class.Name == "Incident":

                               Value = Process._MinutesToBreach.ToString()

                        if Process.Class.Name == "Request":

                               Value = Process._MinutesToBreach.ToString()

                 return Value