Bugzilla – Attachment 172424 Details for
Bug 37070
Incorrect barcode generation when adding orders to basket
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37070: (QA follow-up) Fix qa script issues
Bug-37070-QA-follow-up-Fix-qa-script-issues.patch (text/plain), 1.80 KB, created by
Kyle M Hall (khall)
on 2024-10-04 17:04:04 UTC
(
hide
)
Description:
Bug 37070: (QA follow-up) Fix qa script issues
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-10-04 17:04:04 UTC
Size:
1.80 KB
patch
obsolete
>From 48d706cae1ffe509249b28b0ee71b40c1531ead2 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 4 Oct 2024 13:00:26 -0400 >Subject: [PATCH] Bug 37070: (QA follow-up) Fix qa script issues > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Barcodes.pm | 11 ++++++----- > t/db_dependent/Barcodes.t | 6 +----- > 2 files changed, 7 insertions(+), 10 deletions(-) > >diff --git a/C4/Barcodes.pm b/C4/Barcodes.pm >index dfca945a334..333a8eb8bcd 100644 >--- a/C4/Barcodes.pm >+++ b/C4/Barcodes.pm >@@ -94,11 +94,12 @@ sub max { > return $self->db_max; > } > sub db_max { >- my $self = shift; >- my $query = "SELECT max(abs(CAST(barcode AS UNSIGNED))) FROM items LIMIT 1"; # Possible problem if multiple barcode types populated >- my $sth = C4::Context->dbh->prepare($query); >- $sth->execute(); >- return $sth->fetchrow_array || $self->initial; >+ my $self = shift; >+ my $query = "SELECT max(abs(CAST(barcode AS UNSIGNED))) FROM items LIMIT 1" >+ ; # Possible problem if multiple barcode types populated >+ my $sth = C4::Context->dbh->prepare($query); >+ $sth->execute(); >+ return $sth->fetchrow_array || $self->initial; > } > sub next_value { > my $self = shift; >diff --git a/t/db_dependent/Barcodes.t b/t/db_dependent/Barcodes.t >index b5a976b8419..0232a4a9c9a 100755 >--- a/t/db_dependent/Barcodes.t >+++ b/t/db_dependent/Barcodes.t >@@ -141,11 +141,7 @@ subtest 'Test generation of incremental barcodes from DB values' => sub { > $builder->schema->resultset('Item')->delete_all; > my $barcodeobj; > >- my $item_1 = $builder->build_sample_item( >- { >- barcode => '1000000000000000' >- } >- ); >+ my $item_1 = $builder->build_sample_item( { barcode => '1000000000000000' } ); > > $barcodeobj = C4::Barcodes->new('incremental'); > >-- >2.39.5 (Apple Git-154)
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 37070
:
167634
|
167776
|
172423
| 172424