Script error in Collaboration Offline Email Batching Script Action


Description

Issue in the above script action Collaboration Offline Email Batching Script Action when reviewing logs for an unrelated issue. This also seems to be present in my New York PDI. It seems that math is incorrectly used inplace of Math, the latter seems to work fine in background script

org.mozilla.javascript.EcmaError: "math" is not defined.
Caused by error in sysevent_script_action.0f338b329f132100d5f9b3e2957fcf07.script at line 15

12: var hoursInterval = 0;
13: var delayString = "";
14: if(minutesInterval >= 60) {
==> 15: hoursInterval = math.floor(minutesInterval / 60);
16: minutesInterval = minutesInterval % 60;
17: if(hoursInterval < 10)
18: delayString += "0";

Steps to Reproduce

Execute the same code of the script as background, or even executing math.floor(22 / 60); you will see the same error as math is not a valid javascript object because the language is case sensitive.

Workaround

"The statement "math.floor()" is inside an IF condition which compares the value of collaboration.email_interval and checks if it's greater than "60" and only when the comparison is true, the math.floor() statement will be executed.

Hence the IF condition will never be true and the statement will never be executed and won't cause an issue."

There is no workaround but disregard this message in the logs. 


Related Problem: PRB1376468