Bug 42568: Match maxlength attributes to marc_order_accounts column sizes

This patch adds a maxlength attribute to a few form fields in the MARC
order accounts entry form. Text inputs should now allow the user the
enter more characters than the db will accept.

To test, apply the patch and enable the MarcOrderingAutomation system
preference if necessary.

- Go to Administration -> MARC order accounts -> New account.
- Test these inputs to confirm that you can't enter more characters than
  their maxlengths:
  - Description (250)
  - Match field (10)
  - Match value (50)
  - Basket name field (10)

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 499f7e595e)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This commit is contained in:
Owen Leonard 2026-05-08 15:09:45 -04:00 committed by Baptiste Wojtkowski
parent b5968d7492
commit 4ac75b005c
No known key found for this signature in database
GPG Key ID: 47A8A13E10BC0D40
1 changed files with 4 additions and 4 deletions

View File

@ -114,7 +114,7 @@
</li>
<li>
<label for="description">Description: </label>
<input type="text" name="description" id="description" size="20" value="[% account.description | html %]" />
<input type="text" name="description" id="description" size="20" maxlength="250" value="[% account.description | html %]" />
</li>
<li>
<label for="download_directory">Download directory: </label>
@ -123,7 +123,7 @@
</li>
<li>
<label for="match_field">Match field: </label>
<input type="text" name="match_field" id="match_field" size="20" value="[% account.match_field | html %]" />
<input type="text" name="match_field" id="match_field" size="10" maxlength="10" value="[% account.match_field | html %]" />
<div class="hint"
>(Optional): If you have files from multiple vendors in the same file directory, the match field is the field in the MARC record that will be checked to see if the file should be processed by this account.</div
>
@ -131,12 +131,12 @@
</li>
<li>
<label for="match_value">Match value: </label>
<input type="text" name="match_value" id="match_value" size="20" value="[% account.match_value | html %]" />
<input type="text" name="match_value" id="match_value" size="20" maxlength="50" value="[% account.match_value | html %]" />
<div class="hint">(Optional): This is the value that will be checked against the match field to see if the file matches this account. If it does it will be processed by this account, if not it will be skipped.</div>
</li>
<li>
<label for="basket_name_field">Basket name field: </label>
<input type="text" name="basket_name_field" id="basket_name_field" size="20" value="[% account.basket_name_field | html %]" />
<input type="text" name="basket_name_field" id="basket_name_field" size="10" maxlength="10" value="[% account.basket_name_field | html %]" />
<div class="hint">(Optional): If you want the basket name to be dynamic based on a value in the MARC file, you can set a field here that will be read on import and used for the basket name.</div>
<div class="hint">The format for this field is the same as MARCFieldsToOrder - the field and the subfield separated by a dollar sign e.g. 245$a</div>
<div class="hint">The first record in the file must be the record to contain this field, others will be ignored. If a value is not found the filename will be used for the basket name.</div>