From 7262bc066784247b12ce7f25c390498086e1d72b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Mon, 3 Dec 2018 18:27:08 +0100 Subject: [PATCH] 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 --- t/db_dependent/Barcodes_ValueBuilder.t | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/t/db_dependent/Barcodes_ValueBuilder.t b/t/db_dependent/Barcodes_ValueBuilder.t index a116b45565..7573bbd0da 100644 --- a/t/db_dependent/Barcodes_ValueBuilder.t +++ b/t/db_dependent/Barcodes_ValueBuilder.t @@ -47,6 +47,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' -- 2.20.1