Can't filter reports on stat cat values that include apostrophe

Bug #1463973 reported by Angela Kilsdonk on 2015-06-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Undecided
Unassigned
2.7
Undecided
Unassigned
2.8
Undecided
Unassigned

Bug Description

When using the 'statistical category entry value text' as a filter in a report, any stat cat values that have an apostrophe in the name (such as St. Mary's) will result in an error message. Stat cat values that do not have an apostrophe filter successfully.

Tested on 2.6.3

Mike Rylander (mrylander) wrote :

When inserting string literal into SQL for Clark, we quote apostrophes with a backslash. That worked fine until Postgres changed its default for the standard_conforming_strings GUC to "on" after which it no longer worked fine.

So, we will now use "dollar quoting" for string literals instead in much the same way we do for our search queries.

Test plan
---------

Pre-patch: Try to run a report where a string value is required as a filter parameter, and include an apostrophe in that string. The
report will fail with an SQL error.

Post-patch: Do the same, it will not fail.

Branch at:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/miker/lp1463973-dollar-quote-literals

tags: added: pullrequest
Angela Kilsdonk (akilsdonk) wrote :

I tested Mike's patch and was able to filter using stat cat value entries with an apostrophe.

tags: added: signedoff
Angela Kilsdonk (akilsdonk) wrote :

I have tested this code and consent to signing off on it with my name, Angela Kilsdonk and my email address, akilsdonk[at]esilibrary.com.

Ben Shum (bshum) wrote :

Pushed to master, rel_2_8, and rel_2_7.

Changed in evergreen:
status: New → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers