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

Re: Calcul time spent by analyst on every problem

$
0
0

The following article has some samples which are close to what you want to do

 

https://community.landesk.com/support/docs/DOC-26389

 

Personally I'd have a Hours and Minutes int16 attributes on a note and total those up to a decimal Hours attribute, something like the following which is for incident notes. Note my pedantic checks for empty attributes are just there to make sure things still work if people change their minds about attributes being mandatory or not.

 

import System
static def GetAttributeValue(Incident):     Hours = 0.00     Minutes = 0.00     for Item in Incident.Notes:     if Item._TimeSpentHours != null:          Hours += Item._TimeSpentHours     if Item._TimeSpentMinutes != null:          Minutes += Item._TimeSpentMinutes     return Hours + Minutes/60.00

Viewing all articles
Browse latest Browse all 12704

Trending Articles