Commit Graph

7273 Commits

Author SHA1 Message Date
Lucas Gass 5f442507f2
Bug 40659: DBRev 25.12.00.050
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-23 16:04:14 -06:00
David Cook ff9b74b72b
Bug 40659: (follow-up) add empty default VIRTUALCARD notice
Also include a reference to the notice template from sysprefs

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-23 16:04:12 -06:00
Lucas Gass dd5a0659cc
Bug 41311: DBRev 25.12.00.049
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-23 16:04:09 -06:00
Lucas Gass 6eb241bd7e
Bug 41311: (RM follow-up) Make DBRev match schema
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-23 16:04:08 -06:00
Kyle M Hall f351f5fbce
Bug 41311: (QA follow-up) Fix database update and table structure
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-23 16:04:08 -06:00
Kyle M Hall 4310aebeda
Bug 41311: Add ability for SIP to send patron home library ( branchcode ) in AO field
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-23 16:04:07 -06:00
Lucas Gass 281551d741
Bug 40633: DBRev 25.12.00.048
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-23 16:04:01 -06:00
Martin Renvoize 37ad6039c6
Bug 40633: Add new keyboard shortcut for the fixed-length field helper
This adds a new 'open_helper_plugin' keyboard shortcut to the
keyboard_shortcuts table, used by the advanced cataloging editor to
open the value_builder popup for the Leader, 006, 007 and 008 fixed
length fields. The default key combination is Shift-Ctrl-H ("Helper")
and is rebindable from Administration > Keyboard shortcuts. The
behaviour bound to this shortcut is added in a follow-up patch.

Test plan:
1. Apply this patch and run installer/data/mysql/updatedatabase.pl in
   KTD.
2. Run:
     SELECT * FROM keyboard_shortcuts
      WHERE shortcut_name = 'open_helper_plugin';
   Confirm a row exists with shortcut_keys = 'Shift-Ctrl-H'.
3. Re-run updatedatabase.pl and confirm the atomic update is idempotent
   (no error, no duplicate row).
4. On a fresh install (or by re-loading mandatory/keyboard_shortcuts.sql
   on an empty table) confirm the same row is created.

Sponsored-by: Main Library Alliance <https://www.mainlib.org/>
Signed-off-by: Jeanne Mauriello <jeanne.mauriello@mainlib.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-23 16:03:53 -06:00
Lucas Gass a9d5f7d453
Bug 42156: DBRev 25.12.00.047
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-23 09:25:07 -06:00
Martin Renvoize 3a3797f3f5
Bug 42156: (QA follow-up) Register the new 'authid' search field on upgrade
Adding an entry to admin/searchengine/elasticsearch/mappings.yaml is only
picked up by fresh installs or when an administrator explicitly resets the
search mappings (rebuild_elasticsearch.pl -r). Existing installations would
otherwise never see the new 'authid' index in the admin UI nor have it
available as a matching index until they ran the reset.

This atomicupdate inserts:
 - a search_field row for 'authid' (type 'stdno', staff_client + opac on)
 - search_marc_map rows for authorities/marc21/001 and authorities/unimarc/001
   (INSERT IGNORE - the rows are shared with 'local-number' and usually
   already exist)
 - search_marc_to_field rows linking those MARC maps to the new field with
   sort on, matching mappings.yaml

It is a no-op if 'authid' is already present.

Administrators still need to rebuild the Elasticsearch index for the new
field to become queryable - this is noted with say_info at the end.

Test plan:
 1 - On an existing instance without the patch: note there is no 'authid'
     field under Administration > Search engine configuration (Elasticsearch)
     for authorities.
 2 - Apply the whole patchset.
 3 - perl installer/data/mysql/updatedatabase.pl
 4 - Re-check the search engine configuration: 'authid' appears for the
     authorities index, mapped to 001 for both MARC flavours.
 5 - Run the update again - confirm the "already exists, skipping" warning.
 6 - misc/search_tools/rebuild_elasticsearch.pl -r -v -a
 7 - Confirm a matching rule using index 'authid' now works.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-23 09:25:06 -06:00
Jonathan Druart 3a91b4f8d0
Bug 35267: Fix check_sysprefs.t
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-20 13:04:58 -06:00
Lucas Gass aaf2959023
Bug 35267: DBRev 25.12.00.046
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-17 09:18:11 -06:00
Thomas Klausner 329b0da16a
Bug 35267: (follow-up) Adapt atomicupdate to new DB schema
and add a missing newline

Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-17 09:18:10 -06:00
Martin Renvoize c1314fd57b
Bug 35267: Add and Update Notice CSS system preferences
This patch clarifies the system level notice css preferences.

We rename NoticeCSS to EmailNoticeStylesheet
We rename SlipCSS to PrintSlipStylesheet
We add AllNoticeStylesheet
We add AllNoticeCSS to contain inline CSS for all html notices
We add EmailNoticeCSS to contain inline CSS for Email notices
We add PrintNoticeCSS to contain inline CSS for Print notices
We add PrintSlipCSS to contain inline CSS for Print slips

Sponsored-by: Open Fifth <https://openfifth.co.uk>
Signed-off-by: Marion Durand <marion.durand@biblibre.com>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-17 09:18:04 -06:00
Lucas Gass 4201fdfe2c
Bug 17387: DBRev 25.12.00.045
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 14:10:30 -06:00
Martin Renvoize 8681b48fdb
Bug 17387: (follow-up) move records_restore under editcatalogue permission
The restore functionality is a cataloguing operation and should live
under the editcatalogue permission module (bit 9) rather than tools
(bit 13), consistent with where it appears in the UI.

Update all references:
- userpermissions.sql and atomicupdate: module_bit 13 → 9
- Swagger x-koha-authorization: tools → editcatalogue
- CGI flagsrequired: tools → editcatalogue
- Templates: CAN_user_tools_records_restore → CAN_user_editcatalogue_records_restore
- C4::Auth::get_cataloguing_page_permissions: remove from tools
  sub-perms list (editcatalogue '*' already covers it)
- Tests: module_bit 13 → 9

Signed-off-by: Michaela <michaela.sieber@kit.edu>
Sponsored-by: ByWater Solutions
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 14:10:27 -06:00
Martin Renvoize 06f4abbf9a
Bug 17387: (follow-up) address review feedback
- Fix permission description to explicitly mention bibliographic records
  and items (not just 'records')
- Fix date filter to use correct DB column per table: deletedbiblio uses
  'timestamp', deleteditems uses 'deleted_on'
- Remove leftover CAN_user_editcatalogue_edit_catalogue condition from
  the Batch editing section in cat-menu.inc; a user with only
  edit_catalogue would see an empty section heading
- Wrap biblio and item restore operations in DB transactions so that a
  failed store cannot leave a record inserted without being removed from
  the deleted table (or vice-versa)
- Catch Koha::Exceptions::Object::DuplicateID in the item restore
  controller and return a human-readable 409 instead of a generic 500
- When 'Restore bibliographic record' is clicked in the deleted-bib
  warning modal, fetch the biblio and open the full restore modal with
  the originally clicked item pre-selected, rather than restoring
  immediately without item selection

Signed-off-by: Michaela <michaela.sieber@kit.edu>
Sponsored-by: ByWater Solutions
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 14:10:27 -06:00
Jacob O'Mara f4c154f155
Bug 17387: add restore records permission as child of cataloguing perms
Signed-off-by: Michaela <michaela.sieber@kit.edu>
Sponsored-by: ByWater Solutions
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 14:10:25 -06:00
Lucas Gass 98abc435c8
Bug 21820: DBRev 25.12.00.044
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 11:37:19 -06:00
Paul Derscheid 77d6fe1732
Bug 21820: (QA follow-up) Fix bug number in atomicupdate
- bug_number was set to 40853 instead of 21820 (probably copy-paste error)

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 11:37:19 -06:00
Thomas Klausner 55308aa365
Bug 21820: Add ElasticsearchEnableZebraQueue syspref to control Zebra indexing when using Elasticsearch
Previously, Koha always added items to the Zebra queue when indexing via Elasticsearch. This adds a new system preference ElasticsearchEnableZebraQueue that allows disabling this behavior.

Unit Test:

* run the unit test t/db_dependent/Koha/SearchEngine/Elasticsearch/Indexer.t
* there should be a new subtest like this:

    1..5
    ok 1 - We start with an empty zebra queue
    ok 2 - new entry in zebraqueue for auth
    ok 3 - new entry in zebraqueue for biblio
    ok 4 - no new entry in zebraqueue for auth
    ok 5 - no new entry in zebraqueue for biblio
ok 5 - syspref ElasticsearchEnableZebraQueue

Manual Test Plan:

* Start ktd with Elasticsearch enabled
* As there is no interface to the zebraqueue, you need to connect to the DB and use SQL directly
  * ktd --dbshell
  * `select count(*) from zebraqueue;`
  * remember that number
* Edit any biblio or auth
* Check the zebraqueue again via SQL
* There should be one more entry

