https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25039
David Nind <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110073|0 |1 is obsolete| | --- Comment #16 from David Nind <[email protected]> --- Created attachment 110483 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110483&action=edit Bug 25039: Move new due date calculation to Koha::Checkout This is a follow-up patch of bug 25020. This patch adds a new method Koha::Checkout->shift_due_date that accepts the same parameters we provide in the form. It catches bad scenarios (type errors, passing both parameters when only one is accepted, and so on). Date manipulation is tested so time is kept and resulting dates are correct. The controller script is cleaned a bit to use the introduced method. I do this because: - We really need tests for this and doing it with selenium is no-end - I see a use for this new method for encapsulating behaviours, for example we might want to add Calendar support for the 'days' use case, and having the method here assures we will have tests, etc. To test: 1. Apply this patches 2. Repeat the original test plan => SUCCESS: Everything works as expected 3. Run: $ kshell k$ prove t/db_dependent/Koha/Checkout.t => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <[email protected]> Signed-off-by: David Nind <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
