Commit graph

6627 commits

Author SHA1 Message Date
c42d73ee26
Bug 35152: DBRev 24.12.00.005
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:51 +01:00
9740f6fa5f
Bug 35152: Display 'syspref removed' success only if removed
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:50 +01:00
41a2d2edd2
Bug 35152: Convert RoutingListNote system preference to additional contents
This patch moves the RoutingListNote system preference into HTML
customizations, making it possible to have language- and
library-specific content.

To test you should have some content in the RoutingListNote
system preference before applying the patch. Apply the patch and run
the database update process.

- In the staff client, go to Tools -> HTML customizations and verify
  that the content from RoutingListNote is now stored there.
- The HTML customization entry form should offer RoutingListNote
  as a choice under "Display location."
- Update and reinstall active translations (for instance fr-FR):
  - perl misc/translator/translate update fr-FR
  - perl misc/translator/translate install fr-FR
- Enable the translation if necessary under Administration -> System
  preferences -> language.
- Edit the RoutingListNote HTML customization and add unique
  content to the "fr-FR" tab.

- Go to Serials and create a subscription if necessary.
- From the subscription detail page, click "Create routing list" in the
  left-hand sidebar.
- Add one or more recipients to the list and click "Save".
- On the "Preview routing list" page click "Save and preview routing
  slip".
- In the pop-up window with the routing list preview you should see the
  content you added to the RoutingListNote HTML customization.
- Switch to your updated translation and confirm that the content you
  added for your translation shows up correctly.
- Go to Administration -> System preferences and search for
  "RoutingListNote." It should return no results.

NOTE: This patch does not keep the default content which was stored by
the RoutingListNote system preference. Having a default value for that
kind of preference is not standard. Instead I have updated the
description of the RoutingSerials preference to add a mention of the
RoutingListNote HTML customization option.

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: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:50 +01:00
01071b2f1a
Bug 35154: DBRev 24.12.00.004
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:43 +01:00
30a2d78d53
Bug 35154: Convert StaffLoginInstructions system preference to additional contents
This patch moves the StaffLoginInstructions system preference into HTML
customizations, making it possible to have language-specific content.

To test you should have some content in the StaffLoginInstructions
system preference before applying the patch. Apply the patch and run
the database update process.

- In the staff client, go to Tools -> HTML customizations and verify
  that the content from StaffLoginInstructions is now stored there.
- The HTML customization entry form should offer StaffLoginInstructions
  as a choice under "Display location."
- Update and reinstall active translations (for instance fr-FR):
  - perl misc/translator/translate update fr-FR
  - perl misc/translator/translate install fr-FR
- Enable the translation if necessary under Administration -> System
  preferences -> language.
- Edit the StaffLoginInstructions HTML customization and add unique
  content to the "fr-FR" tab.

- View the staff interface login page. You should see the
  content you added to the StaffLoginInstructions HTML customization.
- Switch to your updated translation and confirm that the content you
  added for your translation shows up correctly.
- Go to Administration -> System preferences and search for
  "StaffLoginInstructions." It should return no results.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:43 +01:00
Nicolas Hunstein
ede69d5c5f
Bug 38471: update "Field suppresion" to "Field suppression"
updates "Field suppresion" to "Field suppression"

to test:
- go to Administration/Authority types/Default framework/Tag 090
- verify description for subfield t is Field suppresion, FSP (RLIN)

- apply patch
- reset database or reset_all
- verify description has changed to Field suppression,FSP (RLIN)

Signed-off-by: William Lavoie <william.lavoie@inLibro.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 19:19:32 +01:00
David Nind
bdcbcc0a33
Bug 38448: Fix inconsistencies in database update messages
This fixes some database update messages to improve their
consistency with the database update guidelines
https://wiki.koha-community.org/wiki/Database_updates

Test plan:
1. Apply the patch.
2. Review the differences to make sure the messages make
   sense and are consistent with the database update
   guidelines:
   2.1 Review the diff attached to the bug
   or
   2.2 Run: git show
