Bugzilla – Attachment 139496 Details for
Bug 31105
Holds to pull counts items from other branches when independentbranches is active
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31105: Holds to pull counts items from other branches when independentbranches is active
Bug-31105-Holds-to-pull-counts-items-from-other-br.patch (text/plain), 2.64 KB, created by
Kyle M Hall (khall)
on 2022-08-19 13:58:05 UTC
(
hide
)
Description:
Bug 31105: Holds to pull counts items from other branches when independentbranches is active
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-08-19 13:58:05 UTC
Size:
2.64 KB
patch
obsolete
>From 1e096f22ccf9781fe469ba4ff9e923a248c6d4d5 Mon Sep 17 00:00:00 2001 >From: Shi Yao Wang <shi-yao.wang@inlibro.com> >Date: Tue, 5 Jul 2022 12:03:52 -0400 >Subject: [PATCH] Bug 31105: Holds to pull counts items from other branches > when independentbranches is active > >Holds to pull should not show items from other branches that shares a >record when IndependentBranches is active. Except for superlibrarians. > >Test plan: >1- Have IndependentBranches set to Yes >2- Have a record with an item from the current branch and another item from a different branch. We will call them branch A and branch B respectively >3- Have a patron from branch A place a hold on that record >4- Have a staff account on branch A and B with the following permissions: > - circulate (all) > - catalogue >5- Go to circulation > holds to pull >6- Notice under "Libraries" it displays branch A and B. Also, it shows 2 under "Items available" >7- Checkout the item from branch A to another patron >8- Go back to circulation > holds to pull >9- Notice under "Libraries" it displays branch B even though we are in branch A >10- Apply the patch >11- Return the checked out item from step 7 >12- Redo step 5 to 9 with superlibrarian privileges and notice nothing changed >13- Redo step 11-12 but using accounts from step 4 and notice Holds to >pull only shows information relevant to their branch > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Items.pm | 1 + > circ/pendingreserves.pl | 4 ++-- > 2 files changed, 3 insertions(+), 2 deletions(-) > >diff --git a/Koha/Items.pm b/Koha/Items.pm >index 3e4eece94e..5e9e808eee 100644 >--- a/Koha/Items.pm >+++ b/Koha/Items.pm >@@ -76,6 +76,7 @@ sub filter_by_for_hold { > withdrawn => 0, > notforloan => { '<=' => 0 }, # items with negative or zero notforloan value are holdable > ( C4::Context->preference('AllowHoldsOnDamagedItems')? (): ( damaged => 0 ) ), >+ ( C4::Context->only_my_library() ? ( homebranch => C4::Context::mybranch() ) : () ), > }; > > if ( C4::Context->preference("item-level_itypes") ) { >diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl >index a438557ed1..86a18b14f0 100755 >--- a/circ/pendingreserves.pl >+++ b/circ/pendingreserves.pl >@@ -181,8 +181,8 @@ if ( !C4::Context->preference('AllowHoldsOnDamagedItems') ){ > $where{'itembib.damaged'} = 0; > } > >-if ( C4::Context->preference('IndependentBranches') ){ >- $where{'itembib.holdingbranch'} = C4::Context->userenv->{'branch'}; >+if ( C4::Context->only_my_library() ){ >+ $where{'me.branchcode'} = C4::Context->userenv->{'branch'}; > } > > # get all distinct unfulfilled reserves >-- >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 31105
:
137181
|
137859
| 139496 |
140902