Bug 38605

Summary: t/db_dependent/Koha/OAIHarvester.t fails with wrong date format
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Web servicesAssignee: Matthias Meusburger <matthias.meusburger>
Status: Pushed to stable --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david, dcook, martin.renvoize, matthias.meusburger, wainuiwitikapark
Version: MainKeywords: RM_priority
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
This fixes the tests for t/db_dependent/Koha/OAIHarvester.t - dates were incorrectly handled during the first days of the month because of the use of non-zero-padded days values.
Version(s) released in:
25.05.00,24.11.01
Circulation function:
Bug Depends on: 35659    
Bug Blocks:    
Attachments: Bug 38605: Fix Harvester.pm use of days parameter
Bug 38605: Fix Harvester.pm use of days parameter
Bug 38605: Fix Harvester.pm use of days parameter

Description Katrin Fischer 2024-12-03 16:03:23 UTC
It looks like the test started failing, because we now are in the "one digit" days of a month. I assume this could be a one character change?


prove -v t/db_dependent/Koha/OAIHarvester.t 
t/db_dependent/Koha/OAIHarvester.t .. 
1..28
The given date (2024-12-2) does not match the date format (iso) at /kohadevbox/koha/Koha/DateUtils.pm line 188.
# Looks like your test exited with 11 before it could output anything.
Dubious, test returned 11 (wstat 2816, 0xb00)
Failed 28/28 subtests 

Test Summary Report
-------------------
t/db_dependent/Koha/OAIHarvester.t (Wstat: 2816 (exited 11) Tests: 0 Failed: 0)
  Non-zero exit status: 11
  Parse errors: Bad plan.  You planned 28 tests but ran 0.
Files=1, Tests=0,  2 wallclock secs ( 0.02 usr  0.00 sys +  1.34 cusr  0.12 csys =  1.48 CPU)
Result: FAIL
Comment 1 Matthias Meusburger 2024-12-04 10:19:15 UTC
Created attachment 175154 [details] [review]
Bug 38605: Fix Harvester.pm use of days parameter

Dates were incorrectly handled during the first days of the month because of
the use of non-zero-padded days values.

(t/db_dependent/Koha/OAIHarvester.t failed)
Comment 2 Jonathan Druart 2024-12-04 10:25:50 UTC
Created attachment 175164 [details] [review]
Bug 38605: Fix Harvester.pm use of days parameter

Dates were incorrectly handled during the first days of the month because of
the use of non-zero-padded days values.

(t/db_dependent/Koha/OAIHarvester.t failed)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 David Nind 2024-12-04 12:02:38 UTC
Created attachment 175171 [details] [review]
Bug 38605: Fix Harvester.pm use of days parameter

Dates were incorrectly handled during the first days of the month because of
the use of non-zero-padded days values.

(t/db_dependent/Koha/OAIHarvester.t failed)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2024-12-04 12:03:43 UTC
Have added my sign off, in case Jonathan wants to count his sign off as the QA.
Comment 5 Katrin Fischer 2024-12-04 12:18:47 UTC
I am counting it, thanks David :)
Comment 6 Katrin Fischer 2024-12-04 15:33:31 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 7 Paul Derscheid 2024-12-12 13:31:37 UTC
Nice work everyone!

Pushed to 24.11.x for 24.11.01
Comment 8 Wainui Witika-Park 2024-12-17 22:11:30 UTC
Koha/OAI/Client/Harvester.pm isn't in 24.05

Not backporting to 24.05.x