Bugzilla – Attachment 155061 Details for
Bug 32980
Checkouts for guarantees are not shown if patron also has a guarantor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32980: Show checkouts of all guarantors/guarantees (staff interface)
Bug-32980-Show-checkouts-of-all-guarantorsguarante.patch (text/plain), 2.71 KB, created by
Philip Orr
on 2023-09-01 08:02:35 UTC
(
hide
)
Description:
Bug 32980: Show checkouts of all guarantors/guarantees (staff interface)
Filename:
MIME Type:
Creator:
Philip Orr
Created:
2023-09-01 08:02:35 UTC
Size:
2.71 KB
patch
obsolete
>From 611f768d8f567771e09011f379477c1fbd295516 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 16 Feb 2023 14:42:21 +0100 >Subject: [PATCH] Bug 32980: Show checkouts of all guarantors/guarantees (staff > interface) > >Test plan: >1. Create a patron category of type 'Professional' (or any type that > allows guarantors) >2. Create 3 patrons in this category. Let's call them A, B, and C >3. Do at least one checkout for A and at least one for C >4. Make A the guarantor of B, and B the guarantor of C >5. Go to B details page. You should see the checkouts of A and C in the > "Relatives' checkouts" tab >6. Go to B checkout page. You should see the checkouts of A and C in the > "Relatives' checkouts" tab > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Philip Orr <philip.orr@lmscloud.de> >--- > circ/circulation.pl | 9 +++------ > members/moremember.pl | 9 +-------- > 2 files changed, 4 insertions(+), 14 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 9b925e29ad..5888c3f329 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -560,12 +560,9 @@ my $view = $batch > > my @relatives; > if ( $patron ) { >- if ( my @guarantors = $patron->guarantor_relationships()->guarantors->as_list ) { >- push( @relatives, $_->id ) for @guarantors; >- push( @relatives, $_->id ) for $patron->siblings->as_list; >- } else { >- push( @relatives, $_->id ) for $patron->guarantee_relationships()->guarantees->as_list; >- } >+ my @guarantors = $patron->guarantor_relationships()->guarantors->as_list; >+ my @guarantees = $patron->guarantee_relationships()->guarantees->as_list; >+ @relatives = map { $_->id } (@guarantors, $patron->siblings->as_list, @guarantees); > } > my $relatives_issues_count = > Koha::Database->new()->schema()->resultset('Issue') >diff --git a/members/moremember.pl b/members/moremember.pl >index 5813c8d87f..b8a568d908 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -97,17 +97,10 @@ if ( $patron->is_debarred ) { > > $template->param( flagged => 1 ) if $patron->account_locked; > >-my @relatives; > my $guarantor_relationships = $patron->guarantor_relationships; > my @guarantees = $patron->guarantee_relationships->guarantees->as_list; > my @guarantors = $guarantor_relationships->guarantors->as_list; >-if (@guarantors) { >- push( @relatives, $_->id ) for @guarantors; >- push( @relatives, $_->id ) for $patron->siblings->as_list; >-} >-else { >- push( @relatives, $_->id ) for @guarantees; >-} >+my @relatives = map { $_->id } (@guarantors, $patron->siblings->as_list, @guarantees); > $template->param( > guarantor_relationships => $guarantor_relationships, > guarantees => \@guarantees, >-- >2.30.2
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 32980
:
146731
|
155004
|
155014
|
155015
|
155016
| 155061 |
155062
|
155063
|
155201