Bugzilla – Attachment 137859 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.59 KB, created by
Biblibre Sandboxes
on 2022-07-19 09:45:47 UTC
(
hide
)
Description:
Bug 31105: Holds to pull counts items from other branches when independentbranches is active
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2022-07-19 09:45:47 UTC
Size:
2.59 KB
patch
obsolete
>From b552a959a6181c84b05d0f3a9b86299f27cee5e7 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> >--- > 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 90b178a1ce..a5dff5aff7 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 3f2f39b83d..742a64dd00 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