Koha/t/db_dependent
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
..
Acquisition
api/v1 Revert "Bug 29403: Fix api/v1/patrons.t" 2021-12-16 14:27:03 -10:00
Auth
AuthoritiesMarc
Authority
Biblio Bug 24674: (follow-up) Simpler regex 2021-11-05 12:17:08 +01:00
Circulation Bug 29395: use EXPORT_OK from Koha::Patron::Debarments 2021-11-03 15:40:52 +01:00
CourseReserves
Creators
cronjobs
data
Exporter
Holds
Illrequest
Items
Koha Bug 27266: (QA follow-up) Rename to get_marc_authors 2021-12-15 12:15:06 -10:00
Labels
LDAP
Letters
Members
misc/translator
OAI Bug 29484: Regression tests 2021-12-10 21:14:59 -10:00
Patron Bug 29395: use EXPORT_OK from Koha::Patron::Debarments 2021-11-03 15:40:52 +01:00
Record
Reports Bug 27884: Add tests 2021-11-02 16:50:01 +01:00
Reserves
Search
selenium Bug 29696: Add tests 2021-12-21 21:10:07 -10:00
Serials
SIP
Template/Plugin
Utils Bug 28959: Add virtualshelves.public as a boolean 2021-10-28 17:47:38 +02:00
www Bug 29368: Correctly mock Zebra index from tests 2021-10-29 15:45:53 +02:00
00-strict.t Bug 28617: Remove kohalib.pl and rely on PERL5LIB 2021-12-07 12:16:28 -10:00
01-test_dbic.t
Accounts.t
Acquisition.t
Amazon.t
ArticleRequests.t
AudioAlerts.t
Auth.t
Auth_with_cas.t
Auth_with_ldap.t
AuthorisedValues.t
AuthoritiesMarc.t
AuthUtils.t
BackgroundJob.t
Barcodes.t
Barcodes_ValueBuilder.t Bug 29689: (bug 28445 follow-up) Fix AutoBarcode=hbyymmincr 2022-01-03 21:37:40 -10:00
Biblio.t
Breeding.t Bug 29437: (QA follow-up) Update TODO in Breeding.t 2021-11-19 15:23:27 +01:00
Budgets.t
Cache.t
Calendar.t
Charset.t
check_kohastructure.t
check_sysprefs.t
Circulation.t Bug 29395: use EXPORT_OK from Koha::Patron::Debarments 2021-11-03 15:40:52 +01:00
Clubs.t
Context.t
Contract.t
CourseReserves.t
db_structure.t
DecreaseLoanHighHolds.t
Filter_MARC_ViewPolicy.t
Fines.t
FrameworkPlugin.t
Heading.t
Heading_MARC21.t
Hold.t
Holds.t
HoldsQueue.t Bug 29015: Unit tests 2021-11-03 15:40:52 +01:00
Holidays.t
Illcomments.t
Illrequestattributes.t
Illrequests.t
ILSDI_Services.t
ImportBatch.t Bug 29273: Fix failing tests 2021-11-15 15:06:25 +01:00
ImportExportFramework.t
Installer.t Bug 26326: (follow-up) Add ability to check for existence of any primary key 2021-11-03 15:40:52 +01:00
Items.t
Koha.t
Koha_Authority.t
Koha_Database.t
Koha_Elasticsearch.t
Koha_ExternalContent_OverDrive.t
Koha_ExternalContent_RecordedBooks.t
Koha_Misc_Files.t
Languages.t
Letters.t
LibraryGroups.t
Linker_Default.t
Linker_FirstMatch.t
Log.t Bug 28692: (follow-up) Add tests 2021-11-16 14:00:21 +01:00
MarcModificationTemplates.t
Members.t
Message.t
MungeMarcPrice.t
Overdues.t
Passwordrecovery.t
Patroncards.t
PatronLists.t
Patrons.t
Record.t
RecordProcessor_EmbedSeeFromHeadings.t
Reports.t
Reserves.t
rollingloans.t
RotatingCollections.t
Search.t Bug 28365: Add unit test 2021-11-03 15:40:52 +01:00
Serials.t
Serials_2.t
Service.t
ShelfBrowser.t
Sitemapper.t
Stats.t
StockRotationItems.t
StockRotationRotas.t
StockRotationStages.t
SuggestionEngine_ExplodedTerms.t
Suggestions.t Bug 28855: (follow-up) adapt specific test 2021-12-15 12:14:53 -10:00
sysprefs.t
TablesSettings.t
Tags.t
Templates.t
TestBuilder.t Bug 29363: Fix TestBuilder.t if bib 123 does not exist 2021-10-29 09:59:29 +02:00
Upload.t
UsageStats.t
Virtualshelves.t Bug 28959: Add virtualshelves.public as a boolean 2021-10-28 17:47:38 +02:00
XISBN.t
XSLT.t
yaml.t
zebra_config.pl