Bug 7447 introduces a critical bug in overdue_notices.pl The script is unusable. The variable $date is not replaced with its content.
Created attachment 11497 [details] [review] Bug 8607: FIX overdues_notices script: $date is not replaced
Created attachment 11561 [details] [review] SIGNED-OFF-Bug-8607-FIX-overdues_notices-script-date.patch AS STAFF: I set More -> Tools -> Patrons and Circulation -> Overdue notice/status triggers Select a library: Midway First Student 1 Overdue Notice which adds a row to the overduerules table (with branchcode 'MPL' categorycode='ST' delay1 letter1='ODUE' I cataloged a biblio with a barcode (so we can check it out) I set up a borrower Joe Cool who belongs to Midway Branch Library AS BORROWER: I signed in as my borrwer Joe I checked out the cataloged book. My summary for Joe shows a book checked out. AS DBA: To force the book overdue I used mysql to edit the issue. mysql -uroot -p koha > select * from issues; TO FIND THE CHECKED OUT BOOK > update issues set date_due='2012-08-01 23:59:00' where borrowernumber=51 and itemnumber=1; CHOOSE ACCORDINGLY (It was due 2012-09-01) Now I looked at My Summary for Joe, and his checked out book is OVERDUE and with a red background. Since the overdue_notice.pl script joins across categories, borrowers, issues and it must be an exact match if -t trigger method, I used without -t so the range for the overdue is between 1 and 90 days from the date_due I ran my test accordingly: Before patch: ---------------------------BROKEN root@biblio:/home/koha/kohaclone/misc/cronjobs# ./overdue_notices.pl -n DBD::mysql::st execute failed: Unknown column '$date' in 'where clause' at ./overdue_notices.pl line 467. DBD::mysql::st fetchrow failed: fetch() without execute() at ./overdue_notices.pl line 470. git am -i -u -3 <pathToPatch> After patch: ----------------------------FIXED root@biblio:/home/koha/kohaclone/misc/cronjobs# ./overdue_notices.pl -n Use of uninitialized value in pattern match (m//) at ./overdue_notices.pl line 672. Use of uninitialized value in pattern match (m//) at ./overdue_notices.pl line 683. Dear Joe Cool, According to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible. Midway 372 Forest Street Phone: Fax: Email: If you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned. The following item(s) is/are currently overdue: "Paul and his theology " by , 227/.06, Barcode: 111 Fine: GBP Thank-you for your prompt attention to this matter. Midway Staff ----------------------------------------- I did not persue other "rules" defaults, since this is a complex rule engine to test and is out of scope for this fix. Note: The uninitialized warnings. Note: Fine: GBP (when its 0 or not defined) wajasu
Hi wajasu, thx for testing this. I know the fine used to say 0.00 in earlier versions, maybe we need another little fix for this.
I investigated the reason for the Fine: USD instead of Fine $0.00 I fixed that in Bug 8378, as I found that existed. Please refer to that patches comments for details. When this patch gets applied, one should then apply the Bug 8378 patch as the setup is similiar and it will save time. Instead of a followup patch here, I am just refering to Bug 8378 as the followup. wajasu
Replaces single quotes with double quotes so interpolation will work. Marking Passed QA.
Note for myself, this patch is not needed for 3.8.x, as 7447 is not on there
Patch pushed today
Released in 3.10.0