Commit Graph

6360 Commits

Author SHA1 Message Date
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
Katrin Fischer 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
Katrin Fischer 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
Lucas Gass 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
Andrew Fuerste Henry 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
Martin Renvoize 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
Katrin Fischer 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
Tomas Cohen Arazi 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
Katrin Fischer 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
Andrew Fuerste Henry 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
Andrew Fuerste Henry 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
Katrin Fischer 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
Katrin Fischer 9bbb73fa26
Koha 24.11 is here!
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-25 20:38:56 +01:00
Jonathan Druart 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
Katrin Fischer 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
Jonathan Druart 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
Martin Renvoize 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
Katrin Fischer 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
Jonathan Druart 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
Paul Derscheid 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
Paul Derscheid 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
Jonathan Druart 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
Katrin Fischer 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
Jonathan Druart 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
Katrin Fischer 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
Jonathan Druart 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
Martin Renvoize 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
Martin Renvoize 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
Katrin Fischer 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
Nick Clemens 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
Nick Clemens 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
Martin Renvoize 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
Katrin Fischer 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
Matt Blenkinsop 28e32ee1a4
Bug 34355: (QA follow-up) Add permission marc_order_manage to govern control of account creation
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 17:43:15 +01:00
Matt Blenkinsop 6b85d06c19
Bug 34355: Add match_field and match_value to allow multiple accounts in the same file directory
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 17:43:14 +01:00
Matt Blenkinsop 30431cdebb
Bug 34355: DB schemas and atomicupdate
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 17:43:11 +01:00
Katrin Fischer bc884904e2
Bug 38394: (follow-up) Remove some more say_failure
Using a false template some more occurences of say_failure
were accidentally added. This removes them again.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 17:43:10 +01:00
Katrin Fischer 4c2149b74f
Bug 38011: DBRev 24.06.061
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 17:43:08 +01:00
Martin Renvoize 6753323d1b
Bug 38011: (QA follow-up) Improve database update
This patch ensure's we fix errant values in subscriptions prior to
adding the foreign key constraint.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 17:43:08 +01:00
Matt Blenkinsop 54cf322ad1
Bug 38011: Add a foreign key between vendors and subscriptions
Test plan:
prove t/db_dependent/Koha/Subscription.t
prove t/db_dependent/Koha/Acquisition/Booksellers.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Amended-by: Jonathan Druart
Rename $rs

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 17:43:06 +01:00
Katrin Fischer 8db1d0432f
Bug 33766: (QA follow-up) Fix spelling in system preference description and sysprefs.sql
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 15:35:35 +01:00
Katrin Fischer 8496235596
Bug 33766: DBRev 24.06.00.060
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 15:35:34 +01:00
Paul Derscheid 28eae4835f
Bug 33766: (follow-up) Fix ambiguous "Login" field
This follow-up fixes some problems w/ the unconventional
parts of the first commit. We now use conditionals in
a BLOCK to map the selected value from the preference
to string representations which should now be easily
translatable.

To test:
- Check that the label for
    - The masthead inc
    - The opac-auth template
    - The opac-main template
    - The opac-password-recovery template
    - The opac-registration-confirmation template
    - The opac-reset-password template
    - The sco-main template
  reflect the changes you made to the syspref

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 15:35:31 +01:00