Commit Graph

6611 Commits

Author SHA1 Message Date
David Cook 4c8e0f0a6d
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>
(cherry picked from commit 0442f4ce2c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2026-06-12 14:48:38 +12:00
Lucas Gass 184fc33d48
Increment version for 25.05.11.000 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-06-05 14:02:41 -06:00
Lucas Gass 66de25f1e4
Increment version for 25.05.10 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-28 15:57:10 -06:00
Lucas Gass 4c91dacfaf
Bug 34000: DBRev 25.05.09.001
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-28 15:57:06 -06:00
Martin Renvoize b55535e770
Bug 34000: Add autoMemberNumValue system preference
Introduces a new system preference, autoMemberNumValue, which tracks
the highest auto-generated cardnumber ever issued. It is seeded from
the MAX cardnumber across both borrowers and deletedborrowers so
pre-upgrade deletions do not free numbers for re-issuance.

This preference is managed internally by Koha::Patron::fixup_cardnumber
and has no UI (no YAML entry).

Test plan:
1. Apply the atomicupdate:
   perl installer/data/mysql/updatedatabase.pl
2. Verify the preference exists:
   SELECT * FROM systempreferences WHERE variable = 'autoMemberNumValue';
3. Confirm the seed value matches:
   SELECT GREATEST(
       COALESCE((SELECT MAX(CAST(cardnumber AS SIGNED)) FROM borrowers
                 WHERE cardnumber REGEXP '^-?[0-9]+\$'), 0),
       COALESCE((SELECT MAX(CAST(cardnumber AS SIGNED)) FROM deletedborrowers
                 WHERE cardnumber REGEXP '^-?[0-9]+\$'), 0)
   );
4. Re-run the atomicupdate and confirm the already-exists warning.
5. Drop the syspref, re-apply the atomicupdate, confirm it seeds
   correctly on fresh installs via mandatory/sysprefs.sql.

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
(cherry picked from commit aa84e99db8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-28 15:57:04 -06:00
Lucas Gass b6d2599daa
Increment version for 25.05.09.000 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-21 17:58:36 -06:00
Laura_Escamilla d72715f010
Bug 36466: Move atomic update to db_revs
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
2026-04-07 11:26:54 -04:00
Hammat Wele 0a8c308b2c
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: Laura Escamilla <laura.escamilla@bywatersolutions.com>
2026-03-30 18:02:27 -04:00
Laura_Escamilla 4835d8bf29
Increment version for 25.05.08 release
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
2026-02-27 10:20:04 -05:00
Lucas Gass 701789978d
Bug 41076: [25.05.x] Adjust perl tidiness
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-24 08:35:34 -07:00
Laura Escamilla abac997ffd
Bug 37711: DBRev 25.05.07.001 2026-02-17 21:48:45 +00:00
Tomas Cohen Arazi 6ad376dfb8
Bug 37711: DB update
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
2026-02-17 17:43:11 +00:00
Laura_Escamilla f2eaaafe9f
Increment version for 25.05.07 release
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-29 07:47:34 -07:00
Tomás Cohen Arazi 4351b52ab7
Bug 40163: (follow-up) Fix wrong GNU links and update test
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
2026-01-07 14:32:37 +00:00
Tomas Cohen Arazi 1cf93e5f97
Bug 40163: Fix several http addresses in the code docs
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
2026-01-07 14:32:30 +00:00
Lucas Gass 41e5334804
Bug 41421: [25.05.x] Fix DB update
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-12-10 10:50:00 -07:00
Paul Derscheid 08f30bdccf
Increment version for 25.05.06 release
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-12-04 10:36:31 +01:00
Paul Derscheid 9b9b2ee4c9
Bug 39532: DBRev 25.05.05.005
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-12-01 15:53:26 +01:00
Martin Renvoize f68728404d
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>
(cherry picked from commit d90333e911)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-12-01 15:53:25 +01:00
Paul Derscheid 7d8199b1a4
Bug 35830: DBRev 25.05.05.004
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-11-25 17:36:11 +01:00
Brendan Lawlor 576b80bb1d
Bug 35830: Add merge_borrowers subpermission
Merging patrons only required edit_borrowers permission
but would result in a patron deletion.

This patch requires a new merge_borrowers subpermission

To test:
1. Give a patron the following permissions
    catalogue, edit_borrowers, list_borrowers
2. Log into the staff interface as the patron
3. Do a patron search and select 2 patrons
4. Click merge patron - success - a patron got deleted
5. Apply patch, updatedatabase and restart_all
6. Repeat steps 3 and 4 - you can't
7. Add the new permission for merge_borrowers
8. Repeat steps 3 and 4 - now you can
9. prove t/Koha/Auth/Patrons.t

Sponsored-by: CLAMS
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5ce9d5af4e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-11-25 17:36:10 +01:00
Paul Derscheid 22f1971502
Bug 30633: DBRev 25.05.05.003
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-11-25 17:36:06 +01:00
Jonathan Druart 4e9bd0987e
Bug 30633: Remove OPACHoldingsDefaultSortField
It's no longer needed

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b09ac4bf93)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-11-25 17:36:04 +01:00
Paul Derscheid f49ca990f8
Bug 40983: DBRev 25.05.05.002
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-11-25 17:36:02 +01:00
Marcel de Rooy bac6038711
Bug 40983: (QA follow-up) Add a (final) upgrade warn
Just a last wake up call.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5bad556207)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-11-25 17:36:02 +01:00
Paul Derscheid a79dd18ef1
Bug 40292: DBRev 25.05.05.001
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-11-04 00:04:29 +01:00
Paul Derscheid 9c4960df96
Bug 40292: (QA follow-up) Tidy db_revs/241200018.pl, atomicupdate/bug_40292.pl
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit de5e76bac2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-11-04 00:04:29 +01:00
Jonathan Druart 2eb0befc36
Bug 40292: Rename new_record_id if exists
If some installs didn't notice the column was missing (not renamed) we
can still do it now.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a0cc8aa9d7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-11-04 00:04:28 +01:00
Jonathan Druart 9cdf2afc61
Bug 40292: Add a specific error if a previous upgrade failed
We can reach an inconsistent state if the upgrade DB failed and
new_record_id has been created but renamed.

