Commit Graph

339 Commits

Author SHA1 Message Date
Pedro Amorim 4da60d1669
Bug 38441: (QA follow-up): Hackfest feedback
This commit addresses all Hackfest QA related feedback:
1) Update of all strings that required update, including UI messages and
   sys pref description
2) Moved the history check information from staffnotes to its own
   pipe-separated illrequestattribute 'historycheck_requests'
3) Fix display of ILL request information on the history check screen
   (Staff), including proper label naming (e.g. branchcode -> library),
show status description instead of code, uppercase labels.
4) Updated OPAC display to match Staff UI's display of matching history
   requests
5) Removed ISSN criteria for matching requests check
6) Update tests accordingly

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:42 +02:00
Pedro Amorim 35e3cb5476
Bug 38441: New 'ILLHistoryCheck' system preference
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:33 +02:00
Jonathan Druart a82f7d19cb
Bug 39325: Adjust DB
We need to adjust kohastructure.sql, sysprefs.sql and the DB itself.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:26 +02:00
Kyle Hall f348296e9c
Bug 32034: Add new syspref 'TransferLog'
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 18:35:02 +02:00
Pedro Amorim 1b38af132e
Bug 36197: Add ILLOpacUnauthenticatedRequest sys pref
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>
2025-04-25 08:46:59 +02:00
Katrin Fischer 5be7a215a6
Bug 33473: (QA follow-up) Fix alphabetic ordering of sysprefs.sql
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 08:46:44 +02:00
PerplexedTheta 1fb771c2a1
Bug 33473: Rename UseEmailReceipts to AutomaticEmailReceipts
This bug will rename the UseEmailReceipts to AutomaticEmailReceipts, to
make it clearer the purpose of this syspref. This is because the receipts
dropdown is no longer conditional, and will always show, even if
AutomaticEmailReceipts is switched off.

To test (steps a-e before applying patch):
a)  search sysprefs for 'EmailReceipts'
    1)  note the name is currently 'UseEmailReceipts'
    2)  enable this syspref
b)  go to members/maninvoice.pl?borrowernumber=51
    1)  enter an amount (e.g. 100)
    2)  save & pay, confirm
c)  go to members/boraccount.pl?borrowernumber=51
    1)  note that the receipt dropdown is visible
d)  go to members/notices.pl?borrowernumber=51
    1)  note that a receipt was automatically sent
e)  apply the patch, upgrade the db schema
f)  search sysprefs for 'EmailReceipts'
    1)  note the name is now 'AutomaticEmailReceipts'
g)  go to members/maninvoice.pl?borrowernumber=51
    1)  enter an amount (e.g. 100)
    2)  save & pay, confirm
h)  go to members/boraccount.pl?borrowernumber=51
    1)  note that the receipt dropdown is no longer visible
i)  go to members/notices.pl?borrowernumber=51
    1)  note that a receipt was automatically sent again
j)  disable the 'AutomaticEmailReceipts' syspref
k)  go to members/memberentry.pl?op=edit_form&destination=circ&borrowernumber=19
    1)  add a valid email address
k)  go to members/maninvoice.pl?borrowernumber=51
    1)  enter an amount (e.g. 100)
    2)  save & pay, confirm
l)  go to members/boraccount.pl?borrowernumber=51
    1)  note that the receipt dropdown is now visible
m)  go to members/notices.pl?borrowernumber=51
    1)  note that a receipt was NOT automatically sent
n)  go to members/boraccount.pl?borrowernumber=51
    1)  on any account line where a payment is made, click receipts > email
o)  go to members/notices.pl?borrowernumber=51
    1)  confirm a manual notice has been generated
p)  make coffee & have a mini disco

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 08:46:43 +02:00
Thomas Klausner 6ac7938293
Bug 38694: (follow-up) Rename syspref from ESBoostFieldMatch to ElasticsearchBoostFieldMatch
to keep the syspref names consistent with the existings values. Also "ES" is not as self-documenting as "Elasticsearch".

No code change, so the test plan stays the same.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 08:46:42 +02:00
Nick Clemens 1aca9ec140
Bug 38694: Add ESBoostFieldMatch option to Elasticsearch
What this patch does is:
1 - Wraps the existing search code in a a "bool" compound query as a "must". This should not affect
    relevancy or results of the existing searches.
