Range search of dates is broken in 7.14.3

SuiteCRM version: 7.14.3

After upgrading SuiteCRM we found that filtering opportunities by date_created with range search enabled was yielding no results when searching for dates “after” a selected value, and was yielding too many results (not filtering at all) when searching for dates “before”.

Upon inspecting the logs, we found that the query for the listview after the filter was incorrect and the where clause of the query was using the current date, no matter the value of the date selected in the SearchForm.

After some digging the issue was solved by undoing the latest commit to the file SearchForm2.php, which consisted in a single line:

removing this line instantly made our searches yield the expected results.

As I understand it, the commit was made to fix some other issue, but I would suggest it be reviewed anew. We didn’t comment directly on the commit as we do not have a github account, and would otherwise have no need for it.

We had a hard time finding any information on the problem we were having so this post is also meant as a guide for anyone who might run into similar issues.

So we don’t have to put that code in our 7.13 instance?