Koha/cataloguing
Baptiste Wojtkowski b7ed38413a
Bug 8425: Increment the barcode on each call of set_barcode()
Duplicate barcodes are generated when placing an Order in Acquisitions when AcqCreateItem = "placing an order" and Autobarcode is turned on.

The problem is that you can accidentally attach 3 items to an order, but only 1 will be saved to the database. When you go to receive your order, you can only receive 1 item as the other two were never made, since the barcode wasn't unique.

In 3.8.0, a software error comes up which prevent any item creation, I believe, but master (3.9.x) doesn't throw any warnings or errors.

Yes.. This tries and solve a bug from 3.8.0 /o/

Test plan:
1 - set syspref "autoBarcode" to generated in the form <branchcode> yymm001
2 - set the barcode field to "barcode.pl" in marc structure
3 - create a new basket
4 - add one item to this basket
5 - click on the barcode field -> it should have a barcode
6 - click on add item and click on the new barcode fiels, it should have
 the same value
 APPLY PATCH:
7 - click on the barcode field -> it should have a barcode
8 - click on add item and click on the new barcode fields, it should have
  an higher barcode.

Note : The barcode is incremented each time the barcode with an empty
value is clicked on. Therefore, if the
librarian removes the value from barcode and click again, they could get
another barcode. I do not know if it is an issue.
Note: This patch is not splitted in two parts anymore

Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Followed the test plan, works as advertised.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-24 12:02:15 +01:00
..
value_builder Bug 8425: Increment the barcode on each call of set_barcode() 2025-01-24 12:02:15 +01:00
addbiblio.pl Bug 38211: frameworkcode must be set before read 2024-10-22 12:06:45 +02:00
addbooks.pl Bug 29391: Improve output of reservoir search 2022-01-09 21:04:17 -10:00
additem.pl Bug 36498: Tidy cataloguing/additem.pl 2024-06-27 14:04:48 +02:00
cataloging-home.pl Bug 34288: Allow access to the cataloguing module with tools permission 2023-07-18 12:46:53 -03:00
concerns.pl Bug 31028: (follow-up) Fix permissions names 2023-03-06 11:23:17 -03:00
editor.pl Bug 33375: Quote reserved keyword 'rank' in advanced editor 2023-04-14 11:35:26 -03:00
linkitem.pl Bug 34478: Add 'op' to catalogue/MARCdetail 2024-03-01 10:58:28 +01:00
merge.pl Bug 33036: REST API: Merge biblio records implements merging of records 2024-03-18 11:03:39 +01:00
merge_ajax.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
moveitem.pl Bug 34478: Add 'op' to cataloguing/moveitem 2024-03-01 10:58:29 +01:00
plugin_launcher.pl Bug 24879: Add check_cookie_auth when missing 2024-04-03 17:05:50 +02:00
ysearch.pl Bug 35835: Fix shebang in cataloguing/ysearch.pl 2024-01-26 15:14:03 +01:00
z3950_auth_search.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
z3950_search.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00