From: Frédéric Demians Date: Mon, 3 Dec 2018 17:27:08 +0000 (+0100) Subject: Bug 21937: Add test to show autoBarcode annual increment bug X-Git-Url: http://git.equinoxoli.org/?p=koha-equinox.git;a=commitdiff_plain;h=7262bc066784247b12ce7f25c390498086e1d72b Bug 21937: Add test to show autoBarcode annual increment bug This patch show the issue. If the DB contains a barcode (not auto attributed by Koha) which begin with the year used to generate automatically a new one, there may be a 'collision'. prove -v t/db_dependent/Barcodes_ValueBuilder.t Signed-off-by: Michal Denar Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens --- diff --git a/t/db_dependent/Barcodes_ValueBuilder.t b/t/db_dependent/Barcodes_ValueBuilder.t index a116b45..7573bbd 100644 --- a/t/db_dependent/Barcodes_ValueBuilder.t +++ b/t/db_dependent/Barcodes_ValueBuilder.t @@ -49,6 +49,12 @@ my $item_2 = $builder->build({ my $item_3 = $builder->build({ source => 'Item', value => { + barcode => '201200345' + } +}); +my $item_4 = $builder->build({ + source => 'Item', + value => { barcode => '2012-0034' } });