[Bug 42578] New: Koha/Hold.t failing on date comparison
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42578 Bug ID: 42578 Summary: Koha/Hold.t failing on date comparison Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org Depends on: 40058 We must use t::lib::Dates::compare to compare dates in test. Koha_Main_D13/218 23:27:19 # Failed test 'Timestamp logged is the current one' 23:27:30 # at t/db_dependent/Koha/Hold.t line 1408. 23:27:35 # '$VAR1 = { 23:27:38 # 'biblionumber' => 3801, 23:34:33 # 'borrowernumber' => 3002, 23:34:36 # 'branchcode' => 'lxMFj7PU', 23:34:39 # 'cancellation_reason' => undef, 23:34:41 # 'cancellationdate' => undef, 23:34:45 # 'deleted_biblionumber' => undef, 23:34:49 # 'desk_id' => undef, 23:34:53 # 'expirationdate' => undef, 23:34:56 # 'found' => undef, 23:34:59 # 'hold_group_id' => undef, 23:35:02 # 'item_group_id' => undef, 23:35:05 # 'item_level_hold' => 1, 23:35:08 # 'itemnumber' => 2658, 23:35:10 # 'itemtype' => undef, 23:35:13 # 'lowestPriority' => 0, 23:35:16 # 'non_priority' => 0, 23:35:32 # 'notificationdate' => undef, 23:35:45 # 'patron_expiration_date' => undef, 23:35:54 # 'priority' => 1, 23:36:01 # 'reminderdate' => undef, 23:36:19 # 'reserve_id' => 357, 23:36:23 # 'reservedate' => '2026-05-08', 23:36:27 # 'reservenotes' => undef, 23:36:30 # 'suspend' => 0, 23:36:33 # 'suspend_until' => undef, 23:36:38 # 'timestamp' => '2026-05-08 23:22:04', 23:36:43 # 'waitingdate' => undef 23:36:53 # }; 23:36:58 # ' 23:36:58 # doesn't match '(?^u:'timestamp' => '2026-05-08 23:22:03')' 23:36:58 # Looks like you failed 1 test of 13. 23:36:58 23:36:58 # Failed test 'item-level holds tests' 23:37:04 # at t/db_dependent/Koha/Hold.t line 1433. 23:37:06 # Looks like you failed 1 test of 6. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40058 [Bug 40058] Move RevertWaitingStatus to Koha::Hold->revert_waiting() -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42578 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |jonathan.druart@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=42578 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 198945 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198945&action=edit Bug 42578: Prevent Koha/Hold.t to fail on date comparison We must use t::lib::Dates::compare to compare dates in test. Test plan: Confirm that `prove t/db_dependent/Koha/Hold.t` still returns green after this patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42578 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25551 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25551 [Bug 25551] [OMNIBUS] Some tests are failing randomly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42578 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | CC| |tomascohen@gmail.com --- Comment #2 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- I didn't even know about `t::lib::Dates::compare`. Documenting it on the handbook. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42578 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42578 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198945|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42578 --- Comment #3 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 198976 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198976&action=edit Bug 42578: Prevent Koha/Hold.t to fail on date comparison We must use t::lib::Dates::compare to compare dates in test. Test plan: Confirm that `prove t/db_dependent/Koha/Hold.t` still returns green after this patch Signed-off-by: Tomás 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=42578 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #4 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Established pattern implemented in Koha/Hold.t. Passes the QA checks. I documented it in the handbook as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42578 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.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=42578 --- Comment #5 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42578 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.05 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42578 --- Comment #6 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org