Summary: | CreateBranchTransferLimit's return values in C4::Circulation.pm should be more explicit | ||
---|---|---|---|
Product: | Koha | Reporter: | kenza <kenza.zaki> |
Component: | Architecture, internals, and plumbing | Assignee: | kenza <kenza.zaki> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | gmcharlt, kenza.zaki, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 10692 | ||
Bug Blocks: | |||
Attachments: |
Bug 10693: CreateBranchTransferLimit's return value in C4::Circulation.pm should be more explicit
Bug 10693: CreateBranchTransferLimit's return value in C4::Circulation.pm should be more explicit [PASSED QA] Bug 10693: CreateBranchTransferLimit's return value in C4::Circulation.pm should be more explicit |
Description
kenza
2013-08-07 14:12:52 UTC
Created attachment 20145 [details] [review] Bug 10693: CreateBranchTransferLimit's return value in C4::Circulation.pm should be more explicit This patch test if the parameters $toBranch and $fromBranch are given. If not, CreateBranchTransferLimit now returns undef. This patch also fixes and adds some regression tests in t/db_dependent/Circulation_transfers.t NOTE: Currently, we can add a transferlimit to nonexistent branches because in the database branch_transfer_limits.toBranch and branch_transfer_limits.fromBranch aren't foreign keys. To test: prove t/db_dependent/Circulation_transfers.t t/db_dependent/Circulation_transfers.t .. ok All tests successful. Files=1, Tests=15, 18 wallclock secs ( 0.02 usr 0.01 sys + 0.42 cusr 0.00 csys = 0.45 CPU) Result: PASS Created attachment 20159 [details] [review] Bug 10693: CreateBranchTransferLimit's return value in C4::Circulation.pm should be more explicit This patch test if the parameters $toBranch and $fromBranch are given. If not, CreateBranchTransferLimit now returns undef. This patch also fixes and adds some regression tests in t/db_dependent/Circulation_transfers.t NOTE: Currently, we can add a transferlimit to nonexistent branches because in the database branch_transfer_limits.toBranch and branch_transfer_limits.fromBranch aren't foreign keys. To test: prove t/db_dependent/Circulation_transfers.t t/db_dependent/Circulation_transfers.t .. ok All tests successful. Files=1, Tests=15, 18 wallclock secs ( 0.02 usr 0.01 sys + 0.42 cusr 0.00 csys = 0.45 CPU) Result: PASS Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Created attachment 20670 [details] [review] [PASSED QA] Bug 10693: CreateBranchTransferLimit's return value in C4::Circulation.pm should be more explicit This patch test if the parameters $toBranch and $fromBranch are given. If not, CreateBranchTransferLimit now returns undef. This patch also fixes and adds some regression tests in t/db_dependent/Circulation_transfers.t NOTE: Currently, we can add a transferlimit to nonexistent branches because in the database branch_transfer_limits.toBranch and branch_transfer_limits.fromBranch aren't foreign keys. To test: prove t/db_dependent/Circulation_transfers.t t/db_dependent/Circulation_transfers.t .. ok All tests successful. Files=1, Tests=15, 18 wallclock secs ( 0.02 usr 0.01 sys + 0.42 cusr 0.00 csys = 0.45 CPU) Result: PASS Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests and QA script pass. Tested with patch for 10692 applied. Pushed to master, along with a follow-up that corrects the parameter tests to check for definedness, not Perl truth. Thanks, Kenza! This patch has been pushed to 3.12.x, will be in 3.12.5. Thanks Kenza! |