Bugzilla – Attachment 58627 Details for
Bug 17741
Use Koha::Patron->holds in Koha::Patron->delete
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17741: Use Koha::Patron->holds when deleting a patron
Bug-17741-Use-KohaPatron-holds-when-deleting-a-pat.patch (text/plain), 1.29 KB, created by
Marcel de Rooy
on 2017-01-06 09:20:43 UTC
(
hide
)
Description:
Bug 17741: Use Koha::Patron->holds when deleting a patron
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-01-06 09:20:43 UTC
Size:
1.29 KB
patch
obsolete
>From d57943505993b0708f1e7d50c5a18e6e9cb996c1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 7 Dec 2016 03:21:43 +0000 >Subject: [PATCH] Bug 17741: Use Koha::Patron->holds when deleting a patron >Content-Type: text/plain; charset=utf-8 > >There is a TODO in Koha::Patron->delete, this method should call the >Koha::Patron->holds to retrieve the holds made by the patron we are >removing instead of calling Koha::Holds->search > >Test plan: > prove t/db_dependent/Koha/Patrons.t >Should return green > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Patron.pm | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index ffdd7e3..3790884 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -66,8 +66,7 @@ sub delete { > $self->_result->result_source->schema->txn_do( > sub { > # Delete Patron's holds >- # FIXME Should be $patron->get_holds >- $_->delete for Koha::Holds->search( { borrowernumber => $self->borrowernumber } ); >+ $self->holds->delete; > > # Delete all lists and all shares of this borrower > # Consistent with the approach Koha uses on deleting individual lists >-- >2.1.4
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 17741
:
58022
|
58034
| 58627