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

Duration Difference between Deadline & Planned Finish dates in Work Order in Service Desk 4.5

SOLVED
Go to solution
Highlighted
Anju
Regular Collector

Duration Difference between Deadline & Planned Finish dates in Work Order in Service Desk 4.5

Hello
I am trying to calculate the number of days between Deadline date and Planned Finish date in a work order. I have already tried calculated fields and rules but they don't seem to work for the above. Has anyone done this before?

Your prompt feedback will be highly appreciated.
Thanks
Anju
9 REPLIES
George M. Meneg
Honored Contributor

Re: Duration Difference between Deadline & Planned Finish dates in Work Order in Service Desk 4.5

Hello Anju,

You can enable one of the two custom duration fields and use it for this calculation.

To do that go to Administator Console/Data/Custom Fields/Work Order

Locate the duration, give it a name and enable it either for selected categories or for all categories.

Then create a ui or db rule that will calculate the difference.
menes fhtagn
Anju
Regular Collector

Re: Duration Difference between Deadline & Planned Finish dates in Work Order in Service Desk 4.5

George
Thank you. Appreciate your help and prompt feedback. It worked like magic. I have assigned points to the response as well. Next, though there are different options of display format available for the custom duration field, but nothing seems to work except hours, minutes. I need only days to display but there is no just single days option you have it combined days, hours, minutes but that doesn't seem to work either.
Let me know if you have a fix for this.
Anju
George M. Meneg
Honored Contributor

Re: Duration Difference between Deadline & Planned Finish dates in Work Order in Service Desk 4.5

Hello Anju,

Displaying only days seems not to be possible. However the mixed format (days, hours, minutes) does work but it won't display 0 days. Create a view and have your custom duration as a field. On the view definition press "Fields..." and then "Format...". At the "Format Fields" window select your custom duration field and as format select from the list "days, hours, minutes".

Ah, when assigning points you have to press "Submit" points button or the points won't be assigned.
menes fhtagn
Anju
Regular Collector

Re: Duration Difference between Deadline & Planned Finish dates in Work Order in Service Desk 4.5

Once again, thank you George. The formatting on the view worked but the same format does not work on the form. I have compared with other system duration fields such as planned, actual duration fields and all of them display hours, minutes . May be that is the reason why even a custom field is displayed same no matter what format is actually selected for same(days,hours,minutes). I guess I cannot change the format of the system fields right?

Also, I tried using a number field to display only days using the same ui rule but that does not do any calculation not sure why?

Your help would be appreciated.
Thanks
Anju

Anju
Regular Collector

Re: Duration Difference between Deadline & Planned Finish dates in Work Order in Service Desk 4.5

George
I had pressed submit points prevoiusly and today again but it does not list how many points it just says thankyou for assigning points...Let me know if points are still not assigned.
Thanks
Anju
George M. Meneg
Honored Contributor

Re: Duration Difference between Deadline & Planned Finish dates in Work Order in Service Desk 4.5

Hello Anju,

As you can see the points are not assigned. When points are assigned the points are displayed on the header of the posting, to the right of the date.
menes fhtagn
George M. Meneg
Honored Contributor
Solution

Re: Duration Difference between Deadline & Planned Finish dates in Work Order in Service Desk 4.5

Hello Anju,

In reality date are stored as long numbers on the db. So, if you set a number to be equal to duration, provided that the number is integer, it should list only the number of days.
menes fhtagn
Anju
Regular Collector

Re: Duration Difference between Deadline & Planned Finish dates in Work Order in Service Desk 4.5

Now I have assigned points twice to this reply but it does not show up why? can you confirm if you can see the points. I have assigned 8.
George M. Meneg
Honored Contributor

Re: Duration Difference between Deadline & Planned Finish dates in Work Order in Service Desk 4.5

Yep, I got 8 points on my last post. Thank you :)
menes fhtagn
//Add this to "OnDomLoad" event