Bugzilla – Attachment 166648 Details for
Bug 35434
Non-superlibrarians should not place holds in other libraries when IndependentBranches is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35434: IndependentBranches prevents non-superlibrarians from placing holds in other libraries
Bug-35434-IndependentBranches-prevents-non-superli.patch (text/plain), 3.05 KB, created by
Baptiste Bayche
on 2024-05-13 15:11:45 UTC
(
hide
)
Description:
Bug 35434: IndependentBranches prevents non-superlibrarians from placing holds in other libraries
Filename:
MIME Type:
Creator:
Baptiste Bayche
Created:
2024-05-13 15:11:45 UTC
Size:
3.05 KB
patch
obsolete
>From 98cc4ef54223fa9d8b72fc9f3c5ffee0be897556 Mon Sep 17 00:00:00 2001 >From: Emily-Rose Francoeur <emily-rose.francoeur@inLibro.com> >Date: Wed, 29 Nov 2023 10:42:54 -0500 >Subject: [PATCH] Bug 35434: IndependentBranches prevents non-superlibrarians > from placing holds in other libraries > >I updated the hold page on the staff interface so that non-superlibrarians can't place holds in other libraries when the system preference 'IndependentBranches' is enabled. > >TEST PLAN >1) Appy the patch. >2) In 'Koha administration > System preferences', set 'IndependentBranches' to 'yes'. >3) In 'Koha administration > Circulation and fines rules', add a rule by only clicking the 'Save' button (this will create a circulation rule for all patron categories and all item types, allowing unlimited holds). >4) Create a staff patron (with username and password). > ---> In 'Patrons > + New patron > Staff', fill the required fields, add a username and password. > ---> Remember the home library. > ---> Click the 'Save' button. >5) Add permissions to the created patron. > ---> In the patron detail page, click on 'More > Set permissions' and check the following boxes: > - Staff access, allows viewing of catalogue in staff interface > - Add, modify and view patron information > - Place and modify holds for patrons > ---> Click the 'Save' button. >6) Create an other patron of any patron category with the same home library as the staff patron you created. >7) Create a record with one item. > ---> In 'Cataloging > + New record', fill the required fields. > ---> Click the 'Save' button. > ---> You should now be in the item form. Fill the required field (home library and current library should be the same as the patron's home library). > ---> Click the 'Add item' button. >8) On the record details page, click 'Place hold' and search for the patron you created in step 6. > ---> In the 'Pickup at' field, you should see all the libraries. > ---> In the 'Allowed pickup locations' column of the item, you should see the same. >9) Log out from the staff interface and login with the staff patron you created. >10) Click 'Search catalog' from the search bar and search for the record you created. >11) On the record details page, click 'Place hold', then search for the patron in step 6. > ---> In the 'Pickup at' field, you should only see the home library of the item. > ---> In the 'Allowed pickup locations' column of the item, you should see the same. > >Signed-off-by: Anni Rajala <anni.rajala@turku.fi> >Signed-off-by: baptiste <baptiste.bayche@inlibro.com> >--- > Koha/Item.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 91c15b22d5..e83c26125e 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -988,6 +988,8 @@ is not passed. > sub pickup_locations { > my ($self, $params) = @_; > >+ return Koha::Libraries->search( { branchcode => $self->holdingbranch } ) if C4::Context->preference("IndependentBranches") && !C4::Context->IsSuperLibrarian(); >+ > Koha::Exceptions::MissingParameter->throw( parameter => 'patron' ) > unless exists $params->{patron}; > >-- >2.34.1
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 35434
:
159346
|
161509
|
166648
|
169917
|
169918
|
169919