Bug 5647 - Enhanced Notices are using name and not id
Summary: Enhanced Notices are using name and not id
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Henri-Damien LAURENT
QA Contact: Bugs List
Depends on:
Reported: 2011-01-21 13:47 UTC by Nicole C. Engard
Modified: 2012-10-26 00:51 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2011-01-21 13:47:30 UTC
According to bug 5646 the messaging preferences can't be translated because the code queries the name and not the id.  I am opening a new bug here because that bug has been "resolved" with a work around.  Instead I think the code should be updated to check for the primary key (id) instead of the name.  This is necessary for translations and so that we can make changes to those labels.

From Bug 5646 (reported by Katrin)

If you tranlate the message names in the installer sql files your messages will
stop working, because the code relies on those have a specific value.

- advance_notices.pl
- C4/Members/Messaging.pm
- C4/Form/MessagingPreferences.pm


In C4/Members/Messaging.pm I found following lines:
47   my $preferences = C4::Members::Messaging::GetMessagingPreferences( {
borrowernumber => $borrower->{'borrowernumber'},
48   message_name   => 'DUE' } ); 
50   my $preferences = C4::Members::Messaging::GetMessagingPreferences( {
categorycode => 'LIBRARY',
51  message_name   => 'DUE' } );

We don't have DUE as a message name in the en file. Bug?
Comment 1 Katrin Fischer 2012-04-14 12:02:51 UTC
The translatabilty problem for message names has been solved on template level.