3. Sign off D:

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Leo Stoyanov <leo.stoyanov@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 19:19:32 +01:00
368d59c9a9
Bug 33268: DBRev 24.12.00.003
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 17:59:44 +01:00
cd04d58522
Bug 33268: (QA follow-up): tidy up code
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 17:59:43 +01:00
David Gustafsson
e2c0403440
Bug 33268: If rules exists add rules to preserve current behavior
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 17:59:43 +01:00
Emily Lamancusa
deccd6eb7e
Bug 38735: Add preferred_name to default search fields for new installations
To test:
1. Attach patch first, and then start up KTD or sandbox to see the
   behavior for a new installation
2. Go to Administration > System Preferences and search for
    DefaultPatronSearchFields
3. Click to edit
--> Confirm preferred_name is checked in the modal that displays
4. Edit a patron to give them a preferred name that is different from
   their first name
5. Search for the patron by the newly set preferred_name
--> Confirm the patron correctly autocompletes and appears in the search
    results

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-27 17:33:50 +01:00
81059bfee9
Revert "Bug 17473: Add void payment permission"
This reverts commit a126d7e646.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-23 13:54:05 +01:00
f3c2d3b2f7
Revert "Bug 17473: (follow-up) add semicolon after use Modern::Perl"
This reverts commit a5fe02e614.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-23 13:54:05 +01:00
a5fe02e614
Bug 17473: (follow-up) add semicolon after use Modern::Perl
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-23 13:36:17 +01:00
Eric Garcia
a126d7e646
Bug 17473: Add void payment permission
To test:
1. Apply patch, updatedatabase, restart_all
2. Search for staff patron
3. More -> Set permissions
4. Check
    - Staff access, allows viewing of catalogue in staff interface
    - Add, modify and view patron information
    - Manage patrons fines and fee
5. Notice under Manage patrons fines and fee there is a new permission "Voiding Payments"
6. Sign into staff interface as your selected staff patron
7. Search for a non-staff patron -> Accounting
8. Click 'Create manual invoice', add an amount and click 'Save and pay' -> 'Confirm'
9. Go to transactions and notice the option to Void payment appears
10. Go back to your staff patron's permission and unselect 'Voiding Payments'
11. Go to your non-staff patron and notice the option to void payments is gone

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-23 13:36:17 +01:00
Caroline Cyr La Rose
d350979d6b
Bug 38707: Patron restriction types from installer files not translatable
This patch makes translatable the default patron restriction
types that come installed with Koha.

To test:

1) Search for "Manual restriction" in the translation files

`git grep "Manual restriction" misc/translator/po/fr-CA-installer.po`

--> No results

2) Apply patch

3) Update translations

`gulp po:update --lang fr-CA`

4) Repeat step 1

--> Manual restrictions (as well as the other restriction types
    i.e. Overdues, Suspension, Discharge, and Notice failure
    suspension) is in the .po file

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-20 18:33:26 +01:00
Mathieu Saby
30a1c4bb45
Bug 32722: Make several subfields and a field non mandatory in default UNIMARC biblio framework
801 should not be mandatory except in data exchange context (IFLA Manual)
In UNIMARC several subfields are mandatory only if the field is used.
This possibility is not available in MAR21, and Koha is currently not
able to manage this information in a useful way : it blocks the
validation of a record if the mandatory subfield is void, regardless
of the mandatory status of the field.
In consequence those subfields must be declared non mandatory in default framework.

Test plan:

1/ Open a UNIMARC Koha without patch. Try to create a record with
minimal information : 200$a and 100$a. A lot a alerts are displayed,
preventing Koha to add the record
2/ Apply the patch
3/ Run reset_all or restart KTD (to remake a fresh koha from scratch)
4/ Try to create a record with minimal information : 200$a and a 100$a.
There should only be 2 alerts, regarding 099$t and 942$c field.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-20 18:33:17 +01:00
1a4820322e
Bug 38522: (follow-up) Edit db_rev and preserve comment
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-12 16:01:35 +01:00
Emmi Takkinen
a84195d7da
Bug 38602: Do not check if columns bookings.creation_date and bookings.modification_date from information_schema
If one has multiple databases in use adding columns
bookings.creation_date and bookings.modification_date is added
just to first updated database and skipped in other updates.
This happens because we check if these columns already exist
in database from information_schema. We should instead make
this check with method column_exists.

