Bug 40377

Summary: HoldsQueue/TransportCostOptimizations.t generates warnings
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: Pushed to oldstable --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: minor    
Priority: P5 - low CC: david, fridolin.somers, martin.renvoize
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 40377: Remove warnings from HoldsQueue/TransportCostOptimizations.t
Bug 40377: Remove warnings from HoldsQueue/TransportCostOptimizations.t
Bug 40377: Remove warnings from HoldsQueue/TransportCostOptimizations.t

Description Jonathan Druart 2025-07-15 10:09:26 UTC
UseTransportCostMatrix set to yes, but matrix not populated at /kohadevbox/koha/C4/HoldsQueue.pm line 188.
UseTransportCostMatrix set to yes, but matrix not populated at /kohadevbox/koha/C4/HoldsQueue.pm line 188.
Comment 1 Jonathan Druart 2025-07-15 10:10:29 UTC
Created attachment 184079 [details] [review]
Bug 40377: Remove warnings from HoldsQueue/TransportCostOptimizations.t

UseTransportCostMatrix set to yes, but matrix not populated at /kohadevbox/koha/C4/HoldsQueue.pm line 188.
UseTransportCostMatrix set to yes, but matrix not populated at /kohadevbox/koha/C4/HoldsQueue.pm line 188.

It seems that they are expected, we simply need to catch them.
Comment 2 David Nind 2025-07-17 22:19:17 UTC
Created attachment 184246 [details] [review]
Bug 40377: Remove warnings from HoldsQueue/TransportCostOptimizations.t

UseTransportCostMatrix set to yes, but matrix not populated at /kohadevbox/koha/C4/HoldsQueue.pm line 188.
UseTransportCostMatrix set to yes, but matrix not populated at /kohadevbox/koha/C4/HoldsQueue.pm line 188.

It seems that they are expected, we simply need to catch them.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2025-07-17 22:20:19 UTC
Testing notes (using KTD):
1. prove t/db_dependent/HoldsQueue/TransportCostOptimizations.t
Comment 4 Martin Renvoize (ashimema) 2025-07-18 12:08:53 UTC
Created attachment 184359 [details] [review]
Bug 40377: Remove warnings from HoldsQueue/TransportCostOptimizations.t

UseTransportCostMatrix set to yes, but matrix not populated at /kohadevbox/koha/C4/HoldsQueue.pm line 188.
UseTransportCostMatrix set to yes, but matrix not populated at /kohadevbox/koha/C4/HoldsQueue.pm line 188.

It seems that they are expected, we simply need to catch them.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 5 Lucas Gass (lukeg) 2025-07-18 17:12:06 UTC
Nice work everyone!

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

Pushed to 25.05.x
Comment 7 Fridolin Somers 2025-08-01 13:26:26 UTC
Pushed to 24.11.x for 24.11.08