Bugzilla – Attachment 187883 Details for
Bug 20253
Optionally use buyer's purchase order number from EDIFACT quote in basket name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20253: (follow-up) Fix undefined variable $b and test plan count
Bug-20253-follow-up-Fix-undefined-variable-b-and-t.patch (text/plain), 2.47 KB, created by
Martin Renvoize (ashimema)
on 2025-10-14 10:58:24 UTC
(
hide
)
Description:
Bug 20253: (follow-up) Fix undefined variable $b and test plan count
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-10-14 10:58:24 UTC
Size:
2.47 KB
patch
obsolete
>From 92084681e7bf150be6b5d94adfdcc4c90c8651e6 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Tue, 14 Oct 2025 11:51:42 +0100 >Subject: [PATCH] Bug 20253: (follow-up) Fix undefined variable $b and test > plan count > >In bug 40587 we renamed a variable from $b to $basketno. After rebasing, >the auto-orders blocking code had a bug where it referenced an undefined >variable $b instead of $basketno when checking for PO number conflicts. >This caused warnings: "Use of uninitialized value $Koha::EDI::b in exists" > >This patch: >- Renames $b to $basketno throughout the conflict checking code >- Updates test plan from 7 to 8 to match actual subtest count > >Test plan: >1. Run prove t/db_dependent/Koha/EDI.t >2. Verify all tests pass without warnings >3. Confirm auto-orders blocking works correctly for duplicate PO numbers >--- > Koha/EDI.pm | 8 ++++---- > t/db_dependent/Koha/EDI.t | 2 +- > 2 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/Koha/EDI.pm b/Koha/EDI.pm >index 87bd0b14813..8d0dc84e3c3 100644 >--- a/Koha/EDI.pm >+++ b/Koha/EDI.pm >@@ -782,14 +782,14 @@ sub process_quote { > my $basketno = $added_baskets[$i]; > > # Check if this basket has a PO number conflict >- if ( exists $baskets_with_po_conflicts{$b} ) { >- my $conflict_info = $baskets_with_po_conflicts{$b}; >- $logger->warn( "Auto-order blocked for basket $b due to duplicate PO number '" >+ if ( exists $baskets_with_po_conflicts{$basketno} ) { >+ my $conflict_info = $baskets_with_po_conflicts{$basketno}; >+ $logger->warn( "Auto-order blocked for basket $basketno due to duplicate PO number '" > . $conflict_info->{po_number} > . "' (existing basket: " > . $conflict_info->{existing_basket} > . ")" ); >- $logger->info("Basket $b remains open due to PO number conflict"); >+ $logger->info("Basket $basketno remains open due to PO number conflict"); > next; > } > >diff --git a/t/db_dependent/Koha/EDI.t b/t/db_dependent/Koha/EDI.t >index a608dbae2d5..9c8b9d02b12 100755 >--- a/t/db_dependent/Koha/EDI.t >+++ b/t/db_dependent/Koha/EDI.t >@@ -38,7 +38,7 @@ my $builder = t::lib::TestBuilder->new; > my $logger = t::lib::Mocks::Logger->new(); > > subtest 'process_quote' => sub { >- plan tests => 7; >+ plan tests => 8; > > $schema->storage->txn_begin; > >-- >2.51.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20253
:
183859
|
183860
|
183861
|
183862
|
183953
|
183954
|
183955
|
183956
|
183957
|
183958
|
184000
|
184001
|
184002
|
184003
|
184004
|
184005
|
184006
|
184007
|
185221
|
185222
|
185223
|
185224
|
185225
|
185226
|
185227
|
185228
|
186860
|
186861
|
186862
|
186863
|
186864
|
186865
|
186866
|
186867
|
186868
|
186869
|
186870
|
186871
|
186872
|
186873
|
186874
|
186875
|
187165
|
187166
|
187167
|
187168
|
187169
|
187170
|
187171
|
187172
|
187173
|
187874
|
187875
|
187876
|
187877
|
187878
|
187879
|
187880
|
187881
|
187882
| 187883