Holds to pull should not take into account items from other branches that shares a record. To recreate: 1- Have IndependentBranches set to Yes 2- Have a record with 2 items from different branches (set both current/home library) 3- Have a patron from one of the 2 branches in the previous step place a record level hold on that record 4- Go to circulation > holds to pull 5- Notice under "Libraries" it displays 2 branches, the current branch where the patron is from and another one. Also, it shows 2 under "Items available" 6- Checkout the item from the current branch to another patron 7- Go back to circulation > holds to pull 8- Notice under "Libraries" it displays the other branch that is not the current one
Created attachment 137181 [details] [review] 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
Created attachment 137859 [details] [review] 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>
Works as described, thanks for the patch!
Created attachment 139496 [details] [review] 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>
Created attachment 140902 [details] [review] Bug 31105: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 22.11. Nice work everyone, thanks!
-if ( C4::Context->preference('IndependentBranches') ){ +if ( C4::Context->only_my_library() ){ This change seems not related to this problem. It changes behavior for superlibrarians with IndependentBranches = Yes. So now behavior is different from waitingreserves.pl I create a new bug report if we agree.