2 - Before we clean/truncate terms, loop through the passed in search terms and indexes to build a
    new 'should' query, using the 'match' on the specified index/field that is added to the 'bool' query from above.
    This means that if a result from the original query is also returned here, that item will be boosted in the result.
    For searches on 'keyword' or 'title', or if no index is set, we use 'title-cover' as the most narrow form of title

This query isn't going to help when users enter CCL (i.e. ti:To die for) and it won't boost titles from 505, series, etc
when doing a general search. Nor will it have a detrimental effect, it will only boost field matches

To test:
1 - Add a record with
    245 $a novel
2 - Add a record with
    245 $a A novel : $b about things / $c by me
3 - Search for: novel
    - Above records are returned lower in the list (results #6 and #14 for me)
4 - Search for: a novel
    - Above records are returned lower in the list (results #6 and #14 for me)
5 - Apply patch, restart all, enable ESBoostFieldMatch option
6 - Repeat searches, note exact titles are boosted
    - For 'novel' record from #1 is #1 result and other is second
    - For 'a novel' record form #2 is #1 result and other is third
7 - Disable the new pref and repeat steps 3 and 4 and get results as before patch
8 - Experiment with other searches, turning pref on and off to verify relevant titles are boosted when enabled
9 - Search results when disabled should return as before the patch

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 08:46:41 +02:00
Matthias Meusburger 4dd5b2a891
Bug 38142: Choose language to report from authority to bibliographic record.
Currently, when reporting authority field to the bibliographic records,
the merge function uses the first matching authority field.

However, authorities can provide multiple versions of the same field, with
different languages, identified by a code in the $7 field.

French reference for languages codes for example, but any code system could be
used:
https://documentation.abes.fr/sudoc/formats/unmb/DonneesCodees/CodesZone104.htm#$d

This patch introduces the LanguageToReportOnMerge system preference, which
allows to specify a language code.

When set, if there is an authority field with the given language code, it will
be used to report to the bibliographic record.

If the system preference is not set, or there is no matching field, the default
behavior will apply: the first field will be used.

The $7 in the authority field can be in a short or long form:

 - the short form is 2 characters long. Example: ba
 - the long form is 8 characters long, with the short form in position 5 and 6
   (starting from 1). Example: ba0yba0y

Test plan:
----------

1) Edit the 'Personal Name' authority type framework to make the 100 field
repeatable

2) Add an authority with several languages, like this (the order is important):

100    _7ba0yda0y
       _a伊東豊雄
100    _7ba0yba0y
       _aItō

3) Add a bibliographic record linked to that authority.
(Click on the "tag editor" icon next to the 100$a field in the bibliographic record to
 search for the authority, then Search main heading ($a only): contains Itō)

Note that you can choose which version you want when searching for the
authority, under the "Get it!" column

For this example, choose the latin version: Itō

You should now have this in your bibliographic record:
100    _aItō
       _92646

4) Edit the authority, you don't have to change anything, just edit and save.
Note that your bibliographic record now looks like this:

100    _7ba0yda0y
       _a伊東豊雄
       _92646

The first 100 field of the authority has been reported back to the bibliographic
record, regardless of what you chose when selecting the authority.

5) Apply the patch, set the LanguageToReportOnMerge system preference to: 'ba'

6) Edit the authority again, and check that your bibliographic record now looks
like this, according to the system preference:

100    _7ba0yba0y
       _aItō
       _92646

7) Edit the authority again, but set the $7 of the latin field to its short
form:

100    _7ba0yda0y
       _a伊東豊雄
100    _7ba
       _aItō

8) Check that the bibliographic record still has the latin field reported:

100    _7ba
       _aItō
       _92646

9) prove koha/t/db_dependent/Authority/Merge.t

10) Sign-off :)

Sponsored-by: ENSA

