Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Bug in Touch.js - function doHideTime

I have been experiencing a lot of unexplained and erratic behaviour with Business Rules. After much furtling around I have located the offending code in the file touch.js. The function doHideTime is generating a javascript error (.getHours() is not a function) which interrupts the subsequent flow of business rule logic. (I have a number of business rules that are triggered before, during and after certain actions - this uncaught error stops subsequent actions from executing.)

By rewriting the code thus:

function doHideTime(value) {
var hour = 0,
minute = 0,
second = 0;
if (Date.parse(value.toString)) {
hour = value.getHours();
minute = value.getMinutes();
second = value.getSeconds();
}
return (hour == 0 && minute == 0 && second == 0);
}

... the error disappears and I get the expected behaviour from my sundry business rules. The original code was not checking to see if the value passed was a date. (My data model has a nullable date field - I'm guessing that this routine fails when the value passed is null.)

This function starts on line 6451 of Touch.js.

1) I'm on version 8.7.13.0 - has this been fixed in 8.7.14.0? I see no mention of it in the release notes.

2) File touch.ui (app/js/daf/touchui.js) does not retain my edit and only works when in Visual Studio. How can I make my edit permanent so that I can browse and Generate in the COT app?

Kind regards,

Paul

2 people have
this problem
+1
Reply