Commit Graph

3221 Commits

Author SHA1 Message Date
Lucas Gass 38ab32230b
Bug 39145: DBRev 25.06.00.021
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-29 14:02:26 -06:00
Marcel de Rooy afd6e28c3c
Bug 39145: Add option to transfer only public lists to preference
Test plan:
Run updatedatabase.pl
Check ListOwnershipUponPatronDeletion on Patron preferences tab.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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-09-29 14:02:24 -06:00
Lucas Gass 09c3ae4c86
Bug 38330: DBRev 25.06.00.020
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-29 14:02:19 -06:00
David Cook 78109295f1
Bug 38330: (QA follow-up) Fix WHERE clause in SQL update and re-word warning
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-29 14:02:18 -06:00
David Cook e4822d590c
Bug 38330: (QA follow-up) Fix SQL syntax error
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-29 14:02:18 -06:00
Martin Renvoize fdfaeda9fc
Bug 38330: (QA follow-up) Add index to opac_suppressed
As suggested by David, this one adds an index on the new column

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-29 14:02:17 -06:00
Martin Renvoize 393c9fc2c8
Bug 38330: (QA follow-up) Improve resilience of DB update
David considered using boolean, but this would catch 'no' and 0 as
truthy.  I instead look for common values here more explicitly.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-29 14:02:17 -06:00
Martin Renvoize 354dbc9649
Bug 38330: (QA follow-up) Correction to field extaction
As pointed out by David.. it's the 942 not the 952 we have this data in.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-29 14:02:16 -06:00
Martin Renvoize 9173aa53b9
Bug 38330: (QA follow-up) Add population of opac_suppressed from biblio_metadata
This patch updates the database update to populate the new
opac_suppressed field in the bilios table using the data in the
biblio_metadata table.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-29 14:02:16 -06:00
Tomas Cohen Arazi b4c7f300f6
Bug 38330: DB changes
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-29 14:02:13 -06:00
Lucas Gass 280b23e0f9
Bug 40284: DRRev 25.06.00.019
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-29 14:02:12 -06:00
Marcel de Rooy 7c3d9c6f33
Bug 40284: Adjust maxlength for 005-007.
Test plan:
Run dbrev or new install.
Verify the maxlength for 005-007 in marc_subfield_structure.
Restart all. Check maxlength on input tags in the basic editor
for fields 005-007.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-29 14:02:04 -06:00
Lucas Gass 9e719cd1d3
Bug 35761: DBRev 25.06.00.018
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-19 13:23:26 -06:00
Tomas Cohen Arazi a5f72d7362
Bug 39190: Rename id => file_transport_id and remove mapping
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-19 13:23:25 -06:00
Tomas Cohen Arazi acf2f642b4
Bug 39190: Rename 'sftp_servers' to 'file_transports'
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-19 13:23:21 -06:00
Martin Renvoize 2d88bcaf1f
Bug 39190: Update status to longtext
Update status field to store longtext so we can sore more details
information about connection statuses from test connection

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-19 13:23:16 -06:00
Jake Deery 2688dfd668
Bug 35761: Database updates
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-19 13:23:03 -06:00
Lucas Gass d7c21c722e
Bug 39526: DBRev 25.06.00.017
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-19 08:42:53 -06:00
Jonathan Druart 8dbf22f996
Bug 39526: Prevent other prefs to be renamed
There is only one pref. It feel safer to rename this specific pref than
other pref that might not be ES related.

Other prefs starting with "ES" could be added, then this patch
backported, etc.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-19 08:42:52 -06:00
Thomas Klausner c4a6c7584d
Bug 39526: Unify syspref variable names to Elasticsearch
We currently have a sysprefs named "Elasticsearch*" and some name only "ES*". This patch unifies the names to always start with "Elasticsearch".

Test plan:

* Start koha-testing-docker, open the staff interface and go to Administration.
* Enter "Elasticsearch" into the System Preference search box and click "search"
* You will find a bunch of sysprefs
* Now search for "ESPreventAutoTruncate", which should find one match

* Apply the patch
* run (in ktd) the script `updatedatabase`

* You should see output like
DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_39526_unify_syspref_variable_names_for_elasticsearch.pl  [09:35:03]: Bug 39526 - Unify system preference variable names for Elasticsearch
	Renamed system preference 'ES..' to 'Elasticsearch..'

