The CreatorCon Call for Content is officially open! Get started here.

Planned hours rounded off based on the Calendar Event Duration Property - why is message appearing?

SandyL83
Tera Guru

Hello,

A customer indicated that when they clicked "Update Costs" on a Demand record, the following message appears"

Planned hours rounded off based on the Calendar Event Duration Property

 

This doesn't prevent the record from being saved , but the customer is asking why this message is being displayed. 

 

I know there is a script includes called ResourceManagementUtils that appears to be causing this message, but I can't understand the logic: can anyone explain to me why this message is appearing?

Thanks!

ResourceManagementUtils.roundOffBasedOnCalendarEventProperty = function(hours, planLevelRoundOff) {

    var plannedHours = ResourceManagementUtils.roundOff(hours);

    var minTimeUnit = parseInt(gs.getProperty('com.snc.resource_management.allocation_interval_minutes', '60'));

    var timeInMinutes = plannedHours * 60;

    var units = Math.floor(timeInMinutes / minTimeUnit);

    var factor = minTimeUnit / 60;

    var hoursAsPerInterval = units * factor;

    var hoursDifference = plannedHours - hoursAsPerInterval;

    if (hoursDifference > 0 && (JSUtil.notNil(planLevelRoundOff)) && planLevelRoundOff) {

        var message = gs.getMessage('Planned hours rounded off based on the Calendar Event Duration property');

        gs.addInfoMessage(message);

    }

    return hoursAsPerInterval;

};

1 REPLY 1

Faisal Dadabhoy
ServiceNow Employee
ServiceNow Employee

I know it is old post. 
It is just telling you that it is rounding off based on the OOB property and OOB default value.

 

See the doc below and property “com.snc.resource_management.allocation_interval_minutes”
https://docs.servicenow.com/bundle/xanadu-it-business-management/page/product/resource-management/re...