To reproduce: - Set autoBarcode = <branchcode>yymm0001 - Make sure you have a serial that is set to "create an item record when receiving this serial" - Receive an issue - Click in the barcode field - nothing happens Bug 11273, attachment 42372 [details] [review] changes the logic around locating the barcode field in the item table from this: - for (i=0 ; i<document.f.field_value.length ; i++) { - if (document.f.tag[i].value == '$args->{loctag}' && document.f.subfield[i].value == '$args->{locsubfield}') { To this: + var form = document.getElementById('f'); + if ( !form ) { + form = document.getElementById('Aform'); + } + for (i=0 ; i<form.field_value.length ; i++) { + if (form.tag[i].value == '$args->{loctag}' && form.subfield[i].value == '$args->{locsubfield}') { This works for the item table that adds items to a bib record: <form id="f" method="post" action="/cgi-bin/koha/cataloguing/additem.pl" name="f"> but not for the item table that you get when receiving a serials issue, which is missing the id="f": <form method="post" name="f" action="serials-edit.pl" id="serials_edit"> Patch coming!
Created attachment 43680 [details] Item form with id=f
Created attachment 43681 [details] Item form without id=f
I thought this would be as easy as adding id="f" to the item form for receiving serials, but that changes the whole look of the form. See attached screenshots.
D'oh, the form already has id="serials_edit". Patch coming in a sec.
Created attachment 43684 [details] [review] Bug 15042 - Barcode hbyymmincr does not work when receiving serials To test: - Set autoBarcode = <branchcode>yymm0001 - Make sure you have a serial that is set to "create an item record when receiving this serial" - Receive an issue - Click in the barcode field - nothing happens - Apply patch and reload page - Receive an issue - Click in the barcode field - a barcode conforming to the hbyymmincr setting appears
Created attachment 43741 [details] [review] Bug 15042 - Barcode hbyymmincr does not work when receiving serials To test: - Set autoBarcode = <branchcode>yymm0001 - Make sure you have a serial that is set to "create an item record when receiving this serial" - Receive an issue - Click in the barcode field - nothing happens - Apply patch and reload page - Receive an issue - Click in the barcode field - a barcode conforming to the hbyymmincr setting appears Patch works as advertised. Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 43743 [details] [review] Bug 15042 - Barcode hbyymmincr does not work when receiving serials To test: - Set autoBarcode = <branchcode>yymm0001 - Make sure you have a serial that is set to "create an item record when receiving this serial" - Receive an issue - Click in the barcode field - nothing happens - Apply patch and reload page - Receive an issue - Click in the barcode field - a barcode conforming to the hbyymmincr setting appears Patch works as advertised. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Not sure it's a major one, but definitely annoying.
Patch pushed to master. Thanks Magnus!
Pushed to 3.20.x will be in 3.20.5
Pushed to 3.18.x, is in 3.18.12.