Talking Tech Support - Phase I - Followup - Fix Messaging Preferences
authorKyle M Hall <kyle@bywatersolutions.com>
Mon, 26 Mar 2012 15:43:02 +0000 (11:43 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Sun, 10 Jun 2012 15:46:58 +0000 (17:46 +0200)
commit47e4f3ed84c819f61c4325c94316372cb27fa437
treea509c6602b0ed0e555448bc6947edd2757048326
parentd29efac4f3792df8eb9325cf8a350346972bdbb7
Talking Tech Support - Phase I - Followup - Fix Messaging Preferences

There is a flaw in C4::Members::Messaging::GetMessagingPreferences where
the system assumes that every transport will use the same letter. This
is not necessarily true. Even with the default preferences of just
'email' and 'sms', we should be able to have different letters
for each, as one has a maximum character length ( sms ) and one
does not. GetMessagingPreferences currently uses the letter code
of the last result of its query as the letter code for every transport type.

The returned data is a hashref with a key 'transport_types' that is
an array of transport_types this borrower has selected for the given
alert.

This commit modifies GetMessagingPreferences such that the the
'transport_types' array is now a hash where the name of the transport
type is now a key to the value of the letter code set for that transport
type.

It also modifies code calling GetMessagingPreferences where necessary,
and as a side benefit will correctly get the letter codes for email
and sms correctly, if they are defined differently.

http://bugs.koha-community.org/show_bug.cgi?id=4246
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

In use in production by two libraries: Middletown and Washoe
who give their sign off but don't have git to do so.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
C4/Circulation.pm
C4/Form/MessagingPreferences.pm
C4/Members/Messaging.pm
C4/Reserves.pm
admin/categorie.pl
misc/cronjobs/advance_notices.pl