Opt-in user setting Boolean value incorrectly saved with quotation marks

Bug #1509468 reported by Jeff Davis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Invalid
Undecided
Unassigned

Bug Description

Evergreen 2.8.1
OpenSRF 2.4

In our system, we have action triggers for circulation notice emails that use the following opt-in setting:

name: opac.default_circ_notices_enabled
label: Receive Overdue and Courtesy Emails
datatype: bool
reg_default: true

When registering a patron in the staff client, the registration interface automatically includes a checkbox "Receive Overdue and Courtesy Emails" which is checked by default. This is the desired behavior. However, when saving a new patron record, the value for that user setting is saved in the database as '"true"' (with double quotes), instead of 'true' (no quotes). Subsequently, when OpenILS::Application::Trigger checks the new patron's opt-in setting, it apparently looks for an exact match; in this case, it will conclude that the patron does NOT have this setting set to 'true'. As a result, no circ notice events are generated for this patron, and they receive no circ notice emails, even though the correct box has been checked in the patron editor.

The solution would be to (1) save the user's opt-in setting value without double quotes, since it's a Boolean value, and/or (2) ignore quotes when checking the value during event generation.

Tags: cleanup patron
tags: added: cleanup patron
Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

I was recently looking at how the user settings were handled in the patron registration/edit form, and I'm wondering if this is still a problem?

We make use of several bool opt-in settings as described, and in the web client they are correctly stored without the quotes in 3.3.

Josh

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

I don't see any evidence that it's still a problem in our 3.7 environment, and I wasn't immediately able to reproduce it on a test server. Marking as Invalid. Thanks, Josh!

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.