Bugzilla – Attachment 58034 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]
[SIGNED-OFF] Bug 17741: Use Koha::Patron->holds when deleting a patron
SIGNED-OFF-Bug-17741-Use-KohaPatron-holds-when-del.patch (text/plain), 1.21 KB, created by
Josef Moravec
on 2016-12-07 22:03:09 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 17741: Use Koha::Patron->holds when deleting a patron
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2016-12-07 22:03:09 UTC
Size:
1.21 KB
patch
obsolete
>From 3cfdf3dbf17b7208967efc5f370b26862f9a0226 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] [SIGNED-OFF] Bug 17741: Use Koha::Patron->holds when deleting > a patron > >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> >--- > Koha/Patron.pm | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index a40d6f0..11f80bd 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