Database syntax issue in date-based charts

When generating a date-based chart from a search result (for example,
with a ResolvedMonthly grouping), the _FieldToFunction subroutine in
Lib/RT/Report/ generates SUBSTR() statements for the query.

However, MySQL prior to 4.1.1 does not recognize the SUBSTR() function,
requiring instead a SUBSTRING().
ubstr documents the addition of SUBSTR() as an alias to SUBSTRING() with
that release.)

(Yes, we should upgrade, but since the RT wiki recommends MySQL 4.0.18
or newer, it seemed worth pointing out the gap in functionality. For
anyone else who runs into the same problem – you’ll know because of the
SQL syntax errors in your logs as well as by those graphs never showing
any data – as of v3.6.6 the lines that need to be changed in
are 178, 181 and 184.)

Mark Roedel
Senior Programmer / Analyst
LeTourneau University
Longview, Texas USA