[Koha-bugs] [Bug 30328] Add ability to generate barcode with branch specific prefix

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 25 12:14:34 CET 2022


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

--- Comment #1 from Emmi Takkinen <emmi.takkinen at koha-suomi.fi> ---
Created attachment 132221
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132221&action=edit
Bug 30328: Add ability to generate barcode with branch specific prefix

We should add more flexibility to generating barcodes by letting libraries
define branch specific prefix for their barcodes. This patch adds new option
"preyyyymmincr" in systempreference "autoBarcode" and new systempreference
"BarcodePrefix" to define branch specific prefix

Test plan:

1. Apply patch and update database
2. Set syspref "autoBarcode" as
3. Add some values to syspref "Barcodeprefix" e.g.:
        Default: DEF
        CPL: CPL
        FFL: FFL
4. Now change your library to CPL (if needed) and add an item
5. Click barcode input field
   => barcode should be CPL<current_year><current_month>00001
6. Add another item and click barcode field
   => barcode should be CPL<current_year><current_month>00002
7. Change your library to FFL and add an item
   => barcode should now be FFL<current_year><current_month>00001
8. Change your library to e.g. FPL (or another as long as it doesn't have
prefix value
in "Barcodeprefix"), add an item and click barcode field
   => barcode should now be DEF<current_year><current_month>00001
9. Try to add multiple items
   => barcodes incremental value should increase in order (no skipping values,
no errors)

Also prove t/db_dependent/Barcodes_ValueBuilder.t and
t/Barcodes_preyyyymmincr.t

Sponsored-by: Koha-Suomi Oy

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


More information about the Koha-bugs mailing list