I don't think we should try to recover from this state, but have a
specific error message in this case. We will guide people asking for
help.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9e0a70fced)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-11-04 00:04:28 +01:00
Paul Derscheid 01e49d3f1f
Bug 40292: Specify full datatypes and comment as required for CHANGE COLUMN
To test:
1. Follow the original test plan and compare the resulting tables to:
MariaDB [koha_kohadev]> desc additional_field_values;
+-----------+--------------+------+-----+---------+----------------+
| Field     | Type         | Null | Key | Default | Extra          |
+-----------+--------------+------+-----+---------+----------------+
| id        | int(11)      | NO   | PRI | NULL    | auto_increment |
| field_id  | int(11)      | NO   | MUL | NULL    |                |
| record_id | int(11)      | NO   |     | NULL    |                |
| value     | varchar(255) | NO   |     |         |                |
+-----------+--------------+------+-----+---------+----------------+
4 rows in set (0.003 sec)

MariaDB [koha_kohadev]> desc aqbookseller_aliases;
+-----------+--------------+------+-----+---------+----------------+
| Field     | Type         | Null | Key | Default | Extra          |
+-----------+--------------+------+-----+---------+----------------+
| alias_id  | int(11)      | NO   | PRI | NULL    | auto_increment |
| vendor_id | int(11)      | NO   | MUL | NULL    |                |
| alias     | varchar(255) | NO   |     | NULL    |                |
+-----------+--------------+------+-----+---------+----------------+
3 rows in set (0.004 sec)

MariaDB [koha_kohadev]> desc aqbookseller_interfaces;
+---------------+--------------+------+-----+---------+----------------+
| Field         | Type         | Null | Key | Default | Extra          |
+---------------+--------------+------+-----+---------+----------------+
| interface_id  | int(11)      | NO   | PRI | NULL    | auto_increment |
| vendor_id     | int(11)      | NO   | MUL | NULL    |                |
| type          | varchar(80)  | YES  |     | NULL    |                |
| name          | varchar(255) | NO   |     | NULL    |                |
| uri           | mediumtext   | YES  |     | NULL    |                |
| login         | varchar(255) | YES  |     | NULL    |                |
| password      | mediumtext   | YES  |     | NULL    |                |
| account_email | mediumtext   | YES  |     | NULL    |                |
| notes         | longtext     | YES  |     | NULL    |                |
+---------------+--------------+------+-----+---------+----------------+
9 rows in set (0.003 sec)

The Type field should be the only deviation from the previous version,
Null and Extra should be identical.
2. Run perl ../misc4dev/run_tests.pl --run-db-compare-only --compare-with v24.05.00
3. Sign off

Co-authored-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b9d392dd61)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-11-04 00:04:27 +01:00
Paul Derscheid 6538206331
Bug 40292: Prevent SQL syntax error when upgrading to 25.05 on MariaDB 10.3
- Change `RENAME COLUMN <OLD> TO <NEW>` to `CHANGE COLUMN <OLD> <NEW>
  <DATATYPE (required for this syntax)>`.