* Now apply the patch
* Then got to Sysprefs and set ElasticsearchEnableZebraQueue to `Disable`

* Edit another biblio or auth
  * has to be a different one, because Koha will prevent the same ID to be added again to zebraqueue
* Again check  zebraqueue via SQL
* There should be *no* new entry

QA Note:

the qa tool reports
[FAIL] Koha/SearchEngine/Elasticsearch/Indexer.pm
   FAIL	 pod_coverage
		sub _get_record has no pod coverage.

But this patch does not touch this code, so I guess this fail is caused by a stricter qa tool

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 11:37:18 -06:00
Lucas Gass 3f5372717f
Bug 38136: DBRev 25.12.00.043
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 11:37:15 -06:00
Julian Maurice e7f483def5
Bug 38136: Refactor database translations (alternative)
This has the same goals of bug 24975 but with a different approach.

Bug 24975 tried the "POT/PO files as database tables" approach but
it appeared that is not what best fits our needs.

Instead of a "source text / translated text" mapping, we need
translations to be attached to a specific "object" (or table row), which
has the added benefit of keeping translations unaffected when the
original string changes. It may or may not be what you want but at least
this avoids the problem where fixing an error in the original string
forces users to re-translate everything.

We also need to be able to translate all translatable properties of a
particular entity.

The solution proposed here is to add a DBIC component that will add
several DBIC relations to the `localization` table:
* a relation named `localizations` that will return all translations for
  all translatable properties for all languages.
* for each translatable property:
  * a relation named `{$property}_localizations` that will return all
    translations for a given property, for all languages
  * a relation named `{$property}_localization` that will return the
    translation for a given property, for the current language

To enable translations for a particular entity, we will need to:
* add two method calls in the "result class" corresponding to the
  localizable object type
* in the admin interface, add a link to the the translation popup.
  Unlike bug 24975 there is not a page where you can translate
  everything. I don't know if it is really useful (probably better to
  translate itemtypes when you are on the itemtype page). It can be
  added later if needed.

To give an example, this is what needs to be added manually in
Koha/Schema/Result/Itemtype.pm:

    __PACKAGE__->load_components('+Koha::DBIx::Class::Localization');
    __PACKAGE__->localization_add_relationships(
        'itemtype', # the PK column
        'description' # a list of translatable columns
    );

(see POD in Koha/Schema/Component/Localization.pm for more information)

Final notes:
* I wanted this patch to have as few changes as possible so I kept
  methods like `search_with_localization`, `children_with_localization`
  even if I believe they can be removed (replaced by search/children)
  Localizations do not need to be prefetched/joined unless you want to
  sort on them.
  For the same reason, $itemtype->unblessed now always return a
  `translated_description` key.
  This can be fixed in followup patches
* There is cache involved (see
  Koha::Schema::Component::Localization::localization).
  Localizations in cache are grouped by object type and language (keys
  look like 'KOHA:localization:Itemtype:en')
* By keeping a single table for all translations of all entities, we
  cannot have data integrity at the RDBMS level, but automatic deletion
  of translations is handled by the DBIC `cascade_delete` feature, so
  integrity should be fine as long as no raw SQL update/delete operation
  is involved.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 11:37:14 -06:00
Jan Kissig bcdd04c08b
Bug 42301: Fix error occuring on updatedatabase when using MySQL
This patch fixes an error when running updatedatabase on an instance using MySQL by defining a key length for an unique key. The unique key in table record_sources was introduced on 35380 but was lacking a key length which works in mariaDB but fails on MySQL.

Test plan:
a) run ktd with mysql f.e.: DB_IMAGE=mysql:8.0 ktd --proxy --name mysql8 up -d
b) enter ktd shell ktd --name mysql8 --shell
c) checkout a Koha version prior to 35380. f.e. "git checkout 67adbce6562fa352b143977747fa290f23c63fde"
d) run 'reset_all'
e) log in and check Koha version in http://mysql8-intra.localhost/cgi-bin/koha/about.pl which should show
25.12.00.036
f) git checkout main
g) restart_all
h) updatedatabase will throw the following error:
Upgrade to 25.12.00.037  [08:29:14]: Bug 35380 - Add new unique name to record sources, add default record sources, add is_system column to default record sources.
        ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: BLOB/TEXT column 'name' used in key specification without a key length at /kohadevbox/koha/C4/Installer.pm line 817
i) apply patch
j) 'updatedatabase' should run without errors now

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 09:14:46 -06:00
Jan Kissig d56976e9a6
Bug 42318: Populate record_sources with system defined values on install
This patch adds predefined values to the record_sources table on installation of a new Koha instance. The values are
- batchmod
- intranet
- batchimport
- z3950
- bulkmarcimport
- import_lexile
and were formerly hardcoded in marc-overlay-rules.tt. This was introduced in 35380 which took care of updated instances via a db_revs script but forgot installation scripts.

Testplan
a) start up a fresh ktd
b) login and check go to Administration -> Record sources
c) check that no source exists
d) apply patch
e) go to mysql shell 'koha-mysql kohadev'
f) empty the database to trigger Kohas installer: 'drop database koha_kohadev;' followed by a 'create database koha_kohadev;'
g) restart_all
h) open Koha in browser again, the web installer should appear now. Credentials are 'koha_kohadev' with pasword 'password'.
i) run through the installation and create an admin user,
j) login with that user and repeat b) and c)
k) check that record sources are now set with the values from the descriptioni above.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 09:14:45 -06:00
Lucas Gass 5e44515ec3
Bug 35380: (follow-up) Fix DBRev 251200037.pl
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 09:14:39 -06:00
Lucas Gass 397c17e14c
Bug 42273: DBReb 25.12.00.042
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-09 13:27:53 -06:00
Tomás Cohen Arazi 894e144303
Bug 42273: Fix 'idenfity' typo in categories table
The categorycode column comment in the categories table had a typo:
'idenfity' instead of 'identify'. This fixes it in kohastructure.sql
and adds an atomic update to correct existing installations.

Test plan:
1. Apply this patch
2. Run:
   $ updatedatabase
=> SUCCESS: The atomic update is applied
3. Verify:
   echo "SHOW FULL COLUMNS FROM categories WHERE Field='categorycode';" | koha-mysql kohadev
=> SUCCESS: The comment reads 'unique primary key used to identify the patron category'
4. Sign off :-D

Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-09 08:27:35 -06:00
Lucas Gass ce0d0ec93a
Bug 42053: DBRev 25.12.00.041
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-09 08:27:35 -06:00
Kyle M Hall 38e2b4b991
Bug 42053: Add sip2 to userflags if it doesn't exist
Bug 37893 only creates the sip2 userflag if the instance has a
SIPConfig.xml set up. This userflag needs to be created reguardless
or the instance will not be able to use SIP in the future!

Test Plan:
1) Ensure you have no SIPConfig.xml
2) Run the bug 37893 update
3) Note the missing userflag
4) Apply this patch
5) Run updatedatabase.pl again
6) Note the userflag exists!

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-09 08:27:34 -06:00
Martin Renvoize 560dd35740
Bug 40841: DBRev 25.12.00.040
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 14:21:28 +01:00
Tomás Cohen Arazi 3169620db5
Bug 40841: DB changes
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 14:21:27 +01:00
Martin Renvoize da840f6c3f
Bug 40504: DBRev 25.12.00.039
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 14:21:26 +01:00
Jonathan Druart c3b6df654e
Bug 40504: Fix DB structure comparison
Fix misc4dev/run_tests.pl --run-db-compare-only

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 14:21:24 +01:00
Pedro Amorim 2a9e51c9b2
Bug 40504: atomicupdate
Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 14:21:23 +01:00
Pedro Amorim ade2934e2a
Bug 40504: Add 'managedby' to illrequests
This also includes a 'manager' accessor which returns the Koha::Patron
object

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 14:21:22 +01:00
Martin Renvoize 3b75ede4fd
Bug 28884: DBRev 25.12.00.038
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 14:21:16 +01:00
Janusz Kaczmarek 388bcec0ac
Bug 28884: Add 'ElasticsearchEscapeCharacters' and 'OpacElasticsearchEscapeCharacters' system preferences
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 14:21:15 +01:00
Martin Renvoize 67158768e5
Bug 35380: DBRev 25.12.00.037
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 11:11:53 +01:00
Martin Renvoize 6aff5f361a
Bug 35380: (QA follow-up) Minor code quality fixes
- Add order_by => ['name'] to record_sources fetch in marc-overlay-rules.pl
  so filter dropdown options are consistently sorted
- Add COMMENT to record_sources.is_system column in kohastructure.sql
  to match convention of other columns in that table
