Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Rule to calculate actual Duration

Highlighted
Jessica Rinaldi1
Occasional Advisor

Rule to calculate actual Duration

I have a UI rule created to set the Actual Start of an incident Ticket and a DB rule created to caluate the actual finish of the ticket when it is closed.

I tried to create a UI rule to calulate the Actual Duration as the Actual Finish - the Actual Start. I don't think my action is right because it is coming up as 0hrs 0mins. How is my action incorrect?:

Calculate Duration (Update Data) Actual Duration set to (Subtract Date from [Actual Finish] With [Actual Start])
5 REPLIES
George M. Meneg
Honored Contributor

Re: Rule to calculate actual Duration

Hello Jessica,

Why do you do that? The actual duration is automatically calculated once actual start and actual finish are filled.
menes fhtagn
Vasily Kamenev
Honored Contributor

Re: Rule to calculate actual Duration

Hi Jessica
George is rigth, Actual and Planed calculate automatically: the first set start and the second set finish - you get duration , if you set duration - you get Finish.

Vassili
Martin_234
Super Collector

Re: Rule to calculate actual Duration

Hello George and Vassili.

It is not working always in HPSD. Our customer is using SP9 and sometimes actual duration is not calculated from correct actual start and finish (look screenshot in attachment).

After manually changing (1 minute later for example) one of date field on form duration is calculated. It looks like that HPSD sometimes forget to calculate actual duration.

Planned values are not used by customer :))
Denis Zlokazov
Occasional Contributor

Re: Rule to calculate actual Duration

Sorry for necroposting, guys, but i've faced the same problem: function returns zeroes.

I subtract actual finish with registration time and tried both UI-rule and DB-rule - nothing helped.

According to other threads here my rule is correct. Any ideas?
Denis Zlokazov
Occasional Contributor

Re: Rule to calculate actual Duration

UPD:
Solution is found and quite interesting)
We've removed all incident categories from SD as they were not necessary. So we couldn't set 'available for all categries' for the new custom field and it simply was blocked.

So we added an incident category named 'Category' and everything became normal. Magic...
//Add this to "OnDomLoad" event