The letter with code OVERDUE for 'all branches' and message transport type 'phone' has the name "Hold Available for Pickup". There are no other notices with code 'OVERDUE', however there is a letter marked 'ODUE'. This notice can be seen at the bywater demo site (username bywater/password bywater): http://intranet.bywatersolutions.com/cgi-bin/koha/tools/letter.pl and here: http://intranet.bywatersolutions.com/cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=&module=circulation&code=OVERDUE select * from letter where code='OVERDUE'\G *************************** 1. row *************************** module: circulation code: OVERDUE branchcode: name: Hold Available for Pickup is_html: 0 title: Overdue Notice (phone notice) content: Your item is overdue message_transport_type: phone Thsi notice should be deleted; if a default overdue phone notice is needed, it should be added under the code 'ODUE'.
It's a problem with the database update not setting a variable correctly I think, we ran into this too, but lost sight of it
Actually ODUE is Overdue - this notice is new and not needed. I've been deleting it from most installs. Nicole
This became an issue at one of our partner consortia; this database row needs to be deleted before it causes more problems: The library had several additional OVERDUE notices: select module, code, branchcode, name, is_html, title, message_transport_type from letter where code='OVERDUE'; +-------------+---------+------------+----------------------------------+---------+--------------------------------+------------------------+ | module | code | branchcode | name | is_html | title | message_transport_type | +-------------+---------+------------+----------------------------------+---------+--------------------------------+------------------------+ | circulation | OVERDUE | | Item Past Due Alert (2nd Notice) | 0 | Library Item(s) Past Due Alert | email | | circulation | OVERDUE | | Printable Hold notice | 0 | Overdue Notice (phone notice) | phone | | circulation | OVERDUE | XYZZY | Item Past Due Alert (2nd Notice) | 0 | Library Item(s) Past Due Alert | email | | circulation | OVERDUE | ABCDEF | Item Past Due Alert | 0 | Library Item(s) Past Due Alert | email | | circulation | OVERDUE | FOOOBARB | Item Past Due Alert (2nd Notice) | 0 | Library Item(s) Past Due Alert | email | +-------------+---------+------------+----------------------------------+---------+--------------------------------+------------------------+ This caused confusion, because a) The OVERDUE/"All libraries" notice with name "Printable Hold notice" did *not* show as a distinct letter on tools/letter.pl b) tools/overduerules.pl shows available letters by 'letter.name', but only the letter code is stored in the overduerules table. This also points the the necessity of adding a primary key to the letters table, as noted in bug 13215.
Bug 15007 will add a primary key id to the letter table.
This has certainly been caused by 3.15.00.041 (bug 11867). The structure of the letter table is not ideal, it should be split into 2 tables to normalised it. I don't know how we could fix this issue as a script cannot know what is the correct name of the letter.
I think the problem might be here: http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=installer/data/mysql/updatedatabase.pl;h=6ba8e4d88b90acf6512458ae2448fddc81b15308;hb=5574a2fc4952322219892bcff3ea2525fec41949#l8361 $name is explicitly set for the HOLD messages, but never updates for the other messages later on: 8363 my $name = $dbh->selectcol_arrayref(q| 8364 SELECT name FROM letter WHERE code="HOLD" 8365 |); 8366 $name = $name->[0]; So $name is also used for PREDUE and OVERDUE Maybe we could fix that database update - and then also do a database update looking at the code/module and change accordingly.
In 3.22, this seems to have shifted from OVERDUE to PREDUE select * from letter where code = 'PREDUE'\G *************************** 1. row *************************** module: circulation code: PREDUE branchcode: name: Hold Available for Pickup is_html: 0 title: Advance Notice of Item Due (phone notice) content: Your item is due soon message_transport_type: phone 1 row in set (0.00 sec)
Created attachment 49990 [details] [review] Bug 12752: FIX letter names in 3.15.00.041 3.15.00.041 was wrong, the name of the letter should not always been the name of the first HOLD notice. PREDUE_PHONE should be updated with the first name of the PREDUE notice, same for OVERDUE_PHONE and OVERDUE
(In reply to Katrin Fischer from comment #6) > So $name is also used for PREDUE and OVERDUE > > Maybe we could fix that database update - and then also do a database update > looking at the code/module and change accordingly. Yes indeed! Sorry to have been so slow to provide a fix for that.
See also bug 16217 for a global fix.
Created attachment 50369 [details] [review] Bug 12752: FIX letter names in 3.15.00.041 3.15.00.041 was wrong, the name of the letter should not always been the name of the first HOLD notice. PREDUE_PHONE should be updated with the first name of the PREDUE notice, same for OVERDUE_PHONE and OVERDUE Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>
Created attachment 50520 [details] [review] Bug 12752: FIX letter names in 3.15.00.041 3.15.00.041 was wrong, the name of the letter should not always been the name of the first HOLD notice. PREDUE_PHONE should be updated with the first name of the PREDUE notice, same for OVERDUE_PHONE and OVERDUE Signed-off-by: Chris Cormack <chrisc@catalyst.net.z> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
QA: Looking at this one now.
Created attachment 50879 [details] [review] Bug 12752: FIX letter names in 3.15.00.041 3.15.00.041 was wrong, the name of the letter should not always been the name of the first HOLD notice. PREDUE_PHONE should be updated with the first name of the PREDUE notice, same for OVERDUE_PHONE and OVERDUE Signed-off-by: Chris Cormack <chrisc@catalyst.net.z> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to Master - Should be in the May 2016 Release. Thanks!
Patch pushed to 3.22.x, will be in 3.22.7
Pushed to 3.20.x will be in 3.20.11