Bug 41715 - Argument "YYYY-MM-DD" isn't numeric in numeric lt (<)... warnings in issues_stats.pl
Summary: Argument "YYYY-MM-DD" isn't numeric in numeric lt (<)... warnings in issues_s...
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Roman Dolny
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-26 22:10 UTC by Roman Dolny
Modified: 2026-03-05 15:36 UTC (History)
3 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: Sponsored
Comma delimited list of Sponsors: Ignatianum University in Cracow
Crowdfunding goal: 0
Crowdfunding committed: 0
Crowdfunding contact:
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Removes the cause of "[WARN] Argument "YYYY-MM-DD" isn't numeric in numeric lt (<) at /kohadevbox/koha/reports/issues_stats.pl line 224." warnings from the plack-intranet-error.log when using the from and to date filter in the circulation statistics report in the staff interface. This was happening because a numerical comparison was used to compare the dates, instead of a string comparison.
Version(s) released in:
26.05.00
Circulation function:


Attachments
Bug 41715: Argument "YYYY-MM-DD" isn't numeric in numeric lt (<)... warnings in issues_stats.pl (1.48 KB, patch)
2026-01-26 22:18 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 41715: Argument "YYYY-MM-DD" isn't numeric in numeric lt (<)... warnings in issues_stats.pl (1.53 KB, patch)
2026-01-27 19:26 UTC, David Nind
Details | Diff | Splinter Review
Bug 41715: Argument "YYYY-MM-DD" isn't numeric in numeric lt (<)... warnings in issues_stats.pl (1.63 KB, patch)
2026-03-02 09:24 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Dolny 2026-01-26 22:10:04 UTC
The warnings:
[WARN] Argument "YYYY-MM-DD" isn't numeric in numeric lt (<) 
    at /kohadevbox/koha/reports/issues_stats.pl line 224.
appears in the plack-intranet-error.log.

To reproduce in KTD:
1. Observe plack-intranet-error.log.
2. In staff interface go to Reports > Statistics wizards > Circulation.
3. Select date "From" and date "To" then submit.
4. Two warnings appear in plack-intranet-error.log.
Comment 1 Roman Dolny 2026-01-26 22:18:01 UTC
Created attachment 192074 [details] [review]
Bug 41715: Argument "YYYY-MM-DD" isn't numeric in numeric lt (<)... warnings in issues_stats.pl

The warnings:
[WARN] Argument "YYYY-MM-DD" isn't numeric in numeric lt (<)
    at /kohadevbox/koha/reports/issues_stats.pl line 224.
appears in the plack-intranet-error.log.
It happens because a numerical comparison was used to compare the dates
instead of a string comparison.

To test:
========
1. Observe plack-intranet-error.log.
2. In staff interface go to Reports > Statistics wizards > Circulation.
3. Select date "From" and date "To" then submit.
4. Two warnings appear in plack-intranet-error.log.
5. Apply the patch; restart_all.
6. Repeat 2-3. No warnings appear in log.

Sponsored-by: Ignatianum University in Cracow
Comment 2 David Nind 2026-01-27 19:26:34 UTC
Created attachment 192104 [details] [review]
Bug 41715: Argument "YYYY-MM-DD" isn't numeric in numeric lt (<)... warnings in issues_stats.pl

The warnings:
[WARN] Argument "YYYY-MM-DD" isn't numeric in numeric lt (<)
    at /kohadevbox/koha/reports/issues_stats.pl line 224.
appears in the plack-intranet-error.log.
It happens because a numerical comparison was used to compare the dates
instead of a string comparison.

To test:
========
1. Observe plack-intranet-error.log.
2. In staff interface go to Reports > Statistics wizards > Circulation.
3. Select date "From" and date "To" then submit.
4. Two warnings appear in plack-intranet-error.log.
5. Apply the patch; restart_all.
6. Repeat 2-3. No warnings appear in log.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Marcel de Rooy 2026-02-27 11:04:18 UTC
What is the impact of other date formats here ? Which cannot be string compared like dd mm yy?
Comment 4 Katrin Fischer 2026-02-28 11:17:30 UTC
I believe since the form is using the calendar widget it should always be sending a correctly formatted YYYY-MM-DD to the script (in theory?)
Comment 5 Marcel de Rooy 2026-03-02 09:24:30 UTC
(In reply to Katrin Fischer from comment #4)
> I believe since the form is using the calendar widget it should always be
> sending a correctly formatted YYYY-MM-DD to the script (in theory?)

Yes. Confirmed. Thx
Comment 6 Marcel de Rooy 2026-03-02 09:24:57 UTC
Created attachment 194256 [details] [review]
Bug 41715: Argument "YYYY-MM-DD" isn't numeric in numeric lt (<)... warnings in issues_stats.pl

The warnings:
[WARN] Argument "YYYY-MM-DD" isn't numeric in numeric lt (<)
    at /kohadevbox/koha/reports/issues_stats.pl line 224.
appears in the plack-intranet-error.log.
It happens because a numerical comparison was used to compare the dates
instead of a string comparison.

To test:
========
1. Observe plack-intranet-error.log.
2. In staff interface go to Reports > Statistics wizards > Circulation.
3. Select date "From" and date "To" then submit.
4. Two warnings appear in plack-intranet-error.log.
5. Apply the patch; restart_all.
6. Repeat 2-3. No warnings appear in log.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Lucas Gass (lukeg) 2026-03-05 15:36:29 UTC
Nice work everyone!

Pushed to main for 26.05