Koha/cataloguing
Jonathan Druart 0c8496a85a 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>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-01-03 21:37:40 -10:00
..
value_builder Bug 29689: (bug 28445 follow-up) Fix AutoBarcode=hbyymmincr 2022-01-03 21:37:40 -10:00
addbiblio.pl Bug 29146: Apply framework defaultvalue only to new records 2021-11-15 12:38:39 +01:00
addbooks.pl Bug 29437: (QA follow-up) Remove Business::ISBN from addbooks 2021-11-19 15:23:27 +01:00
additem.pl Bug 27526: Fix for prefill preventing duplication 2 2021-10-28 10:54:42 +02:00
editor.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
linkitem.pl Bug 18984: Remove NORMARC support 2021-10-07 15:36:40 +02:00
merge.pl Bug 22690: (QA follow-up) Move adopt_items_from_biblios to Koha::Items 2021-08-27 11:02:41 +02:00
merge_ajax.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
moveitem.pl Bug 29179: Remove useless includes in moveitem.pl 2021-10-07 10:54:59 +02:00
plugin_launcher.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
ysearch.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
z3950_auth_search.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
z3950_search.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00