http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=2150 Summary: autoBarcode seems to be used inconsistently throughout code Product: Koha Version: unspecified Platform: PC OS/Version: All Status: NEW Severity: normal Priority: P3 Component: MARC Bibliographic data support AssignedTo: galen.charlton@liblime.com ReportedBy: henridamien@koha-fr.org QAContact: koha-bugs@lists.koha.org Those are using it as YESNO option serials/serials-edit.pl: # if autoBarcode is ON, calculate barcode... serials/serials-edit.pl: if (C4::Context->preference("autoBarcode") ne 'OFF' ) { acqui/orderreceive.pl: my $auto_barcode = C4::Context->boolean_preference("autoBarcode") || 0; cataloguing/additem.pl: # if autoBarcode is ON, calculate barcode... cataloguing/additem.pl: if (C4::Context->preference('autoBarcode')) { Here it is used as a hash choice. cataloguing/value_builder/barcode.pl: my $autoBarcodeType = C4::Context->preference("autoBarcode"); cataloguing/value_builder/barcode.pl: warn "Barcode type = $autoBarcodeType" if $DEBUG; cataloguing/value_builder/barcode.pl: unless ($autoBarcodeType eq 'OFF' or !$autoBarcodeType) { cataloguing/value_builder/barcode.pl: if ($autoBarcodeType eq 'annual') { cataloguing/value_builder/barcode.pl: elsif ($autoBarcodeType eq 'incremental') { cataloguing/value_builder/barcode.pl: elsif ($autoBarcodeType eq 'hbyymmincr') { # Generates a barcode where hb = home branch Code, yymm = year/month catalogued, incr = incremental number, reset yearly -fbcit installer/data/mysql/en/mandatory/sysprefs.sql:INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('autoBarcode','OFF','Used to autogenerate a barcode: incremental will be of the form 1, 2, 3; annual of the form 2007-0001, 2007-0002; hbyymmincr of the form HB08010001 where HB=Home Branch','incremental|annual|hbyymmincr|OFF','Choice'); installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql:INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('autoBarcode', '1', 'Si ce paramètre est positionné le code-barre du document exemplarisé est automatiquement proposé. Devrait être à 0 dans la plupart des cas : les bibliothèques collent un code-barre issu d''un rouleau pré-imprimé.', '', 'YesNo'); installer/data/mysql/updatedatabase.pl: $dbh->do("UPDATE systempreferences SET options = 'incremental|annual|hbyymmincr|OFF', explanation = 'Used to autogenerate a barcode: incremental will be of the form 1, 2, 3; annual of the form 2007-0001, 2007-0002; hbyymmincr of the form HB08010001 where HB = Home Branch' WHERE variable = 'autoBarcode';"); Maybe we should have one function in Koha.pm to calculate Barcodes. And use it in those three or four cgi. ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.