Bug 40380

Summary: Koha/Patrons/Import.t generates warnings
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: Pushed to oldstable --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: minor    
Priority: P5 - low CC: david, fridolin.somers, m.de.rooy
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.11.00,25.05.02,24.11.08
Circulation function:
Bug Depends on:    
Bug Blocks: 40444    
Attachments: Bug 40380: Remove warnings from Patrons/Import.t - Use of uninitialized value $csvkeycol{"dateexpiry"} in array element
Bug 40380: Remove warnings from Patrons/Import.t - Argument "" isn't numeric in numeric eq (==)
Bug 40380: Remove warnings from Patrons/Import.t - Use of uninitialized value $csvkeycol{"dateexpiry"} in array element
Bug 40380: Remove warnings from Patrons/Import.t - Argument "" isn't numeric in numeric eq (==)
Bug 40380: Remove warnings from Patrons/Import.t - Use of uninitialized value $csvkeycol{"dateexpiry"} in array element
Bug 40380: Remove warnings from Patrons/Import.t - Argument "" isn't numeric in numeric eq (==)

Description Jonathan Druart 2025-07-15 11:44:06 UTC
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_2> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_3> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_4> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$fh> line 2.
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1017, <$fh> line 2.
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1017, <$fh> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$fh> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$fh> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$fh> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$fh> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$fh> line 2.
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1017, <$handle_1> line 2.
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1017, <$handle_1> line 2.
Comment 1 Jonathan Druart 2025-07-15 11:49:59 UTC
Created attachment 184082 [details] [review]
Bug 40380: Remove warnings from Patrons/Import.t - Use of uninitialized value $csvkeycol{"dateexpiry"} in array element

Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_2> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_3> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_4> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$fh> line 2.
Comment 2 Jonathan Druart 2025-07-15 11:50:01 UTC
Created attachment 184083 [details] [review]
Bug 40380: Remove warnings from Patrons/Import.t - Argument "" isn't numeric in numeric eq (==)

Using perl -MCarp::Always:
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1017, <$handle_1> line 2.
DBIx::Class::Row::_eq_column_values(Koha::Schema::Result::Borrower=HASH(0x57c409b9ec08), "autorenew_checkouts", "", 1) called at /usr/share/perl5/DBIx/Class/Row.pm line 945
Comment 3 David Nind 2025-07-18 07:09:21 UTC
Created attachment 184283 [details] [review]
Bug 40380: Remove warnings from Patrons/Import.t - Use of uninitialized value $csvkeycol{"dateexpiry"} in array element

Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_2> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_3> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_4> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$fh> line 2.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2025-07-18 07:09:24 UTC
Created attachment 184284 [details] [review]
Bug 40380: Remove warnings from Patrons/Import.t - Argument "" isn't numeric in numeric eq (==)

Using perl -MCarp::Always:
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1017, <$handle_1> line 2.
DBIx::Class::Row::_eq_column_values(Koha::Schema::Result::Borrower=HASH(0x57c409b9ec08), "autorenew_checkouts", "", 1) called at /usr/share/perl5/DBIx/Class/Row.pm line 945

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2025-07-18 07:10:10 UTC
Testing notes (using KTD):
1. prove t/db_dependent/Koha/Patrons/Import.t
Comment 6 Marcel de Rooy 2025-07-18 09:24:52 UTC
Created attachment 184309 [details] [review]
Bug 40380: Remove warnings from Patrons/Import.t - Use of uninitialized value $csvkeycol{"dateexpiry"} in array element

Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_2> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_3> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$handle_4> line 2.
Use of uninitialized value $csvkeycol{"dateexpiry"} in array element at /kohadevbox/koha/Koha/Patrons/Import.pm line 310, <$fh> line 2.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Marcel de Rooy 2025-07-18 09:24:55 UTC
Created attachment 184310 [details] [review]
Bug 40380: Remove warnings from Patrons/Import.t - Argument "" isn't numeric in numeric eq (==)

Using perl -MCarp::Always:
Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1017, <$handle_1> line 2.
DBIx::Class::Row::_eq_column_values(Koha::Schema::Result::Borrower=HASH(0x57c409b9ec08), "autorenew_checkouts", "", 1) called at /usr/share/perl5/DBIx/Class/Row.pm line 945

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Lucas Gass (lukeg) 2025-07-18 17:12:14 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 9 Paul Derscheid 2025-07-24 08:21:12 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 10 Fridolin Somers 2025-08-01 09:50:26 UTC
Pushed to 24.11.x for 24.11.08