Description
Shi Yao Wang
2022-07-05 15:24:33 UTC
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. |