- Remove commented-out Data::Dumper debug lines from biblios.t
- Remove redundant explicit object deletes inside subtests that are
  already wrapped in txn_rollback; the rollback undoes them anyway

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 09:50:53 +01:00
Martin Renvoize 38c7696866
Bug 35380: (QA follow-up) Fix data migration for pre-existing record sources
INSERT IGNORE silently skips rows whose name already exists, leaving
their is_system column at 0. Systems that already had 'intranet',
'z3950' etc. as record sources would not have them protected from
deletion. Added an explicit UPDATE after the INSERT to ensure all
known system record source names have is_system=1 regardless of
whether the row was just inserted or already existed.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 09:50:48 +01:00
Jan Kissig 9b7824d789
Bug 35380: (follow-up): Fix errors from qa script
Make atomicupdate script executable, add html filters to tt, annotate is_system as boolean (SQL12 coding guidelines)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 09:50:09 +01:00
Jan Kissig 86443b8437
Bug 35380: Change record sources to by systemdefined
This changes the structure of record source with an is_system column which controls whether this value can be deleted.
Also predefined values are inserted to reflect the default hard coded values from 'Record overlay rules' sources

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 09:46:15 +01:00
Jonathan Druart 89aa40cc1e
Bug 41460: Fix ALTER TABLE statement
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2026-03-24 17:07:35 +01:00
Martin Renvoize 852a8b802f
Bug 40853: (RM follow-up) Fix re-base error 2026-03-24 16:10:01 +01:00
Martin Renvoize caae75e805
Bug 40853: DBRev 25.12.00.036
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-24 15:39:09 +01:00
Nick Clemens 02fa01e146
Bug 40853: Add ElasticsearchBoostFieldMatchAmount system preference
This adds a new system preference to control the amount of boost. The default of 0 will act as before this patch.
You can add any positive number, or a number between 0 and 1 for negative boost

To test:
1 - Add a record with
    245 $a novel
2 - Add a record with
    245 $a A novel : $b about things / $c by me
3 - Search for: novel
4 - Search for: a novel
5 - Apply patch, restart all
6 - Repeat searches, note exact titles are boosted
7 - Test with more titles as you are able

Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-24 15:38:09 +01:00
Martin Renvoize ea5936b15a
Bug 42083: DBRev 25.12.00.035
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-24 15:38:08 +01:00
Martin Renvoize 8eec766b5a
Bug 42083: (QA follow-up) Simplify atomicupdate migration loop
Replace the O(n²) accumulate-and-re-insert pattern with a simple
per-row execute inside the while loop.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-24 15:35:35 +01:00
Andrew Fuerste Henry 6b51873f9c
Bug 42083: atomicupdate for permissions
Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-24 15:35:35 +01:00
Andrew Fuerste Henry 153a18d603
Bug 42083: Create distinct permissions
Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-24 15:35:34 +01:00
Martin Renvoize 97d980a7ba
Bug 41460: DBRev 25.12.00.034
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-24 15:35:34 +01:00
Michael Hafen 7cebccb76f
Bug 41460: Remove default value from mediumtext column systempreferences.value
Mysql doesn't allow text type columns to have a default.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-24 15:26:10 +01:00
Martin Renvoize f26e9344b0
Bug 41479: DBRev 25.12.00.033
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-24 09:55:52 +01:00
Owen Leonard 41ea86bc27
Bug 41479: Remove Baker & Taylor integration
This patch removes Baker & Taylor integration following the shutdown of
the company.

To test, apply the patch, run the database update, and restart all.

- In the staff interface go to Administration -> System preferences and
  search for 'Baker.' There should be no results.
- If necessary enable at least one cover image service, e.g.
  AmazonCoverImages, OpacCoce, GoogleJackets, etc.
- Log in to the OPAC and confirm that cover images display correctly on
  these pages:
   - Search results
   - Bibliographic detail page
   - Shelf browser
   - Your summary -> Checked out
     - Checkout history
   - Recent comments
   - Lists

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-24 07:50:10 +01:00
Martin Renvoize 7929a1198e
Bug 41814: DBRev 25.12.00.032
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-23 09:33:54 +01:00
Katrin Fischer 8948d7117a
Bug 41814: (QA follow-up) Add bug number to atomic update and some style fixes
Sponsored-by: Cheshire West and Chester Council
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-23 09:16:59 +01:00
Jake Deery c1f0d97e8b
Bug 41814: Add PatronAgeRestriction syspref and code
This patch adds a new PatronAgeRestriction, which acts in the same way
PatronSelfRegistrationAgeRestriction (a restriction on the maximum age
of a borrower), except for the intranet. It will also act as the
maximum age restrictor on the OPAC, in the event that the
PatronSelfRegistrationAgeRestriction is not set.

To test:
== APPLY PATCH ==
a)  updatedatabase
b)  Set the PatronAgeRestriction syspref to 20, set the
    PatronSelfRegistrationAgeRestriction to 30
c)  On the OPAC, try to create or modify a patron whose age is 35 years
    *)  Note the error message presented, suggesting the age exceeds the
    maximum
d)  On the OPAC, try to create or modify a patron whose age is 25 years
    *)  Note the submission succeeds
e)  On the staff client, try to create or modify a patron whose age is
    25 years *)  Note the error message presented, suggesting the age
    exceeds the maximum
f)  Set the PatronSelfRegistrationAgeRestriction to empty
g)  On the OPAC, try to create or modify a patron whose age is 25 years
    *)  Note the error message presented, suggesting the age exceeds
    the maximum
h)  On the OPAC, try to create or modify a patron whose age is 19 years
    *)  Note the submission succeeds
i)  Set the PatronAgeRestriction to empty
j)  On the staff client, try to create or modify a patron whose age is
    75 years
    *)  Note the submission succeeds
k)  On the OPAC, try to create or modify a patron whose age is 75 years
    *)  Note the submission succeeds
== SIGN OFF ==

Sponsored-by: Cheshire West and Chester Council
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-23 09:16:52 +01:00
Martin Renvoize ad1caed65c
Bug 23415: DBRev 25.12.00.031
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-22 23:59:25 +01:00
Martin Renvoize a359ed47b1
Bug 23415: (follow-up) Fix typo 'oweing' -> 'owing' in templates and notices
This patch corrects a typo in the auto renewal error code and related
notice templates:
- Adds database update to fix existing notice templates in letter table
- Fixes sample notices for new installations
- Fixes renew_strings.inc template include

The error code changes from 'auto_too_much_oweing' to 'auto_too_much_owing'
throughout.
2026-03-22 23:52:15 +01:00
Martin Renvoize 1eb1cfdbef
Bug 23415: (follow-up) Rename sysprefs and add self-checkout control
This follow-up patch addresses feedback from the QA process:

1. System preference naming consistency
   Renamed the following preferences to remove "OPAC" prefix and align
   with the FineNoRenewals naming convention:
   - OPACFineNoRenewalsIncludeCredits → FineNoRenewalsIncludeCredits
   - OPACFineNoRenewalsBlockAutoRenew → FineNoRenewalsBlockAutoRenew

