Bug 5647

Summary: Enhanced Notices are using name and not id
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: NoticesAssignee: Henri-Damien LAURENT <henridamien>
Status: CLOSED WONTFIX QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: P5 - low CC: katrin.fischer
Version: unspecified   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5646
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

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.