Commit Graph

6334 Commits

Author SHA1 Message Date
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
Paul Derscheid cd58b70b76
Bug 33766: Fix ambiguous "Login" field
This patch introduces a new syspref 'OPACLoginLabelTextContent' which can be set
to the following values
- Cardnumber
- Username
- Cardnumber or Username

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:30 +01:00
Katrin Fischer aa925c3e11
Bug 37221: DBRev 24.06.00.059
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 14:12:15 +01:00
Owen Leonard dac0095f1d
Bug 37221: Add preference to turn off OPAC Overdrive features
This patch adds the preference "OPACOverDrive" to control whether
OverDrive features are shown in the OPAC. This allows a library to
disable OverDrive features without having to remove one or more of their
OverDrive credentials.

The patch also adds a check for the OPACOverDrive preference in the
OverDrive search results page. If OverDrive is disabled, navigating to
that page should give a 404.

To test you will need OverDrive credentials to test with.

- Apply the patch and run updatedatabase.
  - If you already had data in the OverDriveLibraryID,
    OverDriveClientKey, and OverDriveClientSecret system preferences,
    the OPACOverDrive preference will be enabled when added. If not it
    will be disabled by default.
- Rebuild the staff interface CSS
  (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)
- Go to Administration -> System preferences -> Enhanced content ->
  OverDrive.
- If necessary, enter valid credentials in the OverDriveLibraryID,
  OverDriveClientKey, and OverDriveClientSecret system preferences.
- Set OPACOverDrive to "Don't enable."

- In the OPAC perform a catalog search. Normally, if your credentials
  were correct OverDrive search results would automatically appear at
  the top of Koha's search results. Now there should be none.
- Enable the OPACOverDrive preference and repeat your search. Now
  OverDrive results should appear.
  - Confirm that the OverDrive search results page works correctly.

- Test that OverDrive circulation features are working by logging in to
  the OPAC as a user who has active OverDrive checkouts.
- Enable the OPACOverDrive and OverDriveCirculation system preferences.
- On the user's summary page there should be a tab for "OverDrive
  account."
- The tab should not appear if either OPACOverDrive or
  OverDriveCirculation is disabled.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 14:12:14 +01:00
Katrin Fischer 7712afaea9
Bug 28633: DBRev 24.06.00.058
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 14:12:11 +01:00
Nick Clemens 131ff0f402
Bug 28633: DB update
This adds the field to necessary tables and updates API and columns def
and sets preferred name to firstname

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-11 14:12:08 +01:00
Katrin Fischer c9bccdcd70
Bug 22421: DBRev 24.06.00.057
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-08 12:42:09 +01:00
Emily Lamancusa 9ab9219a10
Bug 22421: (follow-up) Improve recoverability if dbrev fails in the middle
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-08 12:42:09 +01:00
Martin Renvoize 5e1534f2d8
Bug 22421: Add missing constraints
DB update to add a new old_issue_id field to accountlines and set
foreign key constraints for both the new field and the existing issue_id
field.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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-11-08 12:42:04 +01:00
Jonathan Druart b7b0d5d3ce
Bug 38394: Remove 3 'done'
We don't want that, and it's not consistent with the other outputs.
If we don't have anything useful to say, don't say anything.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-07 16:29:20 +01:00
Jonathan Druart 4ccdb714ec
Bug 38394: Remove existing try/catch and say_failure from DB revs
On bug 37895 we have failed to propose a solution to encapsulate exceptions and rethrow them.

Until this is ready we should not try/catch and so use say_failure from our DB revs.

We want to stop the DB update process when something is wrong. In those
try/catch we are actually continuing even if something bad happens.

As RaiseError is set on the dbh, say_failure statements will never be
reached.

Test plan:
checkout origin/24.05.0
reset_all
checkout main + this patch
updatedatabase

Everything should run fine.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-07 16:29:20 +01:00
Katrin Fischer 6aa8de28c7
Bug 36822: DBRev 26.04.00.056
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-07 16:29:17 +01:00
Pedro Amorim 473f918ba8
Bug 36822: atomicupdate
Fix any existing updated_on issues

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-07 16:29:16 +01:00
Tomas Cohen Arazi f75bd50d28
Bug 35659: Use TableExists
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2024-11-01 18:11:42 -03:00
Tomas Cohen Arazi adfd70b1be
Bug 35906: (QA follow-up) Remove use of IF NOT EXISTS
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2024-11-01 18:06:08 -03:00
Tomas Cohen Arazi 9ea77b0c72
Bug 33462: Add new system preference to sysprefs.sql
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2024-11-01 09:34:38 -03:00
Katrin Fischer b8041b1eaa
Bug 33462: (QA follow-up) Fix sequence of columns for categories table in kohastructure.sql
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-31 13:23:43 +01:00
Katrin Fischer f3da8ccbd7
Bug 33462: DBRev 24.06.00.055
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-31 13:23:42 +01:00
Sam Lau ebb1591aa8
Bug 33462: (Follow up) Fix Perl Tidy
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-31 13:23:40 +01:00
Sam Lau dd9e387b68
Bug 33462: DB Updates
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-31 13:23:38 +01:00
Katrin Fischer d37910476f
Bug 35570: DBRev 24.06.00.054
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-31 08:05:29 +01:00
Pedro Amorim f78ff827e4
Bug 35570: (QA follow-up): Rebase on final state of bug 35681
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-31 08:05:24 +01:00
Pedro Amorim d3835cc4da
Bug 35570: (QA follow-up): Follow QA script on Standard backend
Make QA script green, fix:
- Variables declared in condition
- Use of DateTime->now should certainly be replaced with dt_from_string (bug 24840)
- missing_filter
- forbidden pattern: Do not use line breaks inside template tags (bug 18675)
- Attribute type should not be used for script tags (bug 20053)
- File must have the exec flag
- forbidden pattern: trailing space char
- valid_template: /shared-includes/custom_fields.inc: not found

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-31 08:05:22 +01:00
Pedro Amorim 033e154fdf
Bug 35570: Atomicupdate
Move stuff out of 'FreeForm' into 'Standard'

This atomicupdate will printout the changes it made, if any.
It will also print out the report IDs of reports that may contain occurrences of 'FreeForm'.
This is to give the sys admin the chance to fix those reports before users.

To test, empty k-t-d:
1) Run updatedatabase, notice nothing happens
2) Install FreeForm, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
3) Create a new 'FreeForm' ILL batch (requires a metadata enrichment plugin like https://github.com/PTFS-Europe/koha-plugin-api-pubmed)
4) Add '123' to the pubmedid list of identifiers and finish creating the batch
5) Upon creating the batch, you will now have 1 request, 1 batch and a few illrequestattributes in the 'FreeForm' backend
6) Run the updatedatabase again, notice the print outs.
7) Create a saved sql report like:
'Select * from illrequests where backend="FreeForm";'
8) Run the updatedatabase again, notice you get a warning for the above report

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-31 08:05:20 +01:00
Katrin Fischer 93d7ae2792
Bug 37511: DBRev 24.06.00.053
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-30 11:57:28 +01:00
Janusz Kaczmarek 88133aaec5
Bug 37511: DB changes
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-30 11:57:25 +01:00
Katrin Fischer 884ab524fa
Bug 35305: (QA follow-up) XSLT is an abbrevation and sort sysprefs.sql alphabetically
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-30 07:47:51 +01:00