[Bug 36593] New: Add support for the `time` column type on TestBuilder
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 Bug ID: 36593 Summary: Add support for the `time` column type on TestBuilder Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Bug 6796 introduced the first use of this DB column type, and TestBuilder is just not ready for it: https://jenkins.koha-community.org/job/Koha_Master_D10/lastCompletedBuild/co... we should add support. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |6796 CC| |jonathan.druart@gmail.com, | |tomascohen@gmail.com, | |victor@tuxayo.net Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6796 [Bug 6796] Overnight checkouts taking into account opening and closing hours -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de, | |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |tomascohen@gmail.com Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 164871 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164871&action=edit Bug 36593: Add 'time' column type support to TestBuilder This simple patch adds support for the 'time' column type. To test: 1. Run: $ ktd --shell k$ perl -Mt::lib::TestBuilder -e 'my $b = t::lib::TestBuilder->new; my $hour = $b->build_object({ class => "Koha::Library::Hours" });' => FAIL: It explodes as it doesn't know how to deal with the 'time' column type 2. Apply this patch and the follow-up 3. Run: k$ prove -MDDP -Mt::lib::TestBuilder -e 'my $b = t::lib::TestBuilder->new; my $h = $b->build_object({ class => "Koha::Library::Hours" }); p($h->unblessed);' => SUCCESS: It generates an hour! 4. Run: k$ prove t/db_dependent/TestBuilder.t => SUCCESS: It builds all the things! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 164872 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164872&action=edit Bug 36593: Add missing koha_object(s)_class methods to LibraryHour.pm (bug 9796) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164871|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 164881 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164881&action=edit Bug 36593: Add 'time' column type support to TestBuilder This simple patch adds support for the 'time' column type. To test: 1. Run: $ ktd --shell k$ perl -Mt::lib::TestBuilder -e 'my $b = t::lib::TestBuilder->new; my $hour = $b->build_object({ class => "Koha::Library::Hours" });' => FAIL: It explodes as it doesn't know how to deal with the 'time' column type 2. Apply this patch and the follow-up 3. Run: k$ prove -MDDP -Mt::lib::TestBuilder -e 'my $b = t::lib::TestBuilder->new; my $h = $b->build_object({ class => "Koha::Library::Hours" }); p($h->unblessed);' => SUCCESS: It generates an hour! 4. Run: k$ prove t/db_dependent/TestBuilder.t => SUCCESS: It builds all the things! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164872|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 164882 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164882&action=edit Bug 36593: Add missing koha_object(s)_class methods to LibraryHour.pm (bug 9796) Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Good spot, thanks for the quick follow-up Tomas. Passing QA directly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 --- Comment #6 from Jonathan Druart <jonathan.druart@gmail.com> --- I am expecting regressions from this, did you run the whole test suite? If you set all dates to now, you will have problems in the circulation, holds, etc. logic. Am I missing something? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #6)
I am expecting regressions from this, did you run the whole test suite?
If you set all dates to now, you will have problems in the circulation, holds, etc. logic. Am I missing something?
I'm not touching anything for existing behavior. This is replicating it for 'time' only. The only 'time' column is this new one. Though, the fact TestBuilder cannot build 'Koha::Library::Hour' objects implies... there are no good tests for this feature? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 --- Comment #8 from Jonathan Druart <jonathan.druart@gmail.com> --- Right, ignore me! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Well.. yes and no regards tests.. They didn't add the relations so there aren't tests for that and the tests that are added account for changes in Circulation.pm and didn't need mocking.. We could always do with more tests though.. and I'd like to see more of the logic moved back out of controllers into classes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |24.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to main |Needs documenting --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Not backported to 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED CC| |caroline.cyr-la-rose@inlibr | |o.com Resolution|--- |FIXED --- Comment #12 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Test suite changes don't induce changes to the manual afaik. Closing, but feel free to reopen if the status was put there to document something in the coding guidelines -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36593 Bug 36593 depends on bug 6796, which changed state. Bug 6796 Summary: Overnight checkouts taking into account opening and closing hours https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6796 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org