Bug 7981: Remove HomeOrHoldingBranchReturn syspref
authorBenjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Thu, 5 Mar 2015 15:09:00 +0000 (16:09 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 11 Jun 2015 13:24:22 +0000 (10:24 -0300)
commit57608fdecb2503088a8d02717fd992e84c849d28
tree7208de2b532f8bac1b8b5dcc0e5bfe85f1cd406f
parent27ef1410a7784577149bed6a466937c7ded6ba70
Bug 7981: Remove HomeOrHoldingBranchReturn syspref

This patch removes HomeOrHoldingBranchReturn syspref and makes circ/returns.pl respect branch
circulation rules from C4::Circulation::GetBranchItemRule. Also transfer slip notice should reflect this.

Default should always be to return item to home branch.

Test plan:
- make sure syspref 'AutomaticItemReturn' is set to 'false'
- unset 'Default checkout, hold and return policy' or set 'Return policy' to 'Item returns home'
- checkout an item and do a checkin from different branch than items homebranch
- verify that you're prompted with a transfer message to item's home branch and that print slip matches

- set 'Return policy' to 'Item returns to issuing library'
- do a checkout and a checkin from branch different than item's home branch
- verify that you're not prompted with a transfer message and that holding library is your current branch

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Follow-up:
- Added 3 tests in t/db_dependent/Circulation_Branches.t to test AddReturn
  policies
- Removed HomeOrHoldingBranchReturn from sysprefs.sql
- Added notice on removing syspref in updatedatabase

QA edits:
- removed trailing whitespace in tests
- moved branchname lookup from returns.pl to template

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
C4/Circulation.pm
circ/returns.pl
installer/data/mysql/sysprefs.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
t/db_dependent/Circulation_Branch.t