[Bug 29689] New: Update to 21.11 broken auto-generated barcode in <branchcode>0001 option
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Bug ID: 29689 Summary: Update to 21.11 broken auto-generated barcode in <branchcode>0001 option Change sponsored?: --- Product: Koha Version: 21.11 Hardware: All OS: All Status: NEW Severity: blocker Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: jmhenrique@yahoo.com.br QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Created attachment 128480 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128480&action=edit Error in Chrome console Hi! In version 21.05 the automatic barcode generator for manual addition of items worked. When upgrading to 21.11, it stopped working. The chrome debug shows the following message attached To reproduce the error, clicking on the item "p - barcode" generates the error on the console, and does not show any expected results. The autoBarcode option is set to "<branchcode>yymm0001" . Other autoBarcode options work except "<branchcode>aamm0001" . -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Henry <jmhenrique@yahoo.com.br> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P3 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Henry <jmhenrique@yahoo.com.br> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P4 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |28445 Version|21.11 |unspecified CC| |jonathan.druart+koha@gmail. | |com Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com Status|NEW |ASSIGNED Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28445 [Bug 28445] Use the task queue for the batch delete and update items tool -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 128490 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128490&action=edit Bug 29689: (bug 28445 follow-up) Fix AutoBarcode=hbyymmincr The selector is not correct, we need to use .input_marceditor instead of name="field_value". Test plan: Set autoBarcode=<branchcode>yymm0001 Catalogue a new item, click into the barcode input Notice that without this patch you get a JS error in the console Uncaught TypeError: form.field_value is undefined Focustag_952_subfield_p_878344 Focustag_952_subfield_p_878344_handler jQuery 11 BindEventstag_952_subfield_p_878344 With this patch applied the barcode is correctly generated. QA Note: it would be way easier if all add item forms were using the new methods, it could be: let loc = document.getElementsByName('items.homebranch')[0].value; Yes, that's all! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_21_11_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Henry <jmhenrique@yahoo.com.br> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs Signoff |RESOLVED --- Comment #2 from Henry <jmhenrique@yahoo.com.br> --- All works, thanks =D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- This patch needs to be integrated. Can you signoff on the patch? https://wiki.koha-community.org/wiki/Sign_off_on_patches -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128490|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 128521 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128521&action=edit Bug 29689: (bug 28445 follow-up) Fix AutoBarcode=hbyymmincr The selector is not correct, we need to use .input_marceditor instead of name="field_value". Test plan: Set autoBarcode=<branchcode>yymm0001 Catalogue a new item, click into the barcode input Notice that without this patch you get a JS error in the console Uncaught TypeError: form.field_value is undefined Focustag_952_subfield_p_878344 Focustag_952_subfield_p_878344_handler jQuery 11 BindEventstag_952_subfield_p_878344 With this patch applied the barcode is correctly generated. QA Note: it would be way easier if all add item forms were using the new methods, it could be: let loc = document.getElementsByName('items.homebranch')[0].value; Yes, that's all! Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |nick@bywatersolutions.com --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- This works on additem.pl and neworderempty.pl but it fails on serials-edit.pl - I don't get the branchcode - though that page works before this patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Manos PETRIDIS <egpetridis@yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |egpetridis@yahoo.com --- Comment #6 from Manos PETRIDIS <egpetridis@yahoo.com> --- Same behaviour here, autoBarcode set to <branchcode>yymm0001 but barcodes are not auto-generated after upgrading to 21.11. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128521|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 128727 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128727&action=edit Bug 29689: (bug 28445 follow-up) Fix AutoBarcode=hbyymmincr The selector is not correct, we must to not rely on the number. This patch fixes a regression caused by bug 28445, but also a long-standing bug. * Regression: The barcode plugin is broken is autoBarcode=<branchcode>yymm0001 There is a JS error in the console: Uncaught TypeError: form.field_value is undefined Focustag_952_subfield_p_878344 Focustag_952_subfield_p_878344_handler jQuery 11 BindEventstag_952_subfield_p_878344 * Long standing bug: If there are several item forms on the same page, the branchcode is not correctly retrieved. For instance on the "Serial edition" page there are 2 item forms, the homebranch that is used by the barcode plugin will be the one from the last form. Test plan: * regression Set autoBarcode=<branchcode>yymm0001 Catalogue a new item, click into the barcode input Notice that without this patch you get a JS error in the console * long standing bug Create a new subscription, select "Create an item record when receiving this serial". Receive a serial Open the 2 item forms ("Click to add item") Select 2 different home library and click the barcode inputs. The prefix (branchcode) should be correct with this patch applied. QA Note: it would be way easier if all add item forms were using the new methods, it could be: let loc = document.getElementsByName('items.homebranch')[0].value; Yes, that's all! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Nick Clemens from comment #5)
This works on additem.pl and neworderempty.pl but it fails on serials-edit.pl - I don't get the branchcode - though that page works before this patch
Thanks Nick! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- This patch needs quick attention if we want to have it part of 21.11.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Hayley Pelham <hayleypelham@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Hayley Pelham <hayleypelham@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128727|0 |1 is obsolete| | --- Comment #10 from Hayley Pelham <hayleypelham@catalyst.net.nz> --- Created attachment 128800 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128800&action=edit Bug 29689: (bug 28445 follow-up) Fix AutoBarcode=hbyymmincr The selector is not correct, we must to not rely on the number. This patch fixes a regression caused by bug 28445, but also a long-standing bug. * Regression: The barcode plugin is broken is autoBarcode=<branchcode>yymm0001 There is a JS error in the console: Uncaught TypeError: form.field_value is undefined Focustag_952_subfield_p_878344 Focustag_952_subfield_p_878344_handler jQuery 11 BindEventstag_952_subfield_p_878344 * Long standing bug: If there are several item forms on the same page, the branchcode is not correctly retrieved. For instance on the "Serial edition" page there are 2 item forms, the homebranch that is used by the barcode plugin will be the one from the last form. Test plan: * regression Set autoBarcode=<branchcode>yymm0001 Catalogue a new item, click into the barcode input Notice that without this patch you get a JS error in the console * long standing bug Create a new subscription, select "Create an item record when receiving this serial". Receive a serial Open the 2 item forms ("Click to add item") Select 2 different home library and click the barcode inputs. The prefix (branchcode) should be correct with this patch applied. QA Note: it would be way easier if all add item forms were using the new methods, it could be: let loc = document.getElementsByName('items.homebranch')[0].value; Yes, that's all! Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128800|0 |1 is obsolete| | --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 128860 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128860&action=edit Bug 29689: (bug 28445 follow-up) Fix AutoBarcode=hbyymmincr The selector is not correct, we must to not rely on the number. This patch fixes a regression caused by bug 28445, but also a long-standing bug. * Regression: The barcode plugin is broken is autoBarcode=<branchcode>yymm0001 There is a JS error in the console: Uncaught TypeError: form.field_value is undefined Focustag_952_subfield_p_878344 Focustag_952_subfield_p_878344_handler jQuery 11 BindEventstag_952_subfield_p_878344 * Long standing bug: If there are several item forms on the same page, the branchcode is not correctly retrieved. For instance on the "Serial edition" page there are 2 item forms, the homebranch that is used by the barcode plugin will be the one from the last form. Test plan: * regression Set autoBarcode=<branchcode>yymm0001 Catalogue a new item, click into the barcode input Notice that without this patch you get a JS error in the console * long standing bug Create a new subscription, select "Create an item record when receiving this serial". Receive a serial Open the 2 item forms ("Click to add item") Select 2 different home library and click the barcode inputs. The prefix (branchcode) should be correct with this patch applied. QA Note: it would be way easier if all add item forms were using the new methods, it could be: let loc = document.getElementsByName('items.homebranch')[0].value; Yes, that's all! Signed-off-by: Hayley Pelham <hayleypelham@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nugged@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 --- Comment #13 from Manos PETRIDIS <egpetridis@yahoo.com> --- In my installation (single active branch/library, not a lending library, less than 9999 new items per month, autoBarcode set to <branchcode>yymm0001) I've used the following SQL statement to fill missing barcodes. Should you decide to use it, please remember to first check it thourougly and change "ABC" with your own branch code. I know it will leave gaps in the barcode sequence, but I don't really mind it. UPDATE items SET barcode = CONCAT ( 'ABC' ,lpad(substring(extract(YEAR FROM datelastseen), 3, 2), 2, 0) ,lpad(extract(month FROM datelastseen), 2, 0) ,lpad(1 + itemnumber - ( SELECT T.INI FROM ( SELECT min(i.itemnumber) AS ini ,extract(YEAR FROM i.datelastseen) AS DTE_YY ,extract(month FROM i.datelastseen) AS DTE_MM FROM items i WHERE i.homebranch = 'ABC' GROUP BY extract(YEAR FROM i.datelastseen) ,extract(month FROM i.datelastseen) ) T WHERE T.dte_yy = extract(YEAR FROM datelastseen) AND T.DTE_MM = extract(MONTH FROM datelastseen) ), 4, 0) ) WHERE items.homebranch = 'ABC' AND barcode IS NULL; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 --- Comment #14 from Manos PETRIDIS <egpetridis@yahoo.com> --- ...oops, thoroughly! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00 |22.05.00,21.11.02 released in| | CC| |kyle@bywatersolutions.com Status|Pushed to master |Pushed to stable --- Comment #15 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |andrew@bywatersolutions.com Status|Pushed to stable |RESOLVED --- Comment #16 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Missing dependency, not backported to 21.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29689 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37854 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37854 [Bug 37854] Barcode fails when adding item during order receive (again) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org