Works smoothly, both with UNIMARC/MARC21
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-25 08:46:38 +02:00
David Gustafsson 833ad77a8f
Bug 39171: Rename IS02709 ElasticsearchMARCFormat to base64ISO2709
To test:
1) Apply patch
2) Make sure tests in t/db_dependent/Koha/SearchEngine/Elasticsearch.t
   pass

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-22 08:46:51 +02:00
David Cook d53f82ce88
Bug 39374: Database changes
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-22 08:46:40 +02:00
Pedro Amorim c083d6e690
Bug 35604: Multiple QA followups
Multiple fixes:
- File permmissions
- Capitalization
- Translatability
- Use of console.log
- Atomic update description typo fix
- Remove occurrences of 'auto' and 'automatic':
  User testing reported that making a UI distinction between 'regular' and 'automatic' ILL requests is redundant.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-14 08:51:09 +02:00
Pedro Amorim bb2c069874
Bug 35604: New AutoILLBackendPriority sys prefs
Sponsored-by: NHS England
Sponsored-by: PTFS Europe Ltd
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-14 08:51:04 +02:00
Janusz Kaczmarek a224711e77
Bug 38729: Add new systempreference 'LinkerConsiderDiacritics'
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-14 08:50:56 +02:00
Janusz Kaczmarek ebba76f1b7
Bug 38494: (follow-up) Text amendments clarifying that it is about MARC21 records
Refers to ConsiderHeadingUse and ShowHeadingUse systempreferences.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-20 17:23:07 +01:00
Janusz Kaczmarek 70138465cd
Bug 38494: Add 'ConsiderHeadingUse' system preference
Add new system preference 'ConsiderHeadingUse' to be able to consider
the intended use of authority records (008/14-16) during cataloging
and linking.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-20 17:23:05 +01:00
Lucas Gass 8c8c480db0
Bug 38615: Add ability to set hold cancellation request via SIP
To test:
1. APPLY PATCH, updatedatabase, restart_all
2. Search for the new system preference HoldCancellationRequestSIP, it should be set to 'Don't'. Leave it as is.
3. Make some holds, either in the staff client of via SIP.
    -/kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1 -sp term1 -m hold --patron 23529000035676 --item 39999000001310 --hold-mode +

4. Mark the hold as waiting.
5. Cancel it via SIP:
    -/kohadevbox/koha/misc/sip_cli_emulator.pl -a localhost -p 6001 -l CPL -su term1 -sp term1 -m hold --patron 23529000035676 --item 39999000001310 --hold-mode -

6. The hold is cancelled like normal, the screen msg should be "Hold Cancelled."
7. Change HoldCancellationRequestSIP to 'Do'.
8. Do steps 3-5 again.
9. Now the screen message is 'Hold Cancellation Requested.'
10. Now check Holds awaiting pickup. In the "Holds with cancellation requests" tab you should now see the hold from step 8.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-17 08:21:26 +01:00
Katrin Fischer 94fdb27695
Bug 39200: (follow-up) Move intranet_includes in sysprefs.sql
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:30 +01:00
Emily Lamancusa 00fb10aaea
Bug 39200: Fix syspref order
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:30 +01:00
Emily Lamancusa 606cd8d63e
Bug 38108: (QA follow-up) Use say_success in dbrev
Use say_success instead of say when outputting a line that the
system preference was added successfully

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:27 +01:00
Lucas Gass 9a55785c8b
Bug 38108: Add system preference AlwaysShowHoldingsTableFilters
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-26 13:16:26 +01:00
jeremy breuillard fbdc4132ea
Bug 35028: Add self-registrations alert on staff interface main page
This adds a new system preference PatronSelfRegistrationAlert to enable
or disable alerts (disabled by default)

Test plan:
1. Create patron category SELFREG
2. Enable PatronSelfRegistration and set
   PatronSelfRegistrationDefaultCategory to SELFREG and
   PatronSelfRegistrationAlert to "Show"
3. Go to OPAC, logout if needed, and create a new account. Remember the
   value you set for home library.
4. Go to staff interface, set the current library to the one you set in
   step 3.
5. Go to the staff interface main page. You should see at the bottom a
   message saying "Self-registrations from: All libraries: 1 /
   <CURRENT LIBRARY>: 1" (numbers can vary if you already had
   self-registered patrons)
6. Click on both links and verify that it shows the correct patrons (or
   redirect to the patron detail page if there is only one)