2. Self-checkout backward compatibility
   Added new system preference FineNoRenewalsBlockSelfCheckRenew to
   control whether fine limits block renewals via web-based self-checkout.

   Previously, OPACFineNoRenewals did not block self-checkout renewals.
   With the rename to FineNoRenewals, this behavior changed. The new
   preference defaults to "0" (don't block) to maintain backward
   compatibility, allowing sites to opt-in to blocking self-checkout
   renewals when patrons exceed the fine threshold.

Test plan:
1. Run prove t/db_dependent/Circulation.t - all tests should pass
2. Run prove t/db_dependent/api/v1/checkouts.t - all tests should pass
3. Verify system preferences are correctly renamed in the admin interface
4. Test self-checkout renewals with FineNoRenewalsBlockSelfCheckRenew
   set to 0 (default) - renewals should work even when fines exceed limit
5. Test self-checkout renewals with FineNoRenewalsBlockSelfCheckRenew
   set to 1 - renewals should be blocked when fines exceed limit

Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-22 23:52:06 +01:00
Emmi Takkinen f2b7a744b8
Bug 23415: Add new syspref AllowFineOverrideRenewing
This patch adds new syspref AllowFineOverrideRenewing. It allows
staff to renew items for patrons whose fines are over limit set
in syspref FineNoRenewals. Otherwise renewing is prevented. If
renewing items is allowed staff is still required to confirm
if they really want to renew items for the patron.

To test:
1. Apply this patch, update database and restart all services.
2. Find patron with fines over limit set in FineNoRenewals and
renewable items.
=> Note that renewing is prevented with message "Cannot renew,
the patron has a debt of..."
3. Set syspref AllowFineOverrideRenewing as "Allow".
=> Note that items can now be renewed and renewing them displays
confirmation pop-up.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-of-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-22 23:15:42 +01:00
Emmi Takkinen 00350eacb4
Bug 23415: Rename OPACFineNoRenewals
OPACFineNoRenewals no longer applies just to OPAC.
To avoid confusion rename it as FineNoRenewals and
also rename all occurences in code.

To test, confirm everything works as described in
previous test plans.

Also prove t/db_dependent/Circulation.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Shi Yao Wang <shi-yao.wang@inlibro.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2026-03-22 23:08:28 +01:00
Martin Renvoize b38c0fb9eb
Bug 41788: DBRev 25.12.00.030
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-21 17:35:24 +00:00
Lucas Gass 00c9b4a86c
Bug 41788: Add system preference UseHoldsQueueFilterOptions
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-21 17:28:01 +00:00
David Cook 0442f4ce2c
Bug 41045: Fix BZ 33363 database update
This patch fixes the BZ 33363 database update, so that it
selects uses with the "suggestions" permission rather than the "catalogue"
permission.

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-21 17:25:39 +00:00
Martin Renvoize 090cdaf533
Bug 41834: (RM follow-up) Undo RM mistake on db update
Error between keyboard and screen.. I managed to completely replace a
db_rev with an incorrect atomicupdate move!
2026-03-20 15:25:58 +00:00
Martin Renvoize 9818b3bf8d
Bug 41834: DBRev 25.12.00.029
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-20 11:22:03 +00:00
David Cook e403698cd2
Bug 41834: (follow-up) nullify marcflavour in atomicupdate
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-20 07:57:23 +00:00
Jonathan Druart 92b8e9ea3c
Bug 41834: Fix order of underscore
In the previous tests we had:
  $b =~ s/_/ZZZ/g;    # mysql sorts underscore last, if you modify this qa-test-tools will need adjustments

But this is wrong, try:
  select variable from systempreferences;
and confirm that hide_marc is before hidelostitems and that
intranet_includes is before IntranetAddMastheadLibraryPulldown

We will deal with qa-test-tools once this is pushed.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-20 07:57:20 +00:00
Jonathan Druart e249392147
Bug 41834: Remove columns from sysprefs.sql
In vim `:%s/^\(('[^']*', \?'[^']*'\).*/\1),/`

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-20 07:57:17 +00:00
Jonathan Druart 10e1708456
Bug 41834: Set systempreferences's options, explanation and type to NULL
We currently have to set options, explanation and type in sysprefs.sql and the atomic/dbrev files.
However we (almost) never use them, we rely on the values in the yml files.

We could remove them and don't require them when when add new sysprefs.

It will avoid the mess we currently have (mismatch between new and updated installations, see bug 41682 and bug 41800).

Instead of fixing the discrepancies (again, see bug 41800) we should
NULL the 3 columns in sysprefs.sql and so at the DB level to rely only
on the yaml files.

This patch does several things:
1. Remove the 3 columns from sysprefs.sql to use the default NULL
2. Atomic update:
 * Set to NULL for existing installations as well
 * Rename UseICUStyleQUotes => UseICUStyleQuotes
 * Delete OpacMoreSearches and OPACMySummaryNote, old prefs that have been moved
 to additional contents
3. Fix some errors in yaml files (mostly empty entries)
4. Move parsing of yaml files to a dedicated Koha::Devel::Syspref module
5. Retrieve all yaml content using new methods added to Koha::Config::SysPrefs
(that will be reused in follow-up bugs)

Test plan:
1. Run updatedatabase and confirm that now all systempreferences rows in DB
have options, explanation and type set to NULL (except local-use prefs)
2. `prove t/db_dependent/check_sysprefs.t` should return green
3. Confirm that the UI is still working correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-20 07:57:11 +00:00
Nick Clemens d69d218d68
Bug 42068: Bug 26993 (follow-up) Don't use FOREIGN_KEY_CHECKS
To test:
1 - Checkout 25.11.x - reset_all
2 - Enable StoreLastBorrower
3 - Issue an item
4 - Ensure item has a row in items_last_borrower
    SELECT * FROM items_last_borrower
5 - Checkout main
6 - updatedatabase
7 - Try to delete any item, doesn't have to be the one you issued
    DELETE FROM items WHERE itemnumber=93;
8 - ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`koha_kohadev`.`items_last_borrower`, CONSTRAINT `items_last_borrower_ibfk_1` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE)

9 - repeat 1-5
10 - APPLY PATCH
11 - updatedatabase
12 - Try to delete any item
13 - Success!
14 - Delete the item you issued previously (in the staff interface on via mysql)
15 - Confirm no rows in items_last_borrower

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-12 15:02:42 -06:00
Jonathan Druart e7855c0c01
Bug 41409: Add COMMENT to kohastructure
To fix misc4dev/run_tests.pl --run-db-compare-only

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 12:56:26 -07:00
Lucas Gass c88a86d0af
Bug 23260: DBRev 25.12.00.028
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:33:51 -07:00
Lucas Gass 2d75cac7d1
Bug 23260: Fix database update
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:33:49 -07:00
Lucas Gass a37d887df6
Bug 23260: Fix kohastructure.sql
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:33:48 -07:00
Lucas Gass 9165c0fa4b
Bug 23260: Fix DB update to NOT allow for NULL borrowernumber
Signed-off-by: Peter Moore <peter@mrcpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:33:47 -07:00
Nick Clemens ab5efb97a4
Bug 23260: Database updates and new system preferences AnonymizeLastBorrower / AnonymizeLastBorrowerDays
This patch alters the items_last_borrowers table to allow for NULL borrowers

It also adds two new system preferences to allow controlling the anonymization of items_last_borrower data

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Peter Moore <peter@mrcpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:33:44 -07:00
Lucas Gass d7aae3632e
Bug 39698: DBRev 25.12.00.027
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:33:43 -07:00
Jake Deery 5b59301de2
Bug 39698: Add option to expand responsive datatable
This patch adds the 'OPACTableColExpandedByDefault' system preference,
disabled by default, which controls whether responsive datatable rows
are expanded or not. This work has been performed after recommendations
from a recent accessibility audit.

TO TEST:
a)  set 'OpacLocationBranchToDisplay' to both
b)  search the OPAC for history, select first result
c)  zoom your browser in to maxiumum, scroll down to holdings table
    -   notice how the rows are collapsed by default, with '+' visible
**apply patch**
e)  refresh details page, notice how the behaviour is currently unchanged
f)  change new 'OPACTableColExpandedByDefault' syspref to 'Expand'
g)  return to OPAC details page, refresh, zoom in
    -  notice how the rows are now expanded by default, with '-' visible
**sign off**

Sponsored-by: British Museum
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:33:42 -07:00
Lucas Gass 9fa84c7fd4
Bug 36506: DBRev 25.12.00.026
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-27 11:38:48 -07:00
Nick Clemens 5ea97b7dd5
Bug 36506: Database update
Sponsored-by: The Main Library Alliance <https://www.mainlib.org/>
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-27 11:38:44 -07:00
Lucas Gass 36997e5493
Bug 41131: DBRev 25.12.00.025
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-26 09:04:19 -07:00
Nick Clemens 4c82ff273b
Bug 41131: Don't allow limiting transfers from/to a single branch
We say that you cannot limit transfers internally within a branch, but
it seems we do allow you to, and don't show you when we do

To test:
1 - Go to Admin->Library transfer limits
2 - On a branches page, uncheck the box for that branch
    e.g. don't allow FIC to transfer to CPL from CPL
3 - Save
4 - Note the box is still checked
5 - Check the DB
    SELECT * FROM branch_transfer_limits;
6 - There is a line to/from CPL!
7 - Apply patches
8 - updatedatabase
9 - Repeat 5 - the line is deleted!
10 - Try to create the rule again, not the box is now disabled
11 - Be sneaky, enable the box, uncheck it and save, no rule created
12 - Be sneaky, edit the HMTL for another button to make it limiting CPL to CPL, save, no rule created
13 - Sign off

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-26 09:04:19 -07:00
Nick Clemens 7cdb17cc2f
Bug 38384: (follow-up) move require Koha::Plugins to use
remaning ocurrences in test files seem okay, this covers the others

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-25 07:37:00 -07:00
Lucas Gass 6adf1c1cc1
Bug 28530: (follow-up) Place system pref in corret order
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 15:48:35 -07:00
Lucas Gass d427bd25c9
Bug 28530: DBRev 25.12.00.024
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:44 -07:00
Lucas Gass f2721c8be3
Bug 28530: (RM follow-up) Move kohastructure update to right place alphabetically
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:43 -07:00
Martin Renvoize 30fd316872
Bug 28530: (QA follow-up) Add POD documentation and database index
- Add comprehensive POD documentation for lowest_ratio_library() method
  including parameter descriptions, return values, and algorithm explanation
- Add database index on itemtype column in library_float_limits table
  to improve query performance when searching by itemtype

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:42 -07:00
Kyle M Hall cababbbd87
Bug 28530: Update database, add new schema file
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Kris Becker <kbecker@jcls.org>
Signed-off-by: Kris Becker <kbecker@jcls.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:33 -07:00
Martin Renvoize 4b0fcd7e75
Bug 3492: (follow-up) Add missing TitleHoldFeeStrategy to sysprefs.sql
The TitleHoldFeeStrategy system preference was added in the database
update script (251200023.pl) but was missing from sysprefs.sql,
causing issues for fresh installations that don't run the update
script.

