Service Desk Practitioners Forum
cancel

## Calculated Field in Deadline Calculation

SOLVED
Go to solution
Super Contributor.

## Calculated Field in Deadline Calculation

Hi All,

this is a quick one, we are calculatin the Deadline excluding the non accountable state time "Pending for User availability".

the calculation is as below:
A = Copy of To Deadline (at start of Non Accountable state)
B = To Deadline (At end of Non-Accountable State)
C = Max. Duration
A – B = Non Accountable Duration + C = New Maximum Duration

My question is, in order to achive this i need couple of duration fields, but in SD 4.5 SP 13 we have no custom field of type Duration and all the fields are used up, there are two calculated fields of type Duration can i use these fields for my purpose??

I am aware that if upgrade my SP i will have flexibility with custom fields.

Regards,
Pai

8 REPLIES
Acclaimed Contributor.

## Re: Calculated Field in Deadline Calculation

Hi Pai,

See http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1116953 for another approach (don't be put off by the subject, his question includes the rules you would need to do this)

Hope this helps
Ruth
http://www.teamultra.net
Super Contributor.

## Re: Calculated Field in Deadline Calculation

Hi Ruth, Thanks for the quick response. This is really neat, i can use this solution, but i am a bit confused here ...correct me if i am wrong.

1) Rule 1:
when call is created or modified, if status equals "Waiting for User" then

Planned start = Current Time.

2) Rule 2:
when call is created or modified, if status NOT equals "Waiting for User" then :

Planned Completion Date = Current Time

I understood it till here. now once these 2 are set the Planned duration will be set to the difference of the above two i.e the time duration when the status was in pending. So cant i just add another action

Max Duration = Max Duration + Planned Duration

if am correct, then the deadline should be automatically extended via max duration??

if am wrong, kindly explain the below portion of the rule 2.

Planned Start= Deadline (this is ok)
(Explanation: Now Planned Completion Date becomes equal to Planned Start + Planned Duration(pending Time))
Deadline = Planned Completion Date (this i cant understand)
(Explanation: The Deadline is now extended by the elapsed time in pending status, taking into account business hours.Max Duration is automatically extended to accomodate the new value for Deadline.)

thanks a ton
~~~ regards Pai
Super Contributor.

## Re: Calculated Field in Deadline Calculation

its me again,

I tried following the soltuion blindly, but when i am configuring action 2 under rule 2 i.e

Planned Start= Deadline + Planned Duration

i have no options to select the deadline here , after selecting the function ADD and values, instead i have deadline service.... am i missing something here......
Acclaimed Contributor.
Solution

## Re: Calculated Field in Deadline Calculation

Hi there,

The reason for all the actions in the rules is to ensure that the working hours are taken into account. To do this you have to put the start and end dates of the fields where you want to calculate the duration you want into the Planned start and finish fields; then Planned duration will be the time in a non-accountable state with support hours considered (say X). Then you put the old deadline in planned start (Y) and this will then set planned finish Y+X also taking support hours into consideration. Then you can set the Deadline to planned finish.

Hope this helps

Ruth

http://www.teamultra.net
Super Contributor.

## Re: Calculated Field in Deadline Calculation

Hi ruth, thanks a lot for the explaination..... initially i thought we are using

Planned start= deadline + planned duration in the second action.

my eyes slipped those brackets....i was so dum..

again thanks for the explaination and ur time....

regards,,Pai
Super Contributor.

## Re: Calculated Field in Deadline Calculation

Hi Ruth,
i setup the system to do the calculations....but somehow doesn work for me.

wats happening is .....after the status comes out of waiting for user availabilty ...the dead line gets set to planned completion date that is with out adding the Pending duration. So wats hapening is the final deadline is set to end of pending time ...ie the initial pending completion date.

the second part of the rule where we set Planned start = Deadline
then
deadline = planned completion date is not working ...as it is not adding the pending duration to te planned completion date.

find screen shots of the deadlines
Super Contributor.

## Re: Calculated Field in Deadline Calculation

Hi,

I have these rules running successfully. Seeing as there is only one set of fields which calculate time while taking into account working hours, is it possible to set up multiple database/UI rules to use these fields?

I tried to set this up for two different Service Call statuses and it didn't seem to work correctly.

Thanks,
Justin.
Super Contributor.

## Re: Calculated Field in Deadline Calculation

Hi Justin,

i got it figured out.

watts happenign was ...the rule 2 is to trigger every time a call is saved when status is not "Waiting for user availabily" and the dealine was distorted.

so i just added another condition in rule2 that

NOT (Planned start = EMpty ) and now it works absolutly fine.... even if the call goes through multiple status changes ...it works flawlessly...