[Koha-bugs] [Bug 23992] Adding multiple items with barcode might end with infinite loop if same barcode will be next_value

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 15 14:46:52 CET 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23992

--- Comment #4 from Andrew Nugged <nugged at gmail.com> ---
(In reply to Jonathan Druart from comment #3)
> If I understand correctly you are trying to fix a logic issue, and so an
> hypothetical situation where the barcode plugin will return $new = $old.

or when it will return NO BARCODE (empty/undef) if such possible.

Because our plugins/barcodes can change by time and I don't know how might
behave, I propose to detect this in the sequence, and inform user that
"something went wrong.

But yes, if this never happens now and never later if someone will change
barcode generator or use their own so that "no_barcode_generated" I've added
not needed at all and this solution might look useless.

But idea was not so clear, I agree, but let's assume we:
1. started loop with barcode provided, so each next item should be with
next_value barcode,
2. but eventually no next_value or it is the same for "unknown future reasons"
(someone will develop Barcode generator which will do that),
3. so we should stop in the middle bringing error to operator/user that "we
failed to go further with your sequence", not just silently continue adding
empty or same barcodes.

But yes, this was unclear fix because it came as attempt to syncronize another
bugfix in KohaSuomi fork which way behind of current KohaCommunity (v16 against
v19), and because there's not exactly how this was solved in KohaSuomi, I
wanted to have this fix in KC, port it back in KS, so then KS don't needs other
fixes,

but I also agree this is "silver tape fix"

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list