Bug 31105 - Holds to pull counts items from other branches when independentbranches is active
Summary: Holds to pull counts items from other branches when independentbranches is ac...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Shi Yao Wang
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-05 15:24 UTC by Shi Yao Wang
Modified: 2022-11-01 22:11 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00


Attachments
Bug 31105: Holds to pull counts items from other branches when independentbranches is active (2.52 KB, patch)
2022-07-05 17:46 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 31105: Holds to pull counts items from other branches when independentbranches is active (2.59 KB, patch)
2022-07-19 09:45 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 31105: Holds to pull counts items from other branches when independentbranches is active (2.64 KB, patch)
2022-08-19 13:58 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 31105: Regression tests (7.92 KB, patch)
2022-09-23 12:57 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Shi Yao Wang 2022-07-05 15:24:33 UTC
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
Comment 1 Shi Yao Wang 2022-07-05 17:46:57 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
Comment 2 Biblibre Sandboxes 2022-07-19 09:45:47 UTC
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>
Comment 3 Sally 2022-07-19 09:46:08 UTC
Works as described, thanks for the patch!
Comment 4 Kyle M Hall 2022-08-19 13:58:05 UTC
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>
Comment 5 Tomás Cohen Arazi 2022-09-23 12:57:32 UTC
Created attachment 140902 [details] [review]
Bug 31105: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Tomás Cohen Arazi 2022-09-23 12:59:05 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!