7. Set the current library to another one (one that doesn't have
   self-registered patrons)
8. Go to the staff interface main page. You should see at the bottom a
   message saying "Self-registrations from: All libraries: 1"
   (numbers can vary if you already had self-registered patrons)
9. Click on the link and verify that it shows the correct patrons (or
   redirect to the patron detail page if there is only one)

Co-authored-by: Fridolin Somers <fridolin.somers@biblibre.com>
Co-authored-by: Julian Maurice <julian.maurice@biblibre.com>
Sponsored-by: Écoles nationales supérieures d'architecture (ENSA)
Signed-off-by: William Lavoie <william.lavoie@inLibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-03 14:27:02 +01:00
Nicolas Hunstein d8c5e63ec7
Bug 31270: Terminology - use "self-registration"
Standardize on the use of "self-registration" (and variations)
for consistency in the OPAC and staff interface, instead of
"self registration".

Test plan:
1. Check the codebase for occurences of "self reg":
   . git grep "self reg"
   . git grep "selfreg"
   . git grep "Self reg"
   . git grep "Selfreg"
2. Note the occurences, excluding code comments, previous
   database updates, and previous release notes.
3. Search the system preferences for "self reg" and "selfreg".
4. Note the occurences in the results for the system preference
   descriptions (excluding system preference names) for:
   - PatronSelfRegistrationDefaultCategory
   - PatronSelfRegistrationEmailMustBeUnique
   - PatronSelfRegistrationLibraryList
   - PatronSelfRegistrationPrefillForm
5. Note the system preferences category heading for the OPAC
   - "Self registration and modification".
6. Apply the patch.
7. Repeat steps 1 to 5. There should now be no occurences
   (excluding code comments, previous database updates, and
   previous release notes).

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-31 15:57:36 +01:00
Owen Leonard 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
Owen Leonard 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
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
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 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
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
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
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 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
Fridolin Somers dec81e0968
Bug 35305: Add XSLT for authority details page in staff interface
This adds a new system preference 'AuthorityXSLTDetailsDisplay'.
If set, authority MARCXML will be transformed using the XSLT
at the given filename or URL.
The HTML output will be displayed in place of tabs in details page.

The syspref value can contain {langcode} and {authtypecode} which will
be replaced by the appropriate value (resp. current language and
authority type code).

Test plan:
1) Apply patch and run updatedatabase
2) Search for an authority type GEOGR_NAME and view details page
3) Verify that display is not affected yet
4) Create an XSLT file (for example in /home/koha/xslt/en/GEOGR_NAME.xsl)
5) Set 'AuthorityXSLTDetailsDisplay' system preference to :
   /home/koha/xslt/{langcode}/{authtypecode}.xsl
6) Refresh details page
7) Verify that display matches what you expect from the XSLT
8) Set 'AuthorityXSLTDetailsDisplay' system preference to :
   <path to sources>/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCauthDetails.xsl
8) Refresh details page
9) Verify that display matches what you expect from your XSLT

Example of a minimal XSLT:

<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
 xmlns:marc="http://www.loc.gov/MARC21/slim"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output omit-xml-declaration="yes"/>
  <xsl:template match="marc:record">
    <xsl:element name="div">
      <xsl:attribute name="class">
        <xsl:text>authority-summary</xsl:text>
      </xsl:attribute>
      <xsl:value-of select="marc:datafield[@tag='151']/marc:subfield[@code='a']"/>
    </xsl:element>
  </xsl:template>
