Bugzilla – Attachment 190653 Details for
Bug 41467
When transfer not allowed the 'Originating branch' is not populated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41467: Return from branch for transfer NotAllowed
Bug-41467-Return-from-branch-for-transfer-NotAllow.patch (text/plain), 2.82 KB, created by
Roman Dolny
on 2025-12-20 12:44:50 UTC
(
hide
)
Description:
Bug 41467: Return from branch for transfer NotAllowed
Filename:
MIME Type:
Creator:
Roman Dolny
Created:
2025-12-20 12:44:50 UTC
Size:
2.82 KB
patch
obsolete
>From 283571b791e3190ae542433c56fc3437c328e856 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 17 Dec 2025 14:07:02 +0000 >Subject: [PATCH] Bug 41467: Return from branch for transfer NotAllowed > >This patch adds the from branch to the returned error and simplifies >the logic of the test > >We have effective_itemtype so don't need a conditional based on item type level > >To test: > 1 - SET syspref UseBranchTransferLimits/BranchTransferLimitsType > To Enfore based on collection > 2 - Administration->Library Transfer limits click (Advanced editor) > 3 - Uncheck Centerville->Fairfield for 'Fiction' > 4 - Find or create a Fiction item at centerville > 5 - Circulation->Transfer > 6 - Attempt to transfer item to Fairfield > 7 - Note 'Originating library' is blank > 8 - Apply patch > 9 - Restart all >10 - Attempt transfer again >11 - Error is fully populated > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >--- > C4/Circulation.pm | 13 +++---------- > circ/branchtransfers.pl | 3 ++- > 2 files changed, 5 insertions(+), 11 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 0b2b57e375..71fe6c7802 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -354,16 +354,9 @@ sub transferbook { > my $code = > C4::Context->preference("BranchTransferLimitsType") eq 'ccode' > ? $item->ccode >- : $item->biblio->biblioitem->itemtype; # BranchTransferLimitsType is 'ccode' or 'itemtype' >- if ( C4::Context->preference("item-level_itypes") >- && C4::Context->preference("BranchTransferLimitsType") eq 'itemtype' ) >- { >- if ( !IsBranchTransferAllowed( $tbr, $fbr, $item->itype ) ) { >- $messages->{'NotAllowed'} = $tbr . "::" . $item->itype; >- $dotransfer = 0; >- } >- } elsif ( !IsBranchTransferAllowed( $tbr, $fbr, $code ) ) { >- $messages->{'NotAllowed'} = $tbr . "::" . $code; >+ : $item->effective_itemtype; # BranchTransferLimitsType is 'ccode' or 'itemtype' >+ if ( !IsBranchTransferAllowed( $tbr, $fbr, $code ) ) { >+ $messages->{'NotAllowed'} = $fbr . "::" . $tbr . "::" . $code; > $dotransfer = 0; > } > } >diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl >index 9799b3c64a..ab0ad57b13 100755 >--- a/circ/branchtransfers.pl >+++ b/circ/branchtransfers.pl >@@ -206,7 +206,8 @@ foreach my $code ( keys %$messages ) { > > # Do we really want a error log message here? --atz > $err{errnotallowed} = 1; >- my ( $tbr, $typecode ) = split( /::/, $messages->{'NotAllowed'} ); >+ my ( $fbr, $tbr, $typecode ) = split( /::/, $messages->{'NotAllowed'} ); >+ $err{fbr} = $fbr; > $err{tbr} = $tbr; > $err{code} = $typecode; > } elsif ( $code eq 'WasReturned' ) { >-- >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 41467
:
190583
| 190653