Bug 36502 - Independent branches should not prevent holds if canreservefromotherbranches is enabled
Summary: Independent branches should not prevent holds if canreservefromotherbranches ...
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Laura Escamilla
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-03 12:02 UTC by Laura Escamilla
Modified: 2024-06-04 12:05 UTC (History)
4 users (show)

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


Attachments
Bug 36502: Canreservefromotherbranches allows staff to place holds even if independent branches is enabled (1.87 KB, patch)
2024-04-03 12:57 UTC, Laura Escamilla
Details | Diff | Splinter Review
Bug 36502: Canreservefromotherbranches allows staff to place holds even if independent branches is enabled (1.92 KB, patch)
2024-04-03 18:53 UTC, ByWater Sandboxes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Laura Escamilla 2024-04-03 12:02:19 UTC
Libraries with IndependentBranches enabled would still like to place holds on items from other branches if they have canreservefromotherbranches enabled as well.
Comment 1 Laura Escamilla 2024-04-03 12:57:50 UTC
Created attachment 164376 [details] [review]
Bug 36502: Canreservefromotherbranches allows staff to place holds even if independent branches is enabled

To test:

1. Enable both the IndependentBranches and canreservefromotherbranches system preferences.
2. Log in to the staff interface with a non-super librarian staff user that has permissions to place holds.
3. Search the catalog for an item.
    1. The non-super librarian user should be able to place holds on item from their branch.
    2. They should see a “No holds allowed” on items from other branches.
4. Apply the patch and restart_all
5. Repeat step 3 or refresh the page.
    1. The non-super librarian can now place holds on items from their branch and other branches.
6. Turn off canreservefromotherbranches
    1. The non-super librarian cannot place holds on items from other branches again.
7. Sign off and have a great day! :D
Comment 2 ByWater Sandboxes 2024-04-03 18:53:34 UTC
Created attachment 164388 [details] [review]
Bug 36502: Canreservefromotherbranches allows staff to place holds even if independent branches is enabled

To test:

1. Enable both the IndependentBranches and canreservefromotherbranches system preferences.
2. Log in to the staff interface with a non-super librarian staff user that has permissions to place holds.
3. Search the catalog for an item.
    1. The non-super librarian user should be able to place holds on item from their branch.
    2. They should see a “No holds allowed” on items from other branches.
4. Apply the patch and restart_all
5. Repeat step 3 or refresh the page.
    1. The non-super librarian can now place holds on items from their branch and other branches.
6. Turn off canreservefromotherbranches
    1. The non-super librarian cannot place holds on items from other branches again.
7. Sign off and have a great day! :D

Signed-off-by: esther <esther@bywatersolutions.com>
Comment 3 Martin Renvoize (ashimema) 2024-06-04 12:05:14 UTC
Sorry Laura, there's a little more work needed here.

We're missing a unit test update (both to fix the failure this introduces and test the new case introduced)

* Proving t/db_dependent/Koha/Items.t KO!

    #   Failed test '2 items for hold, filtered by IndependentBranches'
    #   at t/db_dependent/Koha/Items.t line 2068.
    #          got: '6'
    #     expected: '2'
     # Looks like you failed 1 test of 13.
 
#   Failed test 'filter_by_for_hold'
#   at t/db_dependent/Koha/Items.t line 2078.
 # Looks like you failed 1 test of 20.
 t/db_dependent/Koha/Items.t ..