* Go again to to sysprefs and search again for "Elasticsearch"
* you should now find "ElasticsearchPreventAutoTruncate"
* Search for "ESPreventAutoTruncate", which should show "No system preferences matched your search for .." (and the list of ALL sysprefs)

Please note that the qa script explains about installer/data/mysql/mandatory/sysprefs.sql, but the last line is not touched by this patch, so not sure why this happens.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-19 08:42:52 -06:00
Lucas Gass 95863d9de5
Bug 31698: DBRev 25.06.00.016
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-05 15:10:46 -06:00
Lucas Gass ceb5ec8b15
Bug 31698: Add alter_hold_targets permission
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-05 15:10:38 -06:00
Lucas Gass 2e84dfa24f
Bug 40665: DBRev 25.06.00.015
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-05 15:10:37 -06:00
Paul Derscheid 1460ddc222
Bug 40665: Database update
This patch updates the database schema to add booking_id foreign key
columns to both issues and old_issues tables, enabling the linkage
between checkouts and the bookings that generated them.

Schema changes:
- Add booking_id column to issues and old_issues tables
- Add foreign key constraints referencing bookings table
- Preserve referential integrity with appropriate CASCADE actions

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-05 15:10:35 -06:00
Lucas Gass 3a12111b40
Bug 37661: DBRev 25.06.00.014
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-05 15:10:32 -06:00
Baptiste 46c818be4e
Bug 37661: Add a new syspref EnableBooking
This patch makes the Booking module dependant of a new YesNo syspref: EnableBooking

To do this, I tried and get all changes using the graph of Bug 29002 and
got interrested in every tt change to make changes on this depend on the
new syspref. File inside the booking module should not be amended.

Here are the files I found relevant for each patch
Bug 37737:
- koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc
- koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
Bug 37736:
- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt
Bug 29002:
- koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt
- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt
- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt
- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt
- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt

TEST PLAN:
1 -  Set "Bookable = 1" on a given item
2 - Make sure you know where are located
    - The field bookable on exemplaries
    - The button "Place booking" in item toolbae
    - The link "Bookings (0)" in item menu
3 - Apply patch and update database
4 - Check that every field listed in 2 - is still present
5 - Set the syspref "EnableBooking" to "Disable"
6 - Check that every field listed in 2 - is still present
7 - Browse Norme, ISBD, Marc, Items tabs + pages imageviewer.pl, labeledMARCdetail.pl and check that nothing is broken

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-05 15:10:32 -06:00
Lucas Gass db4c21022b
Bug 36135: DBRev 25.06.00.013
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-03 14:00:53 -06:00
Lucas Gass 54638fba03
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>
2025-09-03 14:00:47 -06:00
Lucas Gass 3597befb4c
Bug 15516: DBRev 25.06.00.012
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-03 11:42:06 -06:00
Lucas Gass f7a9683458
Bug 15516: Add new system preference to atomicupdate
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-03 11:42:05 -06:00
David Cook 8e11019993
Bug 15516: (follow-up) explicitly define indexes for foreign keys
This patch explicitly defines indexes for foreign keys.

This isn't really needed for the atomic update, but we've included
it for consistency.

It is needed in kohastructure.sql, because MySQL/MariaDB silently/implicitly
adds these indexes for foreign keys, which means that the database
audit tool will show a discrepancy between kohastructure.sql and
the installed DB schema.

Also fix a discrepancy between atomic update and kohastructure.sql

Test plan:
0. Apply the patch
1. Use both methods to update the DB schema
2. Go to http://localhost:8081/cgi-bin/koha/about.pl?tab=database
3. Note that about.pl isn't telling you to drop the indexes
for reserves_ibfk_hg and old_reserves_ibfk_hg now

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-03 11:42:04 -06:00
Aleisha Amohia 8ce7541997
Bug 15516: Database and installer updates
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-03 11:41:59 -06:00
Lucas Gass 0b4b59680b
Bug 37901: DBRev 25.06.00.011
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-08-20 13:43:26 -06:00
Pedro Amorim de25abcb4d
Bug 37901: Add updatedatabase information
This warning will display if there are existing reports that contain 'pseudonymized_borrower_attributes', informing that these reports need to be updated

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-08-20 13:43:25 -06:00
Pedro Amorim 1b505dfa34
Bug 37901: atomicupdate: Add 'illrequest_id' column to statistics
Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-08-20 13:43:22 -06:00
Pedro Amorim ab1d428927
Bug 37901: Preparation: atomic update
Rename the table pseudonymized_borrower_attributes to pseudonymized_metadata_values
This is so that pseudonymizing other 'extended_attributes' type of data,
such as illrequestsattributes, becomes possible.

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-08-20 13:43:18 -06:00
Lucas Gass d425202684
Bug 20644: DBRev 25.06.00.010
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-08-20 13:43:07 -06:00
Shi Yao Wang 9b70f6db00
Bug 20644: Change checkprevcheckout as ENUM at DB level
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-08-20 13:43:06 -06:00
Lisette Scheer 8819f2d41c
Bug 20644: (QA follow-up) Remove duplicate variable
I removed a duplicate variable and tidied.

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-08-20 13:43:06 -06:00
Hammat Wele 99322896b9
Bug 20644: Add checkprevcheckout on item types
I have added the "Check for previous checkouts" option to item types. This option is visible only when the system preference "CheckPrevCheckout" is set to either :
- "Unless overridden by patron category or by item type, do"
or
- "Unless overridden by patron category or by item type, do not."