</xsl:stylesheet>

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-10-30 07:47:49 +01:00
Tomas Cohen Arazi 7346d003e2
Bug 14180: (QA follow-up) Re-arrange sysprefs to fix QA warnings
Not strictly related to this patchset, but showed up here.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-30 07:47:46 +01:00
Lucas Gass d9bd67f6cc
Bug 14180: Add AlwaysLoadCheckoutsTable system preference
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-30 07:47:45 +01:00
David Cook 1f5d8f0aef
Bug 35659: (QA follow-up) Update syspref description to be a sentence
Sponsored-by: Association KohaLa - https://koha-fr.org/
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-28 14:01:34 +01:00
Matthias Meusburger d2367657b2
Bug 35659: OAI Harvester
Test plan:

 - Run updatedatabase.pl

 - Apply the DBIC update patch

 - Setup an OAI repository in Administration -> OAI repositories (admin/oaiservers.pl)

   If the repository dataformat is in oai_dc, you can use the sample XSLT files:
   For Unimarc:
   OAIDCtoUNIMARCXML.xsl for bibliographic records
   AuthOAIDCtoUNIMARCXML.xsl for authorities

   For Marc21:
   OAIDCtoMARC21XML.xsl for bibliographic records
   AuthOAIDCtoMARC21XML.xsl for authorities

   If the repository dataformat is in marc-xml, you can use
   OAIMarcxml2KohaMarcxml.xsl for both Unimarc and Marc21.

 - Some repositories to test with:

   Bibliographic records, oai_dc:
   Endpoint: http://staroai.theses.fr/OAIHandler
   Set: ddc:260
   XSLT: <path_to_src>/koha-tmpl/intranet-tmpl/prog/en/xslt/OAIDCtoUNIMARCXML.xsl
   or
   XSLT: <path_to_src>/koha-tmpl/intranet-tmpl/prog/en/xslt/OAIDCtoMARC21XML.xsl

   Authorities, oai_dc:
   Endpoint: https://www.idref.fr/OAI/oai.jsp
   Set: a
   XSLT: <path_to_src>/koha-tmpl/intranet-tmpl/prog/en/xslt/AuthOAIDCtoUNIMARCXML.xsl
   or
   XSLT: <path_to_src>/koha-tmpl/intranet-tmpl/prog/en/xslt/AuthOAIDCtoMARC21XML.xsl

   Authorities, marc-xml, Unimarc:
   Endpoint: https://www.idref.fr/OAI/oai.jsp
   Set: a
   XSLT: <path_to_src>/koha-tmpl/intranet-tmpl/prog/en/xslt/OAIMarcxml2KohaMarcxml.xsl

 - Note: marc-xml harvesting will not work with HTTP::OAI::Harvester version 3.xx
   Version 4.xx is needed.
   See Bug 17704 for updating Koha default version to 4.xx

 - If you want to receive a report email, fill the OAI-PMH:HarvestEmailReport
   syspref. The model used (OAI_HARVEST_REPORT) can be edited in tools -> Notices and slips.

 - start a harvest with the following command:
   misc/cronjobs/harvest_oai.pl

    This script starts an OAI Harvest

    This script has the following parameters :
        -h --help: this message
        -v --verbose (enable output to stdout)
        -r --repository: id of the OAI repository
        -d --days: number of days to harvest from (optional)
        -l --list: list the OAI repositories
        -f --force: force harvesting (ignore records datestamps) (optional)

    Example: misc/cronjobs/harvest_oai.pl -r 1 -d 10 -v -f

 - Check the logs in the Log Viewer (tools/viewlog.pl)
   (CronjobLog syspref must be activated)

Sponsored-by: KohaLa
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Sponsored-by: Association KohaLa - https://koha-fr.org/
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-28 14:01:27 +01:00
Martin Renvoize db6cce8852
Bug 35906: Remove preference and add override handling
This patch updates the bookable nature of items to allow setting at the
itemtype level and then overriding that setting at item level should you
so wish to do so.

We also now properly handle the item_level-itypes preference such that
we look at item or biblioitem level appropriately.

Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-25 15:34:41 +02:00
Thibaud Guillot 39891095a6
Bug 35906: Add bookable option on itemtype
Actually new "booking" feature can be set on an item but no directly on
an itemtype. This patch adds this possibility.

Test plan:
1) Test this new feature on an item as it were currently working.
2) Apply this patch
3) Run updatedatabase.pl
4) Reload Schema by running update_dbix_class_files.pl
5) Change new syspref 'item-level_booking' to 'itemtype'
6) Edit an itemtype, there is a new checkbox to add 'bookable' option
7) Test it with item with this itemtype, if there is 1 item at least you
   will see 'Booking' tab.
8) You can change syspref to 'item' to see the current behavior

Note: When item-level_booking is set on 'itemtype' you can change
dropdown option to 'No' on item bookable option.