This preference likely disappeared during rebases. Adding it in the
correct alphabetical position between 'timeout' and
'todaysIssuesDefaultSortOrder'.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 08:51:09 -07:00
Lucas Gass 35154d19e1
Bug 3492: DBRev 25.12.00.023
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-09 12:57:57 -07:00
Martin Renvoize 1c893cc019
Bug 3492: (follow-up) Remove last reservefee references
Sponsored-by: OpenFifth <https://openfifth.co.uk>
Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-09 12:57:57 -07:00
Martin Renvoize f1b20b645c
Bug 3492: Modernize hold fee system and migrate to circulation rules
This commit completely modernizes the hold fee system by migrating from
the deprecated categories.reservefee column to the circulation rules framework
and implementing modern Koha::Objects patterns.

WHAT CHANGED:

1. MIGRATION TO CIRCULATION RULES:
   - Moved hold fees from categories.reservefee to circulation_rules table
   - Added database migration script with atomic update
   - Maintains existing fee amounts during migration
   - Provides rule hierarchy: category+itemtype+branch specific rules

2. NEW SYSTEM PREFERENCE: TitleHoldFeeStrategy
   - Options: highest, lowest, most_common
   - Addresses inconsistent title-level hold fees when items have different fees
   - Default: 'highest' (safest approach for library revenue)

3. MODERN Koha::Objects API:
   - Koha::Item->holds_fee($patron): Calculate fee for specific item
   - Koha::Hold->calculate_hold_fee(): Enhanced item/title-level logic
   - Koha::Hold->should_charge($stage): Centralized charging logic
   - Koha::Hold->charge_hold_fee(): Modern fee charging with proper accounting
   - Removed C4::Reserves::GetReserveFee and ChargeReserveFee

4. ENHANCED FUNCTIONALITY:
   - Proper ReservesControlBranch logic (patron home vs item home library)
   - Complete HoldFeeMode implementation (placement/collection/not_always)
   - Clear OPAC messaging with "You will be charged..." commitment
   - Comprehensive test coverage for all fee scenarios

5. TECHNICAL IMPROVEMENTS:
   - Object-oriented design following Koha patterns
   - Proper error handling and edge case management
   - Modern test structure with comprehensive coverage
   - Clean separation between fee calculation and charging

TEST PLAN:

A) MIGRATION AND SETUP:
   1. Apply all patches and run database update
   2. Verify existing hold fees migrated to circulation rules:
      - Administration > Circulation and fine rules
      - Previous categories.reservefee values now in "Hold fee" column
   3. Confirm old categories.reservefee column no longer used

B) BASIC FEE CALCULATION:
   1. Set up patron categories with different hold fees in circulation rules
   2. Create items with different item types, each with different hold fees
   3. Test item-level holds charge correct fees based on specific item
   4. Test title-level holds use TitleHoldFeeStrategy preference

C) TITLE-LEVEL HOLD STRATEGIES:
   1. Set TitleHoldFeeStrategy to "highest":
      - Create title with items having fees $1.00, $2.00, $3.00
      - Verify title-level holds charge $3.00
   2. Set TitleHoldFeeStrategy to "lowest":
      - Verify same title charges $1.00
   3. Set TitleHoldFeeStrategy to "most_common":
      - Add multiple items with $2.00 fee
      - Verify title-level holds charge $2.00 (most common)

D) HOLDFEEMODE PREFERENCES:
   1. Set HoldFeeMode to "any_time_is_placed":
      - Place holds and verify immediate fee charging
      - Check patron account for correct hold fee debits
   2. Set HoldFeeMode to "any_time_is_collected":
      - Place holds, verify no immediate charges
      - Check out items to patron, verify fee charged on collection
   3. Set HoldFeeMode to "not_always":
      - With available items: verify no fee charged
      - With all items checked out but no other holds: verify no fee
      - With all items checked out and other holds exist: verify fee charged

E) RULE HIERARCHY TESTING:
   1. Set different fees for different category/itemtype/branch combinations
   2. Verify most specific rule applies:
      - Branch + Category + ItemType (most specific)
      - Category + ItemType
      - Category only (most general)
   3. Test with different patron categories and item types

F) USER INTERFACE TESTING:
   1. OPAC interface:
      - Verify "You will be charged..." messages display correct amounts
      - Test both item-level and title-level hold fee messages
      - Confirm fees match actual charges in patron account
   2. Staff interface:
      - Place holds for patrons and verify fee calculations
      - Check Administration > Circulation rules interface works correctly

G) EDGE CASES AND ERROR HANDLING:
   1. Test $0.00 fees (no charge scenarios)
   2. Test patrons with no applicable fee rules (should default to $0.00)
   3. Test items with no holdable copies (should return $0.00)
   4. Test invalid/missing itemtypes or categories
   5. Test holds on biblios with no items

H) REGRESSION TESTING:
   1. Verify existing hold placement workflows unchanged
   2. Check patron account charging remains accurate
   3. Confirm OPAC and staff interfaces display correctly
   4. Test that existing holds continue to work properly

I) UNIT TESTS:
   Run the following test suites to verify functionality:
   - prove t/db_dependent/Koha/Hold.t
   - prove t/db_dependent/Koha/Item.t
   - prove t/db_dependent/Reserves.t
   - prove t/db_dependent/Circulation.t

BACKWARDS COMPATIBILITY:
- All existing functionality preserved
- Hold fee amounts maintained during migration
- Existing workflows continue unchanged
- Legacy code updated to use new API seamlessly

Sponsored-by: OpenFifth <https://openfifth.co.uk>
Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-09 12:57:56 -07:00
Martin Renvoize f5bc5be08d
Bug 3492: Database migration for hold fees to circulation rules
This commit adds the database migration to move hold fee configuration
from patron categories to circulation rules, providing more granular
control over hold fees based on patron category, item type, and branch.

The migration:
- Creates circulation rules for existing categories.reservefee values
- Removes the deprecated reservefee column from categories table

Sponsored-by: OpenFifth <https://openfifth.co.uk>
Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-09 12:57:48 -07:00
Lucas Gass 977a8be9eb
Bug 41624: DBRev 25.12.00.022
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-09 08:40:22 -07:00
Jonathan Druart 58baeec11f
Bug 41624: Simplify db rev
Also fix QA failures:
[FAIL] installer/data/mysql/atomicupdate/bug_41624.pl
   FAIL   file_permissions
                File must have the exec flag
   FAIL   forbidden_patterns
                forbidden pattern: trailing space char (line 13)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-09 08:40:22 -07:00
Lucas Gass 05d08e0ea4
Bug 41624: Revert bug 35211
Bug 41624: Revert "Bug 35211: (QA follow-up) Fix counting"

This reverts commit 97a022054d.

Bug 41624: Revert "Bug 35211: (QA follow-up) fix display of other results tab and move template toolkit logic outside of script array"

This reverts commit c4c2a4b235.

Bug 41624: Revert "Bug 35211: Removed local items from group tabs and removed group items from other holdings tab"

This reverts commit 124c6c8670.

Bug 41624: Revert "Bug 35211: Fixed group tab item building logic"

This reverts commit 23eb2dbd39.

Bug 41624: Revert "Bug 35211: Fix tab building"

This reverts commit f438535b5c.

Bug 41624: Revert "Bug 35211: Set SeparateHoldingsByGroup to separate based on SeparateHoldingsBranch syspref"

This reverts commit d2a0527d86.

Bug 41624: Revert "Bug 35211: Fixed count on logged in holdings"

This reverts commit 96c7eb3459.

Bug 41624: Revert "Bug 35211: Reordered tabs in Holdings Table and fixed group tabnames"

This reverts commit 5c2b0fd496.

Bug 41624: Revert "Bug 35211: Separate group holdings into individual tabs"

This reverts commit 08045c8009.

Bug 41624: DB update to remove the pref

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-09 08:40:21 -07:00
Lucas Gass b626e4f3bf
Bug 41701: DBRev 25.12.00.021
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:41 -07:00
Owen Leonard eb69c7a735
Bug 41701: Fix definition of OAI-PMH:DeletedRecord preference in sysprefs.sql
This patch updates the definition of the OAI-PMH:DeletedRecord
preference in sysprefs.sql, correcting the switched options and
explanation columns.

To test, apply the patch and run updatedatabase. Check that the database
has been updated correctly:

