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>
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>
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>
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>
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>
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>
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>
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>
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: Lucas Gass <lucas@bywatersolutions.com>
The upgrade DB must be idempotent
if run twice, the second pass fails with
DBI Exception: DBD::mysql::db do failed: Duplicate entry 'ElasticsearchPreventAutoTruncate' for key 'PRIMARY' at /kohadevbox/koha/C4/Installer.pm line 825
We should not insert the pref if it has been renamed already.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Bug 15516: Add ability to create and view hold groups from OPAC
This patch adds a "Treat as hold group" to opac-reserve.pl,
which lets OPAC users create a hold group which can include
1+ bibs and either bib-level holds, or item-level holds, or both.
This patch shows the item-level and bib-level holds in a hold group
for the user's holds in the OPAC. This includes both the opac-user.pl
page and the self-checkout hold display.
Bug 15516: (follow-up) Only show hold groups for multi hold in OPAC
Bug 15516: (follow-up) Only show hold groups for multi hold in staff interface
Bug 15516: Add 'DisplayAddHoldGroups' system preference to toggle ability to add titles to hold groups
These patches add the ability to create hold groups across multiple bibs in the staff interface or OPAC.
These hold groups are fulfilled by the first item checked in across the hold group.
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>
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>
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>
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>
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>
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>
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>
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>
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>