Sponsored by: Association de Gestion des Œuvres Sociales d'Inria (AGOS)
Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-25 15:34:40 +02:00
Kyle M Hall d8fc079eee
Bug 28833: Speed up holds queue builder via parallel processing
The holds queue builder can take a very long time to run on systems with many holds. For example, a partner with 124,784 unfilled ( not found ) holds, is taking about 64 minutes to run. If we run that same number of holds in 5 parallel chunks ( splitting the number of records as evenly as possible, but *not* taking into account the holds per bib ), it takes 21.5 minutes. If we use 10 loops, it takes less then 14 minutes.

Test Plan:
0) Install the Perl library Parallel::ForkManager
1) Generate a huge number of holds ( a few thousand at the minimum )
2) Run the holds queue builder, use the `time` utility to track how much
   time it took to run
3) Set HoldsQueueParallelLoopsCount to 10
4) Repeat step 2, note the improvement in speed
5) Experiment with other values for HoldsQueueParallelLoopsCount
6) prove t/db_dependent/HoldsQueue.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-25 11:09:53 +02:00
Alex Buckley 3e984446ca
Bug 23295: Automatically restrict (debar) patrons when email/sms notices fail
When the 'RestrictPatronsWithFailedNotices' syspref is enabled then
patrons with email and sms notices which failed sending (have a
message_queue.status field of 'failed') have a restriction (debarment)
applied to them.

Test plan:
1. In the Koha staff client > Tools > Overdue notice/status triggers and
create the 'First' rule for all patron categories as:

Delay: 1
Letter: Overdue Notice
SMS: ticked

Ensure you have an SMS notice for the ODUE letter.

2. In the system preferences make sure you enter dummy data into the
SMSSendUsername, SMSSendPassword and EmailSMSSendDriverFromAddress
sysprefs

2. Find two non-debarred patrons and make sure they have invalid SMS numbers set. The SMS numbers must be INCORRECT, for example "123" as an SMS number. Leaving this field empty will result in the message_transport_type defaulting to 'print' instead of 'sms'.

3. Check one item out to each patron in step 2

4. Jump into the database and run the query:

UPDATE issues SET date_due=<2 days before current date> WHERE
borrowernumber=<borrower1>;

UPDATE issues SET date_due=<2 days before current date> WHERE
borrowernumber=<borrower2>;

5. Go to  misc/cronjobs directory and enter the Koha shell:

sudo koha-shell <instancename>

6. Run: ./overdue_notices.pl

7. Exit the shell and jump back into the database and run the query:

SELECT message_transport_type, status FROM message_queue WHERE
borrowernumber=<borrower1> OR borrowernumber=<borrower2>;

8. Confirm both new notice records have the message_transport_type is 'sms' and the status of 'pending'

9. Exit the database and re-enter the Koha shell and run the command:
./process_message_queue.pl

10. Jump back into the database re-run the query from step 7 and confirm
the status is 'failed' for both

11. Also run the query:
SELECT * FROM borrower_debarments WHERE borrowernumber=<borrower1> OR
borrowernumber=<borrower2>;

Notice there is no added debarment to these two patrons

12. Apply patch, restart memcached and plack. In the
installer/data/mysql directory enter the Koha shell and run the command:
./update_database.pl

13. In the Administration > Global System Preferences interface of the
staff client notice there is a new system (set to "Don't" by default)
named 'RestrictPatronsWithFailedNotices'.

Enable it (i.e. select 'Do')

14. Create a new file in the /etc/cron.daily directory named koha-custom and
add the following line to it:

koha-foreach --chdir --enabled
/usr/share/koha/bin/cronjobs/restrict_patrons_with_failed_notices.pl

15. In the  misc/cronjobs directory enter the Koha shell and run the command:
./restrict_patrons_with_failed_notices.pl

16. The script should output text saying: There are borrowers with
failed SMS or email notices

However because you haven't given the script the argument -c it won't
apply debarments (restrictions) to any of the patrons with the failed
SMS or email notices.

16. Query the borrower_debarments table:

SELECT * FROM borrower_debarments WHERE borrowernumber=<borrower1> OR
borrowernumber=<borrower2>;

