Bugzilla – Attachment 193797 Details for
Bug 39658
Allow definition of non-hierarchical linked patron accounts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39658: (follow-up) linked hold pickup all types
Bug-39658-follow-up-linked-hold-pickup-all-types.patch (text/plain), 4.92 KB, created by
Andrew Fuerste-Henry
on 2026-02-24 17:22:52 UTC
(
hide
)
Description:
Bug 39658: (follow-up) linked hold pickup all types
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2026-02-24 17:22:52 UTC
Size:
4.92 KB
patch
obsolete
>From 3f3aa3c92e22c2bc1ce480b6150926bc83d270aa Mon Sep 17 00:00:00 2001 >From: Jacob O'Mara <Jacob.omara@openfifth.co.uk> >Date: Thu, 19 Feb 2026 09:22:16 +0000 >Subject: [PATCH] Bug 39658: (follow-up) linked hold pickup all types > >Linked account hold pickup check now applies to all hold >statuses (Reserved, Transferred, Processing), not just Waiting. > >Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> >--- > C4/Circulation.pm | 56 +++++++++++++++++++++++------------------------ > 1 file changed, 27 insertions(+), 29 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 4c66e6ccc85..ec184f7c4b2 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1248,38 +1248,36 @@ sub CanBookBeIssued { > my $resbor = $res->{'borrowernumber'}; > if ( $resbor ne $patron->borrowernumber ) { > my $hold_patron = Koha::Patrons->find($resbor); >- if ( $restype eq "Waiting" ) { > >- # Check if hold is for a linked account >- my $is_linked_account = 0; >- if ( C4::Context->preference('EnablePatronAccountLinking') >- && C4::Context->preference('AllowLinkedAccountHoldPickup') ) >- { >- my $linked_ids = $patron->all_linked_borrowernumbers; >- $is_linked_account = grep { $_ == $resbor } @$linked_ids; >- } >+ # Check if hold is for a linked account >+ my $is_linked_account = 0; >+ if ( C4::Context->preference('EnablePatronAccountLinking') >+ && C4::Context->preference('AllowLinkedAccountHoldPickup') ) >+ { >+ my $linked_ids = $patron->all_linked_borrowernumbers; >+ $is_linked_account = grep { $_ == $resbor } @$linked_ids; >+ } > >- if ($is_linked_account) { >+ if ($is_linked_account) { > >- # Hold is for a linked account - allow pickup with redirect >- $alerts{LINKED_ACCOUNT_HOLD_PICKUP} = { >- reserve_id => $res->{reserve_id}, >- hold_patron_id => $resbor, >- hold_patron => $hold_patron, >- }; >- } else { >+ # Hold is for a linked account - allow checkout with redirect >+ $alerts{LINKED_ACCOUNT_HOLD_PICKUP} = { >+ reserve_id => $res->{reserve_id}, >+ hold_patron_id => $resbor, >+ hold_patron => $hold_patron, >+ }; >+ } elsif ( $restype eq "Waiting" ) { > >- # The item is on reserve and waiting, but has been >- # reserved by some other patron. >- $needsconfirmation{RESERVE_WAITING} = 1; >- $needsconfirmation{'resfirstname'} = $hold_patron->firstname; >- $needsconfirmation{'ressurname'} = $hold_patron->surname; >- $needsconfirmation{'rescardnumber'} = $hold_patron->cardnumber; >- $needsconfirmation{'resborrowernumber'} = $hold_patron->borrowernumber; >- $needsconfirmation{'resbranchcode'} = $res->{branchcode}; >- $needsconfirmation{'reswaitingdate'} = $res->{'waitingdate'}; >- $needsconfirmation{'reserve_id'} = $res->{reserve_id}; >- } >+ # The item is on reserve and waiting, but has been >+ # reserved by some other patron. >+ $needsconfirmation{RESERVE_WAITING} = 1; >+ $needsconfirmation{'resfirstname'} = $hold_patron->firstname; >+ $needsconfirmation{'ressurname'} = $hold_patron->surname; >+ $needsconfirmation{'rescardnumber'} = $hold_patron->cardnumber; >+ $needsconfirmation{'resborrowernumber'} = $hold_patron->borrowernumber; >+ $needsconfirmation{'resbranchcode'} = $res->{branchcode}; >+ $needsconfirmation{'reswaitingdate'} = $res->{'waitingdate'}; >+ $needsconfirmation{'reserve_id'} = $res->{reserve_id}; > } elsif ( $restype eq "Reserved" ) { > > # The item is on reserve for someone else. >@@ -3381,7 +3379,7 @@ sub CanBookBeRenewed { > unless CanItemBeReserved( > $patron_with_reserve, $other_item, undef, > { ignore_hold_counts => 1 } >- )->{status} eq 'OK'; >+ )->{status} eq 'OK'; > > # NOTE: At checkin we call 'CheckReserves' which checks hold 'policy' > # CanItemBeReserved checks 'rules' and 'policies' which means >-- >2.39.5
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 39658
:
193344
|
193345
|
193346
|
193347
|
193348
|
193349
|
193350
|
193351
|
193352
|
193353
|
193354
|
193355
|
193356
|
193357
|
193358
|
193359
|
193462
|
193463
|
193464
|
193465
|
193466
|
193467
|
193468
|
193469
|
193470
|
193471
|
193472
|
193473
|
193474
|
193475
|
193476
|
193477
|
193478
|
193479
|
193781
|
193782
|
193783
|
193784
|
193785
|
193786
|
193787
|
193788
|
193789
|
193790
|
193791
|
193792
|
193793
|
193794
|
193795
|
193796
|
193797
|
193798
|
193800
|
193801
|
193802
|
193803
|
193804
|
193805
|
193806
|
193807
|
193808
|
193809
|
193810
|
193811
|
193812
|
193813
|
193814
|
193815
|
193816
|
193817