To test (assuming ktd):
1. Checkout upstream/24.11.x
2. Start ktd with `KOHA_IMAGE=24.11-bullseye(-arm64) DB_IMAGE=mariadb:10.3 ktd up
   -d`
3. Checkout upstream/main
4. Run updatedatabase in the Koha container
5. Observe the error regarding the unsupported syntax.
6. Tear everything down again: ktd down
7. Repeat 1-2.
8. Once started up, checkout upstream/main
9. Apply the patch on top of it
10. Run updatedatabase in the Koha container
11. Observe a successful upgrade
12. Sign off

Side Note: I tested this against upstream/25.05.x, but this patch is
based on main.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 33f39f55af)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-11-04 00:04:27 +01:00
Paul Derscheid daac6c216d
Increment version for 25.05.05 release
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-10-29 17:55:57 +01:00
Paul Derscheid 3200bc9301
Bug 40936: DBRev 25.05.04.001
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-10-29 10:02:26 +01:00
Kyle M Hall b8fa49bb73
Bug 40936: Add index for default patron sort order
The default sort order for Koha's patron search includes many columns, some of which are not indexed:

[% CASE 'name-address' %] {
"data":"me.surname:me.preferred_name:me.firstname:me.middle_name:me.othernames:me.street_number:me.address:me.address2:me.city:me.state:me.postal_code:me.country",

Depending on the number of patrons in the database, and the specific configuration of the server, this can end up generating a query that creates a temp table in the hundreds of gigabytes of data or more. Not only does this risk crashing a database server with insufficient disk space, it's also incredibly slow.

We've found a compound index prevents the issue and also makes the search much faster. InndoDB indexes have a fixed maximum length which is too small ( 3072 bytes ) to encompass the full data for all the fields we need to sort by.

The following works well as a comprise to keep the index length within the maximum:
CREATE INDEX idx_borrowers_sort_order ON borrowers (
    surname(100),        -- 400
    preferred_name(80),  -- 320
    firstname(80),       -- 320
    middle_name(50),     -- 200
    othernames(50),      -- 200
    streetnumber(20),    -- 80
    address(100),        -- 400
    address2(75),        -- 300
    city(75),            -- 300
    state(40),           -- 160
    zipcode(20),         -- 80
    country(40)          -- 160
);

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Perform a patron search
4) No change in behvior should be noted!

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>
(cherry picked from commit 63c44cbd0e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-10-29 10:02:26 +01:00
Paul Derscheid e36b3ba16d
Increment version for 25.05.04 release
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-25 20:49:59 +02:00
Paul Derscheid 3e40468620
Revert "Bug 36135: Add batch_modify_holds permissions"
This reverts commit 21917b5d9e.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-25 15:55:57 +02:00
Paul Derscheid 9271312915
Revert "Bug 36135: DBRev 25.05.03.008"
This reverts commit 791921c6e4.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-25 15:55:53 +02:00
Paul Derscheid 791921c6e4
Bug 36135: DBRev 25.05.03.008
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:43:41 +02:00
Lucas Gass 21917b5d9e
Bug 36135: Add batch_modify_holds permissions
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 54638fba03)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:43:37 +02:00
Nick Clemens b71d4d3e94
Bug 38906: Use SUBSTRING and LOCATE over REGEXP_REPLACE
To test:
1 - Check out an old version of Koha and set some columns settings for holdings tables, or:
    UPDATE columns_settings
    SET columnname = CONCAT("holdings_",columnname)
    WHERE module = 'catalogue' AND page='detail' AND tablename = "holdings_table";
    UPDATE columns_settings
    SET columnname = CONCAT("otherholdings_",columnname)
    WHERE module = 'catalogue' AND page = 'detail' AND tablename = "otherholdings_table";
2 - perl -e 'use C4::Installer; my $result = C4::Installer::run_db_rev("/kohadevbox/koha/installer/data/mysql/db_revs/240600064.pl"); warn Data::Dumper::Dumper($result)'
3 - SELECT columnname FROM columns_settings WHERE module="catalogue" AND page="detail" AND ( tablename="holdings_table" OR tablename="otherholdings_table");
4 - Confirm column names are correct
5 - repeat 2
6 - Confirm column names are not affected on subsequent runs (items_group does not become group)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c1f4e2712b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:43:20 +02:00
Caroline Cyr La Rose 8e6e70cd35
Bug 40071: MARC21 Addition to relator terms in technical notice 2025-06-04
This patch adds a relator term that was added to the MARC code list for
relators in the June 4, 2025 technical notice. The new term is waw -
Writer of afterword.