SELECT `options`, `explanation` FROM `systempreferences` WHERE
`variable` = 'OAI-PMH:DeletedRecord';

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:40 -07:00
Lucas Gass 6d005fbc0c
Bug 39802: DBRev 25.12.00.020
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:39 -07:00
Nick Clemens 1249cea96d
Bug 39802: Add LostChargesControl system preference
Sponsored-by: MAIN Library Alliance
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:38 -07:00
Nick Clemens 6cf5b8d509
Bug 39802: Atomic update file
Sponsored-by: MAIN Library Alliance
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:38 -07:00
Lucas Gass 61107cbfd4
Bug 36466: DBRev 25.12.00.019
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:34 -07:00
Hammat Wele 085c27e41b
Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table
WNC amended patch - tidied

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:33 -07:00
Jonathan Druart 849f67988f
Bug 41076: Adjust our perl tidiness for v20250105
Generated using
  `perl misc/devel/tidy.pl --perl`

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-05 09:03:51 -07:00
Lucas Gass 26c8ed7d8f
Bug 30331: DBRev 25.12.00.018
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:23 -07:00
Lucas Gass 15d83804b3
Bug 30331: Rename RenewalPeriodBase as ManualRenewalPeriodBase and add AutomaticRenewalPeriodBase sys pref
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:20 -07:00
Lucas Gass a4208f711b
Bug 40364: DBRev 25.12.00.017
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:18 -07:00
Andrew Fuerste Henry 433b5e0f3f
Bug 40364: Correct wording in user permissions
Changes the descriptions of the holds history and checkout history permissions to say "view" rather than "viewing"

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:17 -07:00
Andrew Fuerste Henry 872fdd01f4
Bug 40364: Correct system preference check in atomicupdate
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:16 -07:00
Andrew Fuerste Henry 6e1065e840
Bug 40364: Implement holds history permission
To test:
1 - enable IntranetReadingHistoryHolds system preference
2 - make some holds for a patron, confirm you can see Holds History in the patron record when logged in as a superlibrarian
3 - log in as a non-superlibrarian with edit_borrowers permission, confirm you can see holds history in pthe patron record
4 - apply patch, updatedatabase, restat_all
5 - confirm you can see holds history as a superlibrarian
6 - confirm your non-superlibrarian from step 3 was given view_holds_history permission and can view holds history
7 - remove view_holds_history permission from your user, confirm you can no longer access holds history

Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:15 -07:00
Andrew Fuerste Henry 360fe6ba9a
Bug 40364: Atomicupdate to add permission
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:15 -07:00
Lucas Gass 650f4ad73d
Bug 32682: DBRev 25.12.00.016
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:14 -07:00
Lucas Gass 48c9bdc86a
Bug 32682: Fix how sys pref is retrived in DB update
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:14 -07:00
David Flater 7caf73d3c5
Bug 32682: Add permission for viewing patron reading history
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:12 -07:00
Lucas Gass af6e9f7063
Bug 28308: DBRev 25.12.00.015
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:04 -07:00
Jonathan Druart 0a42444fee
Bug 28308: DBrev
To remove the unnecessary entries from the DB

Signed-off-by: Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:03 -07:00
Jonathan Druart 1b3fe83d6a
Bug 41682: More fixes
* free => Free
* options=NULL where type=Free
* fix options and type for ArticleRequestsSupportedFormats
* fix more explanation and options

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-27 13:56:19 -07:00
Jonathan Druart de3a33a563
Bug 38207: Add VENDOR_PAYMENT_METHOD for new installs
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-26 14:36:43 -07:00
Lucas Gass 84227f70db
Bug 41682: DBRev 25.12.00.014
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-23 11:07:54 -07:00
Tomás Cohen Arazi c435b04a93
Bug 41682: Fix 'cancelation' typo
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-23 11:07:53 -07:00
Tomás Cohen Arazi 0ba2c8350c
Bug 41682: Fix 'integer' vs. 'Integer' inconsistency
There are 72 occurences for the 'Integer' type, and 8 for 'integer'.
Tests fail because of `StoreLastBorrower` already, so fixing them all for good.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-23 11:07:53 -07:00
Tomás Cohen Arazi 8552f04486
Bug 41682: Add ApiKeyLog description
This particular case already introduced discrepancies. Fixing.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-23 11:07:52 -07:00
Jonathan Druart 409c804bc1
Bug 41682: Sync DB and sysprefs.sql for new and upgraded installs
This patch removes the discrepancies and put in sync the
systempreferences table for new and upgraded installations.

Main changes:
* Set options to NULL when options=""
* Fix explanation when different
* Fix wrong order (some rows had options=explanation)
* Fix wrong type "Yes/No" => "YesNo"
* Remove StaffLoginBranchBasedOnIP: both StaffLoginLibraryBasedOnIP and
  StaffLoginBranchBasedOnIP are in the DB for upgraded installs
* Remove the 'showsql' from the test. If we need it back then it must be
  a maintenance script.
* Improve the tests:
  * Compare sysprefs.sql and the DB content for options, explanation and type
  * Catch type not defined
  * Catch incorrect YesNo values (must be 0 or 1)

Later:
* Add a C4::Installer sub to add new syspref:
  add_pref(
      {
          variable    => $variable,
          value       => $value,
          options     => $options,
          explanation => $explanation,
          type        => $type
      }
  );
* Clean 'type' and make it an ENUM
* Make it easy to run the test for devs (should be in xt but we need it
  in t/db_dependent for packages - FIXME?)
* Run the tests on upgraded installs on CI

Test plan:
0. Apply the "tests" patch only
1. prove it
=> It fails loudly
2. Apply the DB change and run updatedatabase, prove the tests
=> they pass
3. Test upgraded installs:
  * checkout v24.05.00 (the version we use for Jenkins'
    Koha_Main_MariaDB_update job)
  * reset_all
  * checkout the branch with this patchset
  * updatabase
  * prove t/db_dependent/check_sysprefs.t
  => Should be green

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-23 11:07:52 -07:00
Lucas Gass 629838dea2
Bug 26993: (follow-up) Update kohastructure.sql
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 14:16:05 -07:00
Lucas Gass 833f370fd5
Bug 26993: DBRev 25.12.00.013
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 14:16:05 -07:00
Jonathan Druart aee88e8672
Bug 26993: Use FOREIGN_KEY_CHECKS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 14:16:02 -07:00
Lucas Gass ca47f953dd
Bug 26993: System preference updates
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 14:16:00 -07:00
Lucas Gass 0fc32b7de8
Bug 26993: Database updates
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 14:15:59 -07:00
Arthur Suzuki 110f7d8030
Bug 41060: Add a cataloguing plugin to check ISSN
Test plan:
- without patch login to Koha
- edit a biblio and put a wrong ISSN in 022a (011a for unimarc).
- leave the input field (looses focus), no warning
- apply patch and do "reset_all" to make a full re-install.
- edit the biblio again and put an invalid ISSN in 022a (011a for unimarc).
- when you leave the input field you should have a warning saying
  "invalid ISSN".
- the input field should turn yellow
- you can still save the biblio with a wrong issn, it is just a warning.
- if you apply the patch on an existing install, you must manually link
  the value builder to your existing frameworks to get it working.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:31 -07:00
Lucas Gass 38c15330f4
Bug 39418: DBRev 25.12.00.012
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:28 -07:00
phette23 26a17774e7
Bug 39418: RDA Carrier, Content, and Media Vocabularies database update
This contains a database update script so that existing Koha instances
also receive authorised values for the RDA vocabularies.

Sponsored-by: California College of the Arts
Signed-off-by: Miranda Nero <mnero@oslri.net>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:28 -07:00
phette23 2426dc4959
Bug 39418: RDA Carrier, Content, and Media Vocabularies
This adds authorized value lists for use in MARC21 tags 336 - Content Type,
337 - Media Type, and 338 - Carrier Type, subfields $a and $b.

Test plan:
1. Create a fresh Koha instance
2. Navigate to admin > authorized values
3. Note there are no RDA value categories
4. Apply the patch and recreate a new Koha
5. Repeat step 2
6. There are six RDA value categories: RDACARRIER, RDACARRIER_CODE,
RDACONTENT, RDACONTENT_CODE, RDAMEDIA, and RDAMEDIA_CODE

Sponsored-by: California College of the Arts
Signed-off-by: Miranda Nero <mnero@oslri.net>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:27 -07:00
Lucas Gass ffa5704c95
Bug 40435: DBRev 25.12.00.011
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:24 -07:00
Martin Renvoize cd47fb5ca7
Bug 40435: (follow-up) Change preference type to YesNo
Change FutureHoldsBlockRenewals from type 'Integer' to 'YesNo'
for consistency with other boolean preferences in Koha (e.g.,
AllowHoldDateInFuture, OPACAllowHoldDateInFuture).

While the preference functionally works as Integer due to the
.pref file defining the choices, YesNo is the established
convention for binary system preferences.

