Quantcast
Channel: Ivanti User Community: Message List
Viewing all articles
Browse latest Browse all 12704

Re: Calculating time Since Breach

$
0
0

Still no joy on this one.

 

Calc error logging shows an "Object not set..." error whenever I run the above calculation on a non-breached call (whichever way round the dates are).

 

So I've tried different methods (such as below) but still can't find a way of recording time left until breach when resolving incidents.

 

I don't seem to be able to use the MinutestoBreach function from the Resolution object.

 

[Before Save calc on Int32 - "Minutes left on SLA at Resolution"]

 

import System

static def GetAttributeValue(Resolution):

     if Resolution.Incident.IsBreached.ToString() == 'False':

          if Resolution.Incident.MinutesToBreach() != null:

               return Resolution.Incident.MinutesToBreach()

          else:

               return Resolution.Incident.ResponseLevel.TurnaroundTime

    else:

       TimePeriod = Resolution.Incident.GetBusinessTime(Resolution.Incident.BreachTime, Resolution.CreationDate)

       Varmins = Int32.Parse(String.Format("{0}", Math.Floor(TimePeriod.TotalMinutes)))

       return Varmins * -1

 

Am I doing something stupid? 

 

For the time being I will just record times against *breached* calls on resolution but it seems a shame we can only record this info for the SLAs we missed, not the ones we met.

 

Cheers.


Viewing all articles
Browse latest Browse all 12704

Trending Articles