Bugzilla – Attachment 112850 Details for
Bug 26594
Patrons merge problem with restriction
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26594: Fix patrons merge problem with restrictions
Bug-26594-Fix-patrons-merge-problem-with-restricti.patch (text/plain), 1.84 KB, created by
Kyle M Hall (khall)
on 2020-11-02 15:44:17 UTC
(
hide
)
Description:
Bug 26594: Fix patrons merge problem with restrictions
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-11-02 15:44:17 UTC
Size:
1.84 KB
patch
obsolete
>From 26fd189b7c0eb6db856f0483f629eff701ac5c6c Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 1 Oct 2020 14:19:05 +0200 >Subject: [PATCH] Bug 26594: Fix patrons merge problem with restrictions > >When merging a patron A with restriction(s) into an other patron B, >the entries of borrower_debarments are OK but the value of borrowers.debarred for patron B need to be updated. >An effect of this strange storage of restrictions in both places. > >Test plan : >1) Create a patron A with a manual restriction with some date and > comment >2) Create a patron B with no restriction >3) Merge patron A and B, keeping patron B >4) Look at patron B details page >=> Without patch you see no restriction >=> With patch you see the restriction from patron A > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Patron.pm | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 8f3d8e6990..ccb50dbeeb 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -39,6 +39,7 @@ use Koha::Holds; > use Koha::Old::Checkouts; > use Koha::Patron::Attributes; > use Koha::Patron::Categories; >+use Koha::Patron::Debarments; > use Koha::Patron::HouseboundProfile; > use Koha::Patron::HouseboundRole; > use Koha::Patron::Images; >@@ -622,6 +623,9 @@ sub merge_with { > my $rs = $schema->resultset($r)->search({ $field => $patron_id }); > $results->{merged}->{ $patron_id }->{updated}->{$r} = $rs->count(); > $rs->update({ $field => $self->id }); >+ if ( $r eq 'BorrowerDebarment' ) { >+ Koha::Patron::Debarments::_UpdateBorrowerDebarmentFlags($self->id); >+ } > } > > $patron->move_to_deleted(); >-- >2.24.1 (Apple Git-126)
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 26594
:
111036
|
111058
|
111059
|
111197
|
111198
|
111702
|
111703
|
111704
|
112849
| 112850 |
113094