Test plan:
1. Apply this patch
2. Run the database update
3. Verify the preference appears correctly in system preferences
4. Verify the preference still functions properly with tests:
   prove t/db_dependent/Circulation.t :: "CanBookBeRenewed | future holds"

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:24 -07:00
Marcel de Rooy f3978e5b1c
Bug 40435: Database revision
Test plan:
[1] Run install or upgrade (updatedatabase.pl). Verify that pref was added to database.
* perl -MC4::Context -e'print C4::Context->preference('FutureHoldsBlockRenewals'),"\n"'
* You should see a zero printed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:21 -07:00
Lucas Gass 9f9fe699f3
Bug 38061: DBRev 25.12.00.010
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:20 -07:00
Victor Grousset/tuxayo 00988f4d94
Bug 38061: (QA follow-up): dbrev: print if column already exists
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:20 -07:00
Matt Blenkinsop f5ede57411
Bug 38061: Add a checkbox to determine whether collection table issues should be pre-selected
Test plan:
Apply the patches and update the database
1) Create a new subscription with items, there should be a checkbox at the bottom of the form to pre-select collection table issues - make sure this is checked
2) Receive some items against the subscription
3) Navigate to the collections table
4) The checkboxes should be pre-selected as per previous behaviour in Koha
5) Edit the subscription and uncheck the checkbox
6) Return to the collections table and the checkboxes should all be unchecked

Signed-off-by: Nathalie <nathalie.savarit@univ-amu.fr>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:19 -07:00
Lucas Gass e8d42b7abc
Bug 38207: DBRev 25.12.00.009
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 09:26:06 -07:00
Andrew Fuerste Henry dcf1a2b959
Bug 38207: Add exec flag to atomicupdate
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 09:26:05 -07:00
Matt Blenkinsop 2234969a83
Bug 38207: Add a new payment_method column to aqbooksellers
(cherry picked from commit 881f96172a8c1b35d3e74f7f0f6aa44629578021)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 09:26:04 -07:00
Lucas Gass 12b73f4719
Bug 20638: DBRev 25.12.00.008
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 09:26:03 -07:00
Tomás Cohen Arazi ad7f5c1d80
Bug 20638: Add ApiKeyLog system preference
This patch adds the ApiKeyLog system preference to control logging
of API key actions (creation, deletion, revocation, activation).

The preference follows the same pattern as BorrowersLog and other
logging preferences.

Test plan:
1. Apply patch and run database update
2. Go to Administration > System preferences > Logs
3. Verify ApiKeyLog preference appears with Yes/No options
4. Verify default value is 'Don't log' (0)

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 09:26:00 -07:00
Lucas Gass d3c22bb552
Bug 40391: DRRev 25.12.00.007
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:30 -07:00
Martin Renvoize 76c2523b12
Bug 40391: Add support for GIR:LSL (Library Sub-Location) in EDIFACT processing
This implements support for the new EDItEUR/BiC GIR:LSL (Library Sub-Location)
field to complement the existing GIR:LSQ (Library Sequence) functionality,
allowing flexible mapping of both fields to location and collection item fields.

Changes:
- Add LSL mapping to GIR field extraction in Koha::Edifact::Line
- Update gir_segments() in Koha::Edifact::Order to handle both LSL and LSQ preferences independently
- Add validation functions in Koha::EDI using Koha::AuthorisedValues for location/collection codes
- Add EdifactLSL system preference for independent LSL field mapping
- Update EdifactLSQ to include empty option for ignore functionality
- Add admin interface configuration for LSL preference

The implementation provides maximum flexibility:
- EdifactLSQ can be set to: location, ccode, or empty (ignore)
- EdifactLSL can be set to: location, ccode, or empty (ignore)
- Both fields can be mapped independently or to same target field
- Validation ensures codes exist in LOC/CCODE authorised values
- Maintains full backwards compatibility with existing LSQ-only setups

Test plan:
1. Apply both patches
2. Update database: installer/data/mysql/updatedatabase.pl
3. Verify new system preferences in Administration > System preferences > Acquisitions:
   - EdifactLSQ: "Map EDI sequence code (GIR+LSQ) to Koha Item field"
   - EdifactLSL: "Map EDI sub-location code (GIR+LSL) to Koha Item field"
4. Create test authorised values:
   - LOC category: Add values like FICTION, REFERENCE
   - CCODE category: Add values like ADULT, CHILD
5. Set preferences to test combinations:
   - EdifactLSQ=location, EdifactLSL=ccode
   - EdifactLSQ=ccode, EdifactLSL=location
   - EdifactLSQ=location, EdifactLSL="" (empty)
6. Process EDIFACT messages containing GIR+LSL and GIR+LSQ segments
7. Verify items created with correct location/ccode values per preferences
8. Test invalid codes generate appropriate error messages
9. Confirm existing LSQ-only configurations continue working unchanged
10. Run: prove t/Edifact.t t/db_dependent/Koha/EDI.t t/db_dependent/Koha/Edifact/Order.t

Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/>
Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/>
Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:29 -07:00
Lucas Gass dcaec7edaa
Bug 38876: DBRev 25.12.00.006
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:26:05 -07:00
Jessica Zairo e8dca2a842
Bug 38876: (follow-up) fix db rev
syntax was wrong for dbrev
To test apply patches
dbic
updatedatatbase
koha-mysql kohadev
select * from systempreferences where variable='UpdateNotForLoanStatusOnCheckout';
confirm the updated description

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:26:04 -07:00
Jessica Zairo eebb1595d7
Bug 38876: (QA follow-up) automicupdate
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:26:04 -07:00
Jessica Zairo fdcb5fd500
Bug 38876: Fixed typo in descrption of UpdateNotForLoanStatusOnCheckout
Test Plan
1. Before applying, navigate to administration->system preferences ->
   UpdateNotForLoanStatusOnCheckout
2. Observe the language in the description "When an item is checked out,
   if the not for loan value on the left matches the items not for loan
   value it will be updated to the right-hand value"
3. Apply the patch
4. Navigate to administration->system preferences ->
   UpdateNotForLoanStatusOnCheckout
5. Observe the language in the description has been updated to "When an
   item is checked out, if its not for loan value matches the value on
   the left, then the items not for loan value will be updated to the
   value on the right"
6. Do a reset all and confirm the language is correct

Signed-off-by: Andrew Auld <andrew.auld@openfifth.co.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:26:03 -07:00
Lucas Gass 8d69a341cf
Bug 41332: Fix file permissions for db_revs/251200004.pl
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-09 10:30:01 -07:00
Lucas Gass af1ec6b16a
Bug 35211: DBRev 25.12.00.005
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-09 08:18:57 -07:00
Eric Garcia 08045c8009
Bug 35211: Separate group holdings into individual tabs
Added SeparateHoldingsByGroup system preference
Adds new tabs to Holdings table if preference is enabled
Separates by library groups

Test Plan:
1. Apply patch, restart_all, updatedatabase
2. Koha Administration -> System preferences -> SeparateHoldingsByGroup
3. Change to "Separate holdings by library group in subsequent tabs..." and Save
4. Koha Administration -> Library Groups
5. Create multiple library groups and check the 'Use for staff search groups' box.
6. Add your logged in library to each group and other libraries to each group.
7. Do catalog searches where the location of the item is a library in a library group
8. Notice tabs in the Holdings table for each library group if it contains a library that has the item

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-09 08:18:52 -07:00
Lucas Gass 39ca6bab0c
Bug 41332: DBRev 25.12.00.004
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-09 08:18:52 -07:00
Andreas Roussos 231a70ee45
Bug 41332: Add Greek to KohaManualLanguage system preference
The Koha Manual has been translated into Greek:
https://koha-community.org/manual/latest/el/html/index.html

However, 'Greek' is missing from the list of languages
available in the 'KohaManualLanguage' System Preference.

This patch fixes that.

Test plan:

1) Without the patch, visit Administration > System preferences >
   Enhanced content, and under the 'Manual' section notice that
   'Greek' is missing from the options of the 'KohaManualLanguage'
   syspref dropdown.
2) Apply the patch, and run updatedatabase.pl
   The 'KohaManualLanguage' dropdown should now list 'Greek'.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-09 08:18:51 -07:00
Lucas Gass 19209df1c0
Bug 39142: DBRev 25.12.00.003
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-09 08:18:51 -07:00
Lucas Gass 34a1463e90
Bug 39142: (RM follow-up) Add missing comma to userflags.sql
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-09 08:18:50 -07:00
Imani Thomas cc05dc9221
Bug 39142: fixing capitalization as per coding guidelines https://wiki.koha-community.org/wiki/Coding_Guidelines#HTML4:_Upper_and_lower_cases_in_strings
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-09 08:18:49 -07:00
Imani Thomas 9eef928712
Bug 39142: Add debug permission
This patch adds the database foundation for the debug permission feature:
- Creates bit 31 in userflags table for 'debug' permission
- Updates mandatory userflags.sql for fresh installations
- Provides atomic update script for existing installations

The debug permission will allow authorized users to access debugging
tools for toggling JavaScript and CSS customizations.

Signed-off-by: Lari Strand <lari.strand@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-09 08:18:41 -07:00
Matt Blenkinsop f7a02a6164
Bug 41523: Improve the output from db rev 251200002
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-06 07:45:39 -07:00
Lucas Gass ea9c10d4eb
Bug 41409: DBRev 25.12.00.002
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-12-31 07:09:34 -07:00
Matt Blenkinsop 366ce3f08e
Bug 41409: Convert streetnumber and B_streetnumber to tinytext
Test plan:
1) Run 'updatedatabase'
2) No errors should be thrown

