Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin
Aleisha Amohia 39b17d0526
Bug 30358: Strip leading/trailing whitespace characters from input fields when cataloguing
This enhancement adds a system preference StripWhitespaceChars which,
when enabled, will strip leading and trailing whitespace characters from
all fields when cataloguing both bibliographic records and authority
records. Whitespace characters that will be stripped are:
- spaces
- newlines
- carriage returns
- tabs

To test:
1. Apply patch and install database updates
2. Go to Administration, system preferences, find the new
StripWhitespaceChars preference. It should be "Don't strip" by default.
Change it to "Strip".
3. Search for a biblio record and edit it. Put some leading or trailing
whitespace characters in input fields and textarea fields and save.
4. Confirm these characters are removed when you save the record.
5. Repeat steps 3 and 4 for authority records.
6. Confirm tests pass t/db_dependent/Biblio/ModBiblioMarc.t

Sponsored-by: Educational Services Australia SCIS

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 30358: (follow-up) Also strip inner newlines

This patch amends the StripWhitespaceChars system preference to also
strip inner newlines (line breaks and carriage returns) when enabled.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 30358: (follow-up) Inner newlines should be replaced with a space

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 30358: (follow-up) Fixing tests and including for inner newlines

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 30358: (follow-up) Clarify syspref wording about fields affected

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 30358: (follow-up) Consider field has multiple subfields of same key

To test:

1) Click the clone subfield button to make multiple subfields with the
same key, i.e. 500$a$a$a
2) Save the record and confirm that the fields contain the correct data
after whitespaces are stripped.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 30358: (follow-up) Put multiple subfields fix on auth side

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 30358: (follow-up) stripWhitespaceChars subroutine and tests

To test:

Confirm test plan above still works as expected and tests pass in
t/Koha_MetadataRecord.t

Sponsored-by: Catalyst IT

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 30358: (follow-up) Fixing ModBiblioMarc.t tests

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 30358: (follow-up) Do not strip whitespace from control fields

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 30358: (follow-up) Simplify regex

The regex does the following:
1. Replace newlines and carriage returns with a space
2. Replace leading and trailing whitespace with nothing (strip)

Signed-off-by: Hammat Wele <hammat.wele@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-05-16 15:17:26 -03:00
..
preferences Bug 30358: Strip leading/trailing whitespace characters from input fields when cataloguing 2023-05-16 15:17:26 -03:00
searchengine/elasticsearch Bug 33129: Use template wrapper for breadcrumbs: Administration part 6 2023-04-14 15:39:39 -03:00
additional-fields.tt Bug 11844: (follow-up) Add format hint to the additional fields admin page 2023-05-16 12:58:38 +02:00
admin-home.tt Bug 33673: Change "global system preferences" to "system preferences" 2023-05-09 10:58:01 -03:00
adveditorshortcuts.tt
aqbudgetperiods.tt
aqbudgets.tt Bug 33696: Fix doubled up home icon in budgets page 2023-05-09 10:57:59 -03:00
aqcontract.tt
aqplan.tt
audio_alerts.tt
auth_subfields_structure.tt
auth_tag_structure.tt
authorised_values.tt Bug 33104: DB changes 2023-05-05 10:18:45 -03:00
authtypes.tt
background_jobs.tt Bug 32970: (follow-up) Move include to specific job file 2023-05-16 10:17:11 -03:00
biblio_framework.tt
branch_transfer_limits.tt
branches.tt
cash_registers.tt
categories.tt
checkmarc.tt
cities.tt
classsources.tt
clone-rules.tt
columns_settings.tt
credit_types.tt Bug 26403: Use accounts include in account management pages 2023-05-10 15:26:15 -03:00
curbside_pickup.tt
currency.tt
debit_types.tt Bug 26403: Use accounts include in account management pages 2023-05-10 15:26:15 -03:00
desks.tt
didyoumean.tt
edi_accounts.tt
edi_ean_accounts.tt
identity_provider_domains.tt Bug 33699: Typo in identity_provider_domains.tt (presedence) 2023-05-12 11:22:40 -03:00
identity_providers.tt
item_circulation_alerts.tt
items_search_field.tt
items_search_fields.tt
itemtypes.tt
koha2marclinks.tt
library_groups.tt
localization.tt
marc-overlay-rules.tt Bug 33335: (QA follow-up) Polishing and comments 2023-05-12 17:50:09 -03:00
marc_subfields_structure.tt
marctagstructure.tt Bug 33127: Use template wrapper for breadcrumbs: Administration part 5 2023-04-21 10:36:24 -03:00
matching-rules.tt
oai_set_mappings.tt Bug 33127: Use template wrapper for breadcrumbs: Administration part 5 2023-04-21 10:36:24 -03:00
oai_sets.tt Bug 31405: Set focus for cursor to setSpec input when adding a new OAI set 2023-05-05 12:13:56 -03:00
overdrive.tt Bug 33127: Use template wrapper for breadcrumbs: Administration part 5 2023-04-21 10:36:24 -03:00
patron-attr-types.tt Bug 33127: Use template wrapper for breadcrumbs: Administration part 5 2023-04-21 10:36:24 -03:00
preferences.tt Bug 33127: Use template wrapper for breadcrumbs: Administration part 5 2023-04-21 10:36:24 -03:00
restrictions.tt Bug 33549: Improve wording of dialog messages 2023-04-24 10:43:41 -03:00
search_filters.tt Bug 33127: Use template wrapper for breadcrumbs: Administration part 5 2023-04-21 10:36:24 -03:00
share_content.tt Bug 33129: Use template wrapper for breadcrumbs: Administration part 6 2023-04-14 15:39:39 -03:00
smart-rules.tt Bug 33129: Use template wrapper for breadcrumbs: Administration part 6 2023-04-14 15:39:39 -03:00
sms_providers.tt Bug 33129: Use template wrapper for breadcrumbs: Administration part 6 2023-04-14 15:39:39 -03:00
smtp_servers.tt Bug 33129: Use template wrapper for breadcrumbs: Administration part 6 2023-04-14 15:39:39 -03:00
sru_modmapping.tt
sru_modmapping_auth.tt
systempreferences.tt Bug 33129: Use template wrapper for breadcrumbs: Administration part 6 2023-04-14 15:39:39 -03:00
transfer_limits.tt Bug 33129: Use template wrapper for breadcrumbs: Administration part 6 2023-04-14 15:39:39 -03:00
transport-cost-matrix.tt Bug 33129: Use template wrapper for breadcrumbs: Administration part 6 2023-04-14 15:39:39 -03:00
usage_statistics.tt Bug 33129: Use template wrapper for breadcrumbs: Administration part 6 2023-04-14 15:39:39 -03:00
z3950servers.tt Bug 31410: Set focus for cursor to Server name when adding a new Z39.50/SRU server 2023-05-05 12:13:55 -03:00