Koha/cataloguing/value_builder
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
..
barcode.pl Bug 29689: (bug 28445 follow-up) Fix AutoBarcode=hbyymmincr 2022-01-03 21:37:40 -10:00
barcode_manual.pl Bug 29689: (bug 28445 follow-up) Fix AutoBarcode=hbyymmincr 2022-01-03 21:37:40 -10:00
callnumber-KU.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
callnumber.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
cn_browser.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
dateaccessioned.pl Bug 29369: Use Flatpickr in dateaccessioned cataloging plugin 2021-11-03 15:40:53 +01:00
EXAMPLE.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
macles.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
marc21_field_005.pl
marc21_field_006.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
marc21_field_007.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
marc21_field_008.pl Bug 27461: Right pad with default elements for too short 008s 2021-09-28 15:12:45 +02:00
marc21_field_008_authorities.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
marc21_field_008_classifications.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
marc21_field_245h.pl
marc21_field_260b.pl
marc21_leader.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
marc21_leader_authorities.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
marc21_linking_section.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
marc21_orgcode.pl
stocknumber.pl
stocknumberam123.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
stocknumberAV.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
unimarc_field_4XX.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_010.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_100.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_100_authorities.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_105.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_106.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_110.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_115a.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_115b.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_116.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_117.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_120.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_121a.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_121b.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_122.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_123a.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_123d.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_123e.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_123f.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_123g.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_123i.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_123j.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_124.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_124a.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_124b.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_124c.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_124d.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_124e.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_124f.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_124g.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_125.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_125a.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_125b.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_126.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_126a.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_126b.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_127.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_128a.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_128b.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_128c.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_130.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_135a.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_140.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_141.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_210c.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_210c_bis.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_225a.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_225a_bis.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_686a.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_field_700-4.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_leader.pl Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
unimarc_leader_authorities.pl Bug 28769: (QA follow-up) Fix another occurrence 2021-10-18 11:28:40 +02:00
upload.pl