Notice they still have no restriction

17. Now in the Koha shell run the command:
./restrict_patrons_with_failed_notices.pl -c

18. Notice the script outputs the text:
There are borrowers with failed SMS or email notices
Applying restriction to patron <borrowernumber>: <borrower firstname>
<borrower surname>;

19. Repeat step 16 and notice both patrons now have 1 restriction each
with the borrower_debarments.type=SUSPENSION and comment=SMSnumber
invalid and expiration=NULL

20. Query the borrowers table:
SELECT debarred, debarredcomment FROM borrowers WHERE
borrowernumber=<borrower1> OR borrowernumber=<borrower2>;

21. Notice the values are:
debarred= 9999-12-31
debarredcomment= SMS number invalid

22. Repeat step 17 and notice the script outputs:
There are borrowers with failed SMS or email notices

Patron <borrowernumber>: <borrower firstname> <borrower surname> is currently restricted due to having an invalid SMS number. No new restriction applied"

23. Repeat step 16 and notice no new debarment has been added to those
borrowers as they have already been restricted from having a failed SMS
notice.

24. In the Koha home directory run the command:
prove t/db_dependent/Koha/Notices.t

This unit test contains the tests for the new subroutines added to
Koha/Notice/Message.pm which are restrict_patron_when_notice_fails() and
get_failed_notices()

25. All tests should pass

26. Sign off

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-24 10:45:38 +02:00
Matt Blenkinsop 51a81e6eb3
Bug 28575: Add new syspref 'NoRefundOnLostFinesPaidAge'
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-10-24 10:45:33 +02:00
Janusz Kaczmarek 6ae9044230
Bug 36798: Add 'SearchCancelledAndInvalidISBNandISSN' system preference
This patch adds a new system preference SearchCancelledAndInvalidISBNandISSN:
whether to search for cancelled / invalid forms of ISBN/ISSN
when performing ISBN/ISSN search. (By default, with ES, only valid forms,
i.e.  020 $a / 022 $a are considered).

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-10-21 12:26:11 +02:00
Tomas Cohen Arazi 462ba73700
Bug 35655: Add 'JobsNotificationMethod' system preference
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-09-30 15:30:52 +01:00
Marcel de Rooy 073de2c2ea
Bug 23685: (follow-up) Dbrev for new preferences
Test plan:
Run updatedatabase.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-27 18:00:28 +02:00
Tomas Cohen Arazi 79ffb8841b
Bug 37757: Update EmailFieldPrimary value
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-09-13 16:06:23 +02:00
Doris Tam e086eda769
Bug 27490: Update systempreference 'language' to 'StaffInterfaceLanguages'
Test plan

1. Go to the staff client
2. Go to administration
3. Search systempreferences for 'StaffInterfaceLanguages'
4. Ensure there is a systempreference variable matching 'StaffInterfaceLanguages'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nicolas Hunstein <nicolas.hunstein@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-13 13:54:25 +02:00
Laura_Escamilla d9b857ecc0
Bug 34185: Capitalized OPAC in OpacItemLocation syspref
To test:
1. In K-T-D git grep for “OpacItemLocation”
    1. Notice that related XSLT / XSL scripts are not coming up. Only .pm, .pl and .sql scripts.
2. Git grep for “OPACItemLocation”. Note that XSLT/XSL files show up but not the .pm, .pl and .sql scripts.
3. Apply the patch. Updatedatabase. Restart_all
4. Git grep for “OPACItemLocation”
    1. Notice that both the XSLT/XSL files in addition to the .sql, .pm and .pl scripts are now showing up.
5. Sign off and have a spectacular day :D

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-02 12:13:43 +02:00
Sam Lau 5b9bcb5a67
Bug 20411: Remove StaffDetailItemSelection system preference
This patch removes the 'StaffDetailItemSelection' along with any usages of it. Now, the checkboxes on an item details page are always there.

To test:
1) Apply patch, restart_all, updatedatabase
2) In sys prefs, search for 'StaffDetailItemSelection', nothing should show up.
3) Visit an items details page, make sure there are checkboxes next each item that allow you to perform modification/deletion.

Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-26 17:39:46 +02:00