This option takes precedence over patron and patron category preferences.

TEST PLAN
1) Apply the patch.
2) Perform an atomic update (installer/data/mysql/updatedatabase.pl)
3) Set the "CheckPrevCheckout" system preference to "Unless overridden by patron category or by item type, do".
4) Go to "Koha administration > Item types > + New item type".
5) Fill in the necessary fields; the "Check for previous checkouts" field should be set to "Inherit from system preferences".
6) Click the "Save changes" button.
7) Create an item with the type you have created.
8) Check out this item for a patron, then check it in.
9) Check out the same item for the same patron again.
10) The message "Patron has previously checked out this title: <Title>. Check out anyway?" should appear.
11) Go to "Koha administration > Item types".
12) Edit the created item type.
13) Change the value of the "Check for previous checkouts" field to "No and try to override system preferences".
14) Click the "Save changes" button.
15) Check out the same item for the same patron.
16) The message should not appear.
17) Run the tests "Borrower_PrevCheckout.t" (prove t/db_dependent/Patron/Borrower_PrevCheckout.t) and "ItemTypes.t" (prove t/db_dependent/Koha/ItemTypes.t).
18) Verify that all tests pass successfully.

Signed-off-by: Laurence <laurence.rault@biblibre.com>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-08-20 13:42:58 -06:00
Lucas Gass 462d811d4e
Bug 35467: DBRev 25.06.00.009
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-08-13 13:39:40 -06:00
Andrew Fuerste Henry 665753634b
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>
2025-08-13 13:39:39 -06:00
Andrew Fuerste Henry 420add2908
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>
2025-08-13 13:39:38 -06:00
Lucas Gass 3216152520
Bug 40305: DBRev 25.06.00.008
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-07-25 15:52:19 -06:00
Martin Renvoize 4b300b1c1d
Bug 40305: Add database update to fix existing notice templates
This database update fixes existing RECEIPT and ACCOUNT_CREDIT notice
templates that may still use the old 'collected' variable instead of
'tendered'. It handles various formatting patterns and provides
verification that the conversion was successful.

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-07-25 14:27:17 -06:00
Lucas Gass 24ec8e4bd4
Bug 36561: DBRev 25.06.00.007
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-07-24 17:04:06 -06:00
David Cook 79c1853b2b
Bug 36561: Add new permission `api_validate_password`
This change adds a `api_validate_password` permission which allows a user to only
validate borrowers by using the /api/v1/auth/password/validation endpoint.

This avoids scenarios where you want third-parties to authenticate a user without
giving them full permissions to perform CRUD operations on user data.

To test:
1. Apply patch
2. Run "koha-upgrade-schema kohadev"
3. koha-plack --reload kohadev
4. prove -v t/db_dependent/api/v1/password_validation.t
5. Visit http://localhost:8081/cgi-bin/koha/members/member-flags.pl?member=51
6. Note that a new subpermission `api_validate_password` appears under the "borrowers" permission

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-07-24 17:03:57 -06:00
Lucas Gass 5bb04202cc
Bug 37883: DBRev 25.06.00.006
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-07-23 16:36:46 -06:00
Lucas Gass 4db82a99d0
Bug 37883: Correct permissions of atomicupdate file
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-07-23 16:36:45 -06:00
Lucas Gass 764273befe
Bug 37883: Add FilterSearchResultsByLoggedInBranch system preference
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-07-23 16:36:43 -06:00