Sponsored-by: Cheshire West and Chester Council
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-12-30 07:49:06 -07:00
Lucas Gass c827792838
Bug 41287: DBRev 25.12.00.001
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-12-29 09:56:10 -07:00
Nick Clemens 66825efa06
Bug 41287: Add option to use simple Stringwise sorting for facets
This patch restores the previous perl sorting to restore speed. For English language libraries
this will be correct in most instances, and is much more performant.

To test:
1 - Apply patch, update database
2 - Perform some searches, note ordering of facets
3 - Update system preference 'FacetOrder' to 'simple alphabetical'
4 - Peform some searches, note ordering of facets, should be correct unless you have unicode characters
5 - Sign off

NOTE: Benchmarks attached as a comment, you can also enable NYTProf and view results for yourself:
https://wiki.koha-community.org/wiki/Profiling_with_Devel::NYTProf#NYTProf_with_Plack
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-12-29 09:56:07 -07:00
Jonathan Druart 5a219c4083
Bug 40006: Remove dbh->do return value from updatedatabase output
There are 2 occurrences of "0E0" in the test suite output.

We should remove them.

Test plan:
root@kohadevbox:koha$ perl /kohadevbox/misc4dev/run_tests.pl --run-all-tests
And confirm that the 0E0 does no longer appear

You can abort when the update DB process is done

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-12-17 13:24:28 -07:00
Lucas Gass 087dccae8c
DBRev 25.12.00.000: Start of a new release cycle
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-12-15 10:32:33 -07:00
Lucas Gass 149e791bfa
Bug 41421: Fix DB update
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-12-10 11:08:10 -07:00
Lucas Gass 3f2987eb19
Koha 25.11.00 is here!
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-12-05 13:31:40 -07:00
Lucas Gass 30c3b6e001
25.11.00: Update kohastructure.sql
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-12-05 13:31:39 -07:00
Pedro Amorim 592d966d67
Bug 37893: Handle SIPconfig.xml not found / unreadable
prove t/db_dependent/Koha/SIP2/SIP2ModuleMigration.t

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-26 10:40:35 -07:00
Lucas Gass 5bc2ca6557
Bug 39532: DBRev 25.06.00.036
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-21 13:05:59 -07:00
Martin Renvoize d90333e911
Bug 39532: Use new FINES restriction type to avoid conflict with SUSPENSION
This patch introduces a new unique restriction type 'FINES' specifically
for the debar_patrons_with_fines.pl script to prevent duplicate
restrictions on repeated runs.

The original fix used 'SUSPENSION' but this conflicted with the
fine-in-days feature which uses SUSPENSION for time-limited restrictions
when overdue items are returned. Running the script would overwrite
those time-limited restrictions with indefinite ones.

Changes:
- Add new 'FINES' system restriction type to patron_restriction_types.yml
  for new installations
- Create database update to add 'FINES' type to existing installations
- Update debar_patrons_with_fines.pl to use 'FINES' instead of 'SUSPENSION'
- Update AddUniqueDebarment and DelUniqueDebarment POD documentation

This keeps SUSPENSION exclusively for the fine-in-days feature while
preventing duplicate restrictions from the fines script.

Test plan:
1. Run database update
2. Verify new FINES restriction type exists in restriction_types table
3. Run debar_patrons_with_fines.pl multiple times
4. Confirm only one FINES restriction per patron (no duplicates)
5. Verify SUSPENSION restrictions from fine-in-days are not affected
6. Run tests: prove t/db_dependent/Patron/Borrower_Debarments.t

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-21 08:41:51 -07:00
Lucas Gass 9e40c7caf5
Bug 37893: DBRev 25.06.00.035
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:21:21 -07:00
Pedro Amorim 0aa77814c7
Bug 37893: (QA follow-up): Fix database inconsistencies:
This should pass:
perl /kohadevbox/misc4dev/run_tests.pl --instance=kohadev --db-password=password --run-db-compare-only --compare-with=HEAD

This is a squash of the following:
1) Fix charset in kohastructure.sql
2) Fix NULL => DEFAULT NULL
3) Reorder tables in kohastructure.sql
4) typos

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:21:20 -07:00
Pedro Amorim c24a5b25c5
Bug 37893: (QA follow-up): Remove file_transports database table
This was clearly a mistake due a botched rebase.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:21:15 -07:00
Pedro Amorim cf11f3863d
Bug 37893: (QA follow-up): Insert defaults to database for delimiter and terminator
Not considering here encoding here as I'm uncertain from the code if it should utf8 or ascii

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:21:13 -07:00
Martin Renvoize c1a97af67c
Bug 37893: (QA follow-up): Remove plaintext password storage from SIP2
This follow-up removes the security vulnerability of storing plaintext
passwords in the sip_accounts table. The SIP2 system now relies entirely
on Koha's secure password authentication.

Changes:
- Remove plaintext password comparison from login_core() and telnet_transport()
- Remove login_password column from sip_accounts table
- Update database schema files and atomic update
- Remove password field from API definitions and Vue form
- Update all tests to remove login_password references

Authentication now works in two stages:
1. Access control: Check if userid exists in sip_accounts (allowlist)
2. Authentication: Validate password against hash in borrowers table

This maintains SIP access control while eliminating plaintext password
storage. Staff users authenticate with their Koha password (securely hashed).

Test plan:
1. Run updated tests to verify they pass
2. Verify SIP2 authentication works with staff user credentials
3. Confirm no plaintext passwords are stored

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:21:06 -07:00
Pedro Amorim b90f7c88ad
Bug 37893: Add sip2 module permission
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:21:05 -07:00
Pedro Amorim 3866d85555
Bug 37893: (QA follow-up): Nuke server params and listeners from UI
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:21:03 -07:00
Pedro Amorim f3dc7ce05e
Bug 37893: Add tables to atomicupdate
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:58 -07:00
Pedro Amorim fa527ac8ff
Bug 37893: SIP2 System preference overrides
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:56 -07:00
Pedro Amorim 443d4a069b
Bug 37893: SIP Server params
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:56 -07:00
Pedro Amorim bb6f72b9f7
Bug 37893: SIP accounts screen msg regexs
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:55 -07:00
Pedro Amorim 103038c167
Bug 37893: SIP accounts sort bin mappings
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:55 -07:00
Pedro Amorim 507b90b13f
Bug 37893: SIP2 Listeners
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:54 -07:00
Pedro Amorim e21af8c6bc
Bug 37893: SIP accounts system preference overrides
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:54 -07:00
Pedro Amorim 15944a017b
Bug 37893: SIP accounts custom patron fields
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:53 -07:00
Pedro Amorim 36808bccb2
Bug 37893: SIP accounts custom item fields
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:53 -07:00
Pedro Amorim 502e416d22
Bug 37893: SIP accounts item fields
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:52 -07:00
Pedro Amorim 48b845f0eb
Bug 37893: SIP accounts patron attributes
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:52 -07:00
Pedro Amorim 0ca802513a
Bug 37893: atomicupdate
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:51 -07:00
Pedro Amorim 20e71523b8
Bug 37893: SIP accounts - Database
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:47 -07:00
Pedro Amorim 9be3ec6482
Bug 37893: Database
Sponsored-by: ByWater Solutions
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-18 11:20:32 -07:00
sashaanastasi 33f4935bce
Bug 39280: Remove misleading message text for ODUE notice
This patch removes unnecessary and misleading wording from the overdue note as it depends on the library's circulation rules: "If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned."

Test plan:
1. Check the wording of the ODUE notice under Tools > Patrons and circulation > Notices and slips.
2. Note that it includes this wording, which may be unnecessary or misleading depending on the library's settings: "If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned."
3. Apply the patch.
4. Check that the updated ODUE notice has removed the wording by either:
   4.1 Resetting everything: reset_all
   4.2 Viewing the default notice - click "View default" when viewing the email notice
5. Sign off.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-07 10:54:16 -07:00
Lucas Gass dbf341bfcb
Bug 40245: DBRev 25.06.00.034
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-07 10:54:11 -07:00
CJ Lynce 1d6eb51d20
Bug 40245: Add new system preference ShowPatronFirstnameIfDifferentThanPreferredname
Adds a new system preference ShowPatronFirstnameIfDifferentThanPreferredname
	to allow a patron's firstname to be shown in search results when
	different than their preferred name.

Sponsored-by: Westlake Porter Public Library <https://westlakelibrary.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-07 10:54:10 -07:00
Lucas Gass c26e26a697
Bug 35451: DBRev 25.06.00.033
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-07 10:54:07 -07:00
Martin Renvoize ddd8e697b4
Bug 35451: Add record_table to additional_field_values
This patch updates the database to include a record_table field in the
additional_field_values table and adds an index on that field.

This should facilitate more performant joins.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-07 10:53:56 -07:00