https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23992
Bug ID: 23992
Summary: Adding multiple items with barcode might end with
infinite loop if same barcode will be next_value
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P5 - low
Component: Cataloging
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected]
In /cataloguing/additem.pl we had the comment:
"FIXME : Please note that there is a risk of infinite loop here if we never
find a suitable barcode".
I researched that when we are adding '$number_of_copies', there will be no
infinite loop there in that 'for' loop EXCEPT if the 'next_value' method will
return the same but defined barcode only (border case1). Other cases:
- without a barcode code always adds any number of items in a sequential way,
so nothing to fix,
- if we have '$barcodevalue' defined in the beginning, code adds items with
barcodes generating them with 'next_value',
if then no barcode will be generated in 'next_value' then '$exist_itemnumber'
will not be defined, so loop will keep adding items without barcodes.
Sequentially. (case2)
- if barcode will be occupied so it will be skipped until next barcode will be
generated, a free one, this was discussed with KohaSuomi as "might be not
needed" but because this already created in this way in KC so let's keep this
logic, so nothing to fix here too.
I am preparing patch to generate in case2: "no_barcode_value" error message if
it was started with a barcode and no more barcodes generated,
or in case1: if the barcode after 'next_value' will be the same as old value.
--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/