Bugzilla – Attachment 116906 Details for
Bug 27707
Renewing doesn't work when renewal notices are enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27707: (bug 26639 follow-up) Fix renewals when RenewalSendNotice is set
Bug-27707-bug-26639-follow-up-Fix-renewals-when-Re.patch (text/plain), 1.94 KB, created by
Jonathan Druart
on 2021-02-16 08:22:36 UTC
(
hide
)
Description:
Bug 27707: (bug 26639 follow-up) Fix renewals when RenewalSendNotice is set
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-02-16 08:22:36 UTC
Size:
1.94 KB
patch
obsolete
>From 32d8ad7838ce6bfef20151611ee64aa14a4ad4f0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 16 Feb 2021 09:06:03 +0100 >Subject: [PATCH] Bug 27707: (bug 26639 follow-up) Fix renewals when > RenewalSendNotice is set > >Since bug 26639 we have auto savepoint enabled and the LOCK TABLE query >in C4::Circulation::SendCirculationAlert is not correctly handled. >From the MySQL doc that is copied few lines before, "LOCK TABLE will >commit any transactions", but here we don't have a savepoint and the >release for a non-existent savepoint will throw a DBI exception. > >This patch removes the unecessary transaction and prevent the following >error when a renewal is done: >> DBIx::Class::Storage::DBI::mysql::_exec_svp_release(): DBI Exception: DBD::mysql::db do failed: SAVEPOINT savepoint_0 does not exist [for Statement "RELEASE SAVEPOINT savepoint_0"] at /usr/share/koha/lib/C4/Circulation.pm line 3590 > >Test plan: >1. Enable RenewalSendNotice >2. Add some email address to patron and select the email box from the message preference "Item checkout and renewal" in order to receive renewal emails. >3. Check 1 item out to a patron >4. Renew it >--- > C4/Circulation.pm | 2 -- > 1 file changed, 2 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 401ea2e772..dfde90d810 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3542,7 +3542,6 @@ sub SendCirculationAlert { > } > ) or next; > >- $schema->storage->txn_begin; > C4::Context->dbh->do(q|LOCK TABLE message_queue READ|) unless $do_not_lock; > C4::Context->dbh->do(q|LOCK TABLE message_queue WRITE|) unless $do_not_lock; > my $message = C4::Message->find_last_message($borrower, $type, $mtt); >@@ -3554,7 +3553,6 @@ sub SendCirculationAlert { > $message->update; > } > C4::Context->dbh->do(q|UNLOCK TABLES|) unless $do_not_lock; >- $schema->storage->txn_commit; > } > > return; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27707
:
116906
|
116909
|
116910