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

David Nind <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Text to go in the|                            |This fixes the generation
      release notes|                            |of item barcodes, where the
                   |                            |autoBarcode system
                   |                            |preference is set to
                   |                            |"generated in the form
                   |                            |<branchcode>yymm0001" and
                   |                            |the library code is either
                   |                            |a number or alphanumeric
                   |                            |value. This automatically
                   |                            |generated barcode format
                   |                            |didn't work in this case,
                   |                            |and the number generated
                   |                            |would not automatically
                   |                            |increment.

--- Comment #19 from David Nind <[email protected]> ---
(In reply to William Lavoie from comment #17)
> Hi David, 
> 
> Have you changed the branchcode for a numerical value? I tried on KTD, using
> the following steps :
> 1- koha-mysql kohadev
> 2- update items set barcode=NULL;
> 3- change one of the barcode to any numerical value 
> 4- update branches set branchcode = 1 where branchcode="MPL" 
> 
> Note that for the last command you might receive a warning. Then, when
> creating a new item I put Midway for both the Home and Current library (I
> chose Midway but any library will do, it just has to be the same as the one
> with the numerical branchcode) and I was able to reproduce the problem.

I've retested - it was my error! I didn't read the bug properly, and didn't get
that this is about library codes that have numeric or alphanumeric characters.

How I tested:
1. Create a new library with a library code that is a number:
   - Administration > Basic parameters > Libraries > + New library
   - Library code: 001
   - Name: Library 001
   - Submit
2. Create a new library with a library code that is alphanumeric:
   - Administration > Basic parameters > Libraries > + New library
   - Library code: LIB1
   - Name: Library 1
   - Submit
3. Set the autoBarcode system preference to "generated in the form
<branchcode>yymm0001".
4. Find a record with one item (any record will do):
   - Edit the current item:
     . Change the home library and current library to Library 001 (library code
is 001)
     . Empty the "p - Barcode field:"
     . Click in another field
     . Click back in the "p - Barcode field:"
     . Generates barcode 00125020001
     . Save changes
     ==> Result: successfully saves
   - Add another item to the same record:
     . Change the home and current library to Library 001 (library code is 001)
     . Click back in the "p - Barcode field:"
     . Generates barcode 00125020001 (note that it isn't incremented)
     . Add item
     ==> Result: Error saving item: Barcode must be unique.
5. Repeat step 4 for another record with one item, but use Library 1 (library
code is LIB1):
   - Edit the current item:
     . Change the home library and current library to Library 001 (library code
is 001)
     . Empty the "p - Barcode field:"
     . Click in another field
     . Click back in the "p - Barcode field:"
     . Generates barcode LIB125020001
     . Save changes
     ==> Result: successfully saves
   - Add another item to the same record:
     . Change the home and current library to Library 001 (library code is 001)
     . Click back in the "p - Barcode field:"
     . Generates barcode LIB125020001 (note that it isn't incremented)
     . Add item
     ==> Result: Error saving item: Barcode must be unique.
6. Repeat for an existing library that has a library code with only alpha
characters (Centerville Public Library, CPL):
   ==> Result: works as expected
    . First barcode is: CPL25020001
    . Second barcode is: CPL25020002
7. Apply the patches and RESET everything (reset_all)
   . Note: this clears all the changes made, need to set autoBarcode system
preference
   . Alternative is just to restart everything (restart_all), and note that the
barcodes generated will be the next in the sequence, not necessarily 0001 and
0002
8. Repeat step 4 (Library 001, library code 001):
   ==> Result: Now works as expected
   . First barcode is: 00125020001
   . Second barcode is: 00125020002
9. Repeat step 5 (Library 1, library code LIB1):
   ==> Result: Now works as expected
   . First barcode is: LIB125020001
   . Second barcode is: LIB125020002
10. Repeat step 6 (Centerville Public Library, CPL):
   ==> Result: No change, continues to work as expected
   . First barcode is: CPL25020001
   . Second barcode is: CPL25020002

-- 
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/

Reply via email to