due date on task

michaeldeutsch
Kilo Expert

I can't seem to figure this piece out.   I do not understand where Delivery time and Due Date are being set.

Due Date on task.   When I submit a Request I kick off a workflow that creates a task that is set up like this

find_real_file.png

However, when the task is created I am getting strange timing of 2 days (after weekend + 5 hours)

find_real_file.png

Additionally on the request it gives a delivery time of today

find_real_file.png

When I used a Duration of 5 hours, it pushed out Due Date to 3 weeks out.   I don't understand how these times are being calculated.

I would like to set the task to be 5 days, + a second task of 1 day.   So Delivery time would be 6 total days, and each task 5 days and 1 day respectively/

1 ACCEPTED SOLUTION

williamsun
Mega Guru

Have you checked your schedule?


When you set the duration to "1 Day 1 Hour" it's actually 25 hours, and if you have a schedule it will consider these as business hours.


So if your schedule is set to be 8-6 then that means 10 hours, so 25 business hours turns out to be 2.5 business days, or 2 days + 5 hours.


If you wanted it to be 1 Day and 1 Hour you should make it 1 business day (10 hours) and add 1 hour, so total of 11 hours, in order to get a business one day and one hour.


View solution in original post

4 REPLIES 4

williamsun
Mega Guru

Have you checked your schedule?


When you set the duration to "1 Day 1 Hour" it's actually 25 hours, and if you have a schedule it will consider these as business hours.


So if your schedule is set to be 8-6 then that means 10 hours, so 25 business hours turns out to be 2.5 business days, or 2 days + 5 hours.


If you wanted it to be 1 Day and 1 Hour you should make it 1 business day (10 hours) and add 1 hour, so total of 11 hours, in order to get a business one day and one hour.


mike_allgire
Giga Guru

If you are using a schedule, the you need to enter it in hours as stated by williamsun. I struggled with this for a long time. The workflow sees 1 day in calendar hours and doesn't adjust based on the schedule provided.


A hack that could help this is to update that Duration field with the attribute of "max_unit=hours" and this would stop it from transforming the hours into Days and Hours.


michaeldeutsch
Kilo Expert

I finally found this in the Wiki: Defining a Service Catalog Workflow - ServiceNow Wiki



Expected timeDays 7 Hours 00:00:00. Because workflows cannot calculate the end time (not all of the activities within the workflow have defined times), the Expected time on the workflow becomes the Delivery Time on the catalog request.

Note:When both Expected time and Schedule are filled in, the catalog delivery time is then calculated based on the combination of both. For example, if you put 2 days as Expected time, it is calculated as 48 hours. If you then add a schedule that define a work day as 8 hours, the delivery time becomes 48 / 8 = 6 days. If your schedule excludes weekends, the calculation will also add 2 days for the weekend, making the delivery time 8 days.