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

“Max. duration set to ([Max. duration] + [Pending To Deadline])”

SOLVED
Go to solution
Highlighted
Pinion
HPE Expert

“Max. duration set to ([Max. duration] + [Pending To Deadline])”

Hi all,

I try to create UI rule to calculate this. “Max. duration set to ([Max. duration] + [Pending To Deadline])”.
Max. Duration: System Field
Pending to Deadline: Custom Field (Duration).

Please help…-_-“
-/\-
5 REPLIES
Michael Lutfi
Frequent Visitor

Re: “Max. duration set to ([Max. duration] + [Pending To Deadline])”

good luck you cant do it and its the one thins that is driving all of us that work with SD super NUTS because you can add a timespand but not a date field onto a date field.....annoying isnt it...the only way I found was to write some Java code using web-api and call it from DB rule command line...
Gerry Allardice
Honored Contributor
Solution

Re: “Max. duration set to ([Max. duration] + [Pending To Deadline])”

The ability to extend the deadline after non accountable time has been the holy grail forever. I accidently discovered how to do it the other day using only two standard UI (or DB rules). It has really be possible since service desk 3.0 but I have never discovered it or heard of its use before.

Forget about adding to the Max Duration, try this instead.

You need to make use of Planned Start and Planned Finish, these are usually free in the service call module, they also obey business hours.(if not based on workgroup opening hours)

Rule 1. When the status goes to pending set
Planned Start = system time.

Rule 2. At a later time when pending status is over another UI rule (or DB) does these 3 steps in order.

Planned Finish = system time
Planned Start= Deadline
Deadline = Planned Finish

The Deadline is now extended by the elapsed time in pending status, taking into account business hours.

Why it works???
When Planned Finish = system time
then Planned Duration is set to the difference between system time when Planned Start was set and system time when Planned Finish was set.ie. the time in pending.

Now when Planned Start = Deadline is set the value of Planned Finished is pushed out by that amount.

Then when Deadline = Planned Finish you have set the Deadline to the new value.

Max Duration is automatically extended to accomodate the new value for Deadline.

Gerry
Michael Lutfi
Frequent Visitor

Re: “Max. duration set to ([Max. duration] + [Pending To Deadline])”

Gerry you are a genious I am super impressed with your solution and I actually applied :) and stopped the solution I use to use before which was based on Calling a little piece of magic Java class that adjusted things for me...
dschul
Regular Collector

Re: “Max. duration set to ([Max. duration] + [Pending To Deadline])”

question to this topic. How can I fire a rule when the status pending is over? I'm only able to check the status that come after pending, but then the rule starts always even if the call was not set to pending.

I could set a hidden field to pending=yes and check that. Or is there an easier way?
Gerry Allardice
Honored Contributor

Re: “Max. duration set to ([Max. duration] + [Pending To Deadline])”

The second rule would fire based on
a) the status not being pending and,
b) Planned start not being empty.

The last action it does after it adjusts the deadline is to cleae planned start. This will pevent it firing again unless the first rule again fires because on a new period in pending.
//Add this to "OnDomLoad" event