Bug 12100: ensure that messaging preferences displays saved Days in Advance
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 17 Apr 2014 11:30:44 +0000 (13:30 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 28 Apr 2014 21:35:18 +0000 (21:35 +0000)
commit9d94396f7596fe30a5cd84ee7ddc7e8ae3af59d2
tree1f46a6a6915239c1ebe29263ea238a595d4c95dd
parent7e8f5f52c05bd425b4251f01f0253303eec6ca96
Bug 12100: ensure that messaging preferences displays saved Days in Advance

If you have enhanced messaging preference, the Days in Advance combo
value (in Patron Messaging Preferences) is saved in the database but
not retrieved when you have not enabled the Email checkbox (or checkbox
for any other transport) next to it.

This patch does the following:
[1] It replaces a JOIN by a LEFT JOIN that is the actual reason of the
    problem described.
[2] Removes a FIXME by saving a hardcoded 30 into a constant.
[3] Fixes a typo in the neighborhood.
[4] Removes a superfluous comma in the map statement.
[5] Simplifies code for the selected field of the days combo. It should
    just be a boolean. The text selected="selected" is in the template.

Test plan:
[1] Enable enhanced messaging preferences.
[2] Fill in Days in advance for Advance notice but uncheck Email.
[3] Save the preferences.
[4] The member home screen does not display the number of days (until you
    decide to apply this patch :)

Followed test plan. Works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Form/MessagingPreferences.pm
C4/Members/Messaging.pm