https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #20 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- get_barcode my $scr = qq~ let elt = \$("#"+id); let homebranch = elt.parents('fieldset.rows:first') .find('input[name="kohafield"][value="items.homebranch"]') .siblings("select") .val(); if(typeof offset == 'undefined'){ var offset = 0; } if ( \$(elt).val() == '' ) { \$(elt).val(homebranch + ($nextnum + offset)); } ~; TOGETHER WITH +function set_barcode(id, force, offset=0) { => Default is zero. Why are we checking the type then later? Seems useless? +if(typeof autobarcodetype == 'undefined') { + var autobarcodetype = "$autoBarcodeType"; + var attempt = -1; +} => This does not look good either? Why are we conditionally declaring vars here? Why are we fixing this only for a specific autobarcode type? -- You are receiving this mail because: You are watching all bug changes.