The branch transfer limits basic editor will always indicate that transfers from a branch to itself are allowed -- when the page loads, it always puts a checkmark under "Allow transfer" for the branch for which one is defining limits. But this checkmark is not reflected in the database. To recreate: - disable AllowHoldPolicyOverride - set UseBranchTransferLimits to Enforce; set BranchTransferLimitsType to itemtype (the also exists when enforcing by collection code, but its impact on holds is easier to see with itemtypes) - go to the branch transfer limits page, see that Allow Transfers is checked for all branches and all itemtypes - in a report, SELECT * FROM branch_transfer_limits, confirm no results -- we put a row in this table for every transfer that's blocked - back on the branch transfer limits, uncheck "Allow transfer" for Books going from Centerville to Centerville, click Save - On save, the page reloads and shows a checkmark under "Allow transfer" for Books going from Centerville to Centerville - back in reports, run your query again, see there is a row in branch_transfer_limits to block the transfer of Books from Centerville to Centerville - Attempt to place a hold on an item currently at Centerville for pickup at Centerville, confirm Koha will not allow this hold This cannot be recreated in the advanced editor.
Created attachment 188561 [details] [review] Bug 41131: Don't allow limiting transfers from/to a single branch We say that you cannot limit transfers internally within a branch, but it seems we do allow you to, and don't show you when we do To test: 1 - Go to Admin->Library transfer limits 2 - On a branches page, uncheck the box for that branch e.g. don't allow FIC to transfer to CPL from CPL 3 - Save 4 - Note the box is still checked 5 - Check the DB SELECT * FROM branch_transfer_limits; 6 - There is a line to/from CPL! 7 - Apply patches 8 - updatedatabase 9 - Repeat 5 - the line is deleted! 10 - Try to create the rule again, not the box is now disabled 11 - Be sneaky, enable the box, uncheck it and save, no rule created 12 - Be sneaky, edit the HMTL for another button to make it limiting CPL to CPL, save, no rule created 13 - Sign off