MantisBT: master d46001bd

Author Committer Branch Timestamp Parent
dregad dregad master 2013-11-08 03:26 master 7b483a81
Affected Issues  0016584: Error when query bug by custom-field (date) in postgresql
Changeset

Fix error with PostgreSQL when filtering on date custom field

As PostreSQL tries to add 0 to a string, it throws an error as it tries
to operate on different data types.

I can only guess that the +0 was a hack to convert type from string to
integer on MySQL.

Implementing solution proposed by user kensonman, using standard SQL
functions CAST, COALESCE and NULLIF to achieve a clean and portable
conversion to numeric (this assumes that the data stored in the
custom_fields_string table 'value' column is indeed numeric; if not we
would get other errors or warnings)

Note: this requires bumping MySQL minimum requirement to 5.08, since
DECIMAL type used in CAST was only added in that release.

Fixes 0016584

mod - core/filter_api.php Diff File
mod - docbook/Admin_Guide/en-US/Installation.xml Diff File