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 <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7262bc0667)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Frédéric Demians 2018-12-03 18:27:08 +01:00 committed by Martin Renvoize
parent 4852f974f5
commit a85edfb2be
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 6 additions and 0 deletions

View File

@ -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'