To test:
1. Apply patch and reset_all
2. Go to Administration > Authorized values
3. Search for the RELTERMS list and click on it
4. Search for waw
   --> There should be an entry for waw - Writer of afterword

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 17acb0c157)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:43:10 +02:00
Caroline Cyr La Rose 4e0697968c
Bug 40072: MARC21 Addition to relator terms in technical notice 2025-04-03
This patch adds a relator term that was added to the MARC code list for
relators in the April 3, 2025 technical notice. The new term is wfw -
Writer of foreword. This technical notice also deprecates an existing
term, aui (author of introduction), in favour of the new term.

To test:
1. Apply patch and reset_all
2. Go to Administration > Authorized values
3. Search for the RELTERMS list and click on it
4. Search for wfw
   --> There should be an entry for wfw - Writer of foreword
5. Search for aui
   --> Term should not exist

Note : This update includes a term deprecation. I decided to go ahead
and remove it from the authorized values list because, unlike for MARC
frameworks, a nonexistent value will not delete data from the records.
It will simply say "aui (Not an authorized value)". Furthermore, this
only affects new installations. Nothing will be deleted from existing
installations, unless the libraries themselves remove the authorized
value. They can make a batch modification before deleting it if
necessary.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 38a5b8190d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:43:10 +02:00
Caroline Cyr La Rose 4eaea617ce
Bug 40073: MARC21 Addition to relator terms in technical notice 2025-02-06
This patch adds new relator terms that were added to the MARC code list
for relators in the Februrary 2, 2025 technical notice. The new terms
are ink - Inker, and pnc - Penciller.

To test:
1. Apply patch and reset_all
2. Go to Administration > Authorized values
3. Search for the RELTERMS list and click on it
4. Search for ink
   --> There should be an entry for ink - Inker
5. Search for pnc
   --> There should be an entry for pnc - Penciller

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit add898d8a9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:43:09 +02:00
Lucas Gass b394a6dec8
Bug 40725: Add TableExists check to db_revs/231200053.pl
This patch makes the DB revision idempotent.

To test:
1. Fix the Koha version right before the broken upgrade:
   $ ktd --shell
  k$ koha-mysql kohadev
   > UPDATE systempreferences SET value="23.1200052" WHERE
variable="version"; \q
2. Restart everything (memcached should be enough)
  k$ restart_all
3. Run:
  k$ updatedatabase
=> FAIL: You get:

```shell
Upgrade to 23.12.00.053  [19:34:35]: Bug 36755 - Increase length of 'code' column in borrower_attribute_types
	ERROR: C4::Installer::foreign_key_exists(): DBI Exception: DBD::mysql::db selectrow_array failed: Table 'koha_kohadev.pseudonymized_borrower_attributes' doesn't exist at /kohadevbox/koha/installer/data/mysql/db_revs/231200053.pl line 11
```

4. Apply this patch
5. Repeat 3
=> SUCCESS: Update runs smoothly!
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4066d2a4fc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:43:01 +02:00
Emily Lamancusa a8c8152b98
Bug 36114: Adjust TRANSFERSLIP to use Template Toolkit
To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Find or create an item that belongs to a library other than the logged-in library
4. Make sure the item has a callnumber (edit it to add one if needed)
4. Check the item in to generate a transfer slip
--> Confirm the information is all filled in correctly on the slip

Signed-off-by: Marion Durand <marion.durand@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dcdb8b058c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:38 +02:00
Paul Derscheid 82ac526335
Bug 35467: DBRev 25.05.03.007
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:29 +02:00
Andrew Fuerste Henry 552a88df61
Bug 35467: atomicupdate to rename NewsLog to AdditionalContentLog
Now executable!

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 665753634b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:28 +02:00
Andrew Fuerste Henry 6e3fba0778
Bug 35467: atomicupdate to change NewsLog to AdditionalContentLog
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 420add2908)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:28 +02:00
Andrew Fuerste Henry 0d5a1e2541
Bug 35467: Rename NewsLog system preference to AdditionalContent
To test:
1 - confirm whether or not NewsLog is enabled on your system
2 - apply patch, updatedatabase, restart_all
3 - search system preferences, confirm you now have
    AdditionalContentLog rather than NewsLog and that the new
    description is accurate
4 - confitm AdditionalContentLog shows the value you previously had for
    NewsLog
5 - go to Tools > Log Viewer
6 - confirm the checkbox here is labeled "Additional Content", that it
    correctly reflects the syspref value, and that it links to the
    syspref
7 - with AdditionalContentLog enabled, created/edit/delete news, HTML
    customizations, and pages. confirm they log
8 - with AdditionalContentLog disabled, created/edit/delete news, HTML
    customizations, and pages. confirm they don't log

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9805b4cb3e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:27 +02:00
Paul Derscheid 3b724c5edb
Bug 34561: DBRev 25.05.03.006
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:26 +02:00