To test:
1. Apply this patch.
3. Drop columns bookings.creation_date and bookings.modification_date:
ALTER TABLE bookings DROP COLUMN creation_date;
ALTER TABLE bookings DROP COLUMN modification_date;
2. Revert your database back to version 24.0600028:
UPDATE systempreferences SET value = "24.0600014" WHERE variable = "version";
3. Run updatedatabase.pl.
=> Check that columns were added.

If you happen to have two databases:
1. Check if you have columns in your bookings table:
SELECT DISTINCT TABLE_SCHEMA, TABLE_NAME FROM
INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME IN
('creation_date', 'modification_date');
=> Note that columns exist only in one of the databases.
2. Make sure you're using database missing columns
from booking table.
3. Apply this patch.
4. Revert back to version 24.0600028.
5. Run updatedatabase.pl
=> Check that columns were now added to database.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-05 13:57:15 +01:00
a5e3b45019
Bug 38622: Update sample patron data with preferred_name
This patch updates the sample_date, as used in koha-testing-docker, with
the new preferred_name field.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-04 16:32:48 +01:00
7c6c3e8f9c
Bug 37292: DBRev 24.12.00.002
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-03 17:34:03 +01:00
2e63ece6ae
Bug 37292: Add an index on oauth_access_tokens.expires
This patch adds a needed index to the column.

To test:
1. On a fresh KTD, run:
   $ ktd --shell
  k$ koha-mysql kohadev
   > SHOW CREATE TABLE oauth_access_tokens;
=> FAIL: There's no 'KEY' entry for the `expires` column
2. Apply this patch
3. Run:
  k$ updatedatabase
=> SUCCESS: A message tells the index was added
4. Repeat 1
=> SUCCESS: The index was actually added to the DB
5. Run:
  k$ reset_all
6. Repeat 1
=> SUCCESS: The index is created at install time too!
7. Run:
  k$ updatedatabase
=> SUCCESS: Nothing explodes, no message about index being created
8. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-03 17:34:03 +01:00
855638123e
Bug 38522: DBRev 24.12.00.001
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-03 17:34:02 +01:00
73c7acd33f
Bug 38522: update kohastructure.sql
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-03 17:34:01 +01:00
2512392b2a
Bug 38522: Increase erm_agreements.license_info length
to test:
1- try to save an agreement with 81+ characters in License Info
2- it does not save
3- apply patch, updatedatabase
4- repeat 1, it works!

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-03 17:34:01 +01:00
9fe129c76e
DBRev 24.12.00.000: Start of a new release cycle
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-03 14:36:24 +01:00
9bbb73fa26
Koha 24.11 is here!
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-25 20:38:56 +01:00
a072d5ff47
Bug 22421: Fix KEY names
There is a mismatch in KEY names.
We should use the ones auto-generated by the server, not pass specific
ones.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-25 15:07:44 +01:00
3f033e8aae
Bug 37592: Make db_rev file executable again
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-25 15:07:43 +01:00
b13f0349fd
Bug 37592: (follow-up) Fix comments in db_rev
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-25 15:07:42 +01:00
aceccc7e51
Bug 37592: (follow-up) Fix timestamp vs datetime in db_rev
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-25 15:07:42 +01:00
16d01084c1
24.11.00: Update kohastructure.sql
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-25 13:16:43 +01:00
493698bf32
24.11.00: Adjust COMMENTs in DB revs
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-25 13:16:43 +01:00
31517e506a
Bug 37592: (QA follow-up) Ensure consistent NOT NULL placement and make implicit behavior explicit
- Explicitly set `NOT NULL` constraints for `creation_date` and `modification_date` in `kohastructure.sql` to clarify the implicit behavior of `DEFAULT CURRENT_TIMESTAMP`.
- Adjusted the `modification_date` column definition in the atomic update file to place `NOT NULL` before `ON UPDATE` for consistency.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-25 13:16:42 +01:00
4e5034eb08
Bug 37592: (QA follow-up) Update db_rev to align DBIx::Class with database schema for creation_date, modification_date
- DBIx::Class appears to determine column nullability based on database metadata.
  When columns are added via `ALTER TABLE` without explicitly specifying `NOT NULL`,
  the metadata may indicate `IS_NULLABLE = "YES"`, causing DBIx::Class to generate
  `is_nullable => 1` in the schema files. This behavior might not account for the
  implicit `NOT NULL` enforcement of `DEFAULT CURRENT_TIMESTAMP`.
- Adding `NOT NULL` explicitly in the `ALTER TABLE` statements ensures the database
  metadata reflects the intended constraints, potentially resolving this issue.
- Additionally, comments in the atomic update and `kohastructure.sql` are aligned
  for consistency and clarity.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-25 13:16:41 +01:00
c0a8cf18f7
Bug 38436: Adjust DB update output
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-25 13:16:41 +01:00
1d012c39d3
Bug 38436: DBRev 24.06.00.064
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-20 19:11:51 +01:00
4e12775e4f
Bug 38436: Rename columns_settings.columnname in DB
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-20 14:01:54 +01:00
5bb6f8c1cb
Revert "Bug 38299: [DO NOT PUSH] Test dbrev"
This reverts commit 0be29ed976.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-19 09:11:25 +01:00
c654f4cb40
Bug 38299: (follow-up) (discussion) Move failure into same level
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:40 +01:00
5a5a0dbbce
Bug 38299: (discussion) Move failure into same level
This patch adds the failures in at the same level as the rest of the
revision output (i.e. indented under the specific database revision) and
uses the standard failure coloring instead of the local update_error
class.

This is a proposal and may need more work to clarify and perhaps remove
the duplicated/collected errors at the bottom of the update. Now that we
hard stop if an update fails, I'm not sure collecting errors at the
bottom makes as much sense as it once did?

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:39 +01:00
Emily Lamancusa
c79d533a04
Bug 38299: Use say_failure when printing update errors to the console
Bug 35681 added subroutines to print colored output from database
updates. Incorporate the subroutine say_failure into the error handling
in the upstream code, so that errors caught upstream can take advantage
of this new subroutine and display in red.

To test:
1. Apply patch for test dbrev
2. From the kshell, run updatedatabase
--> The messages for success, info, warning, and failure that were
    explicitly printed in the dbrev are colored, but the database error
    is not colored.
3. Apply other patches
4. Run updatedatabase again
--> All messages including the database error are now colored

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:38 +01:00
Emily Lamancusa
0be29ed976
Bug 38299: [DO NOT PUSH] Test dbrev
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-18 17:44:37 +01:00
36a387db22
Bug 36822: (follow-up) Catch MySQL 8 failure in update
We add a CAST to the fetch of 0000-00-00 dates in the database. This
prevents an error in MySQL 8.0 throws htat aborts the update.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-14 14:19:43 +01:00
cd20298738
Bug 33641: DBRev 24.06.00.063
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-14 14:19:41 +01:00
b2d02523b2
Bug 33641: (follow-up) Change return_branch to checkin_library
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-14 14:19:41 +01:00
cf8e2abd2e
Bug 33641: DB update
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-14 14:19:39 +01:00
Thibaud Guillot
9a316e042b
Bug 38434: Fix to define the same structure as kohastructure.sql
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-14 14:19:21 +01:00
2152ac1c66
Bug 38011: (QA follow-up) Improve database update output
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-12 17:50:17 +01:00
c1c19672f7
Bug 34355: DBRev 24.06.00.062
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 17:43:21 +01:00