[Koha-bugs] [Bug 3724] New: T Prefix in the itemBarcodeInputFilter setting doesn't work for some Follett barcodes

bugzilla-daemon at kohaorg.ec2.liblime.com bugzilla-daemon at kohaorg.ec2.liblime.com
Wed Oct 21 18:34:23 CEST 2009


http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3724

           Summary: T Prefix in the itemBarcodeInputFilter setting doesn't
                    work for some Follett barcodes
           Product: Koha
           Version: rel_3_0
          Platform: PC
        OS/Version: Linux - Debian
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Circulation
        AssignedTo: gmcharlt at gmail.com
        ReportedBy: martin.brenner at whitfieldschool.org
   Estimated Hours: 0.0
 Change sponsored?: Seeking developer


When importing cataloging and item records from a Follett system, the barcode
record is in the form T0003452 where the 0's are filler to make a total of
seven digits. The barcodes on the books, at least in our library, are of the
form T 3452 (Tspacenumber). The T prefix setting on itemBarcodeInputFilter is
supposed to allow for this. It was not working for me, so I looked at the code.
By changing the \d to a \s in the in the if statement in the section:

elsif ($filter eq 'T-prefix') {

                if ($barcode =~ /^[Tt](\d)/) {

                        (defined($1) and $1 eq '0') and return $barcode;

            $barcode = substr($barcode, 2) + 0;     # FIXME: probably should be
substr($barcode, 1)

from /usr/share/koha/lib/C4/Circulation.pm, this fixes the problem for our
library.

I do not know perl, but I imagine there should be a way to add both options if
the /d is needed (though, I noticed when it was set that way, if you entered
T3452 manually it would return T0000452 and cut off the 3. So, I'm not sure the
\d is even correct)


-- 
Configure bugmail: http://bugs.koha.org/cgi-bin/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the Koha-bugs mailing list