koha.git
4 weeks agoBug 31097: Added more restrictions info
Philip Orr [Thu, 18 Apr 2024 15:41:33 +0000 (15:41 +0000)]
Bug 31097: Added more restrictions info

Added more info to the restrictions message
in circulation as well as to the OPAC display
in "Your account" and to the display of
restriction messages when trying to place a
hold in the OPAC.

To Test:
1. Before applying patch, set system preference
"PatronRestrictionTypes" to "Allow"
2. Go to Administration -> Patron restriction types
3. Add some restriction types, make sure you
fill out both "Code" and "Label"
4. Go to any patron and add one or more of each
restriction type
4a. Make sure that you add some with an
expiration date and some without
4b. Make sure you add some with a comment and
some without
5. Go to that patron's checkout page
6. Notice that only the comments of the
restrictions are displayed and not all info
is displayed
7. Apply the patch
8. Reload the page
9. Notice the restriction types are now
displayed correctly
10. Notice the colon is only displayed
if there is a comment
11. Notice the expiration date is also displayed
12. Open the OPAC and log in with that user
(or if you want to log in with your own user:
 make sure they have all the restrictions
 mentioned above as well)
13. Go to "Your account" in the OPAC
14. Notice the display of restrictions
15. Try to place a hold on any record
16. Notice the display of restrictions

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 31097: Display restriction types
Philip Orr [Thu, 18 Apr 2024 09:37:59 +0000 (09:37 +0000)]
Bug 31097: Display restriction types

This patch changes the display of patron
restrictions in checkout and patron details
pages to show the restriction type for each
restriction. It also changes the display so
each restriction is shown on a newline.

To test:
1. Before applying patch, set system preference
"PatronRestrictionTypes" to "Allow"
2. Go to Administration -> Patron restriction types
3. Add some restriction types, make sure you
fill out both "Code" and "Label"
4. Go to any patron and add one or more of each
restriction type
5. Go to that patron's checkout page
6. Notice that only the comments of the
restrictions are displayed
7. Apply the patch
8. Reload the page
9. Notice the restriction types are now
displayed correctly

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36701: Adjust confirmation to hide empty div
Emily Lamancusa [Thu, 25 Apr 2024 18:58:31 +0000 (14:58 -0400)]
Bug 36701: Adjust confirmation to hide empty div

To test:
1. Place a hold on any bib record
2. Cancel the hold by clicking the trash can icon next to it
--> Note that there is an empty red page section in the modal
3. Apply patch and refresh the page
4. Repeat steps 1-2
--> No empty red page section
5. Confirm that the test plan from bug 33174 still works

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36534: Batch operations when using limit in report
Katariina Pohto [Thu, 2 May 2024 11:27:06 +0000 (14:27 +0300)]
Bug 36534: Batch operations when using limit in report

When report results number exceeds the result per page limit, batch
operations link reads "Batch operations with (page limit) records" even
if there are more or less shown records (more when using limit in SQL or
less in the last page of result). This patch fixes the link text to
actual shown records.

To test:
1) Create a report of items with a limit of e.g., 26.
2) Run report.
3) See that number of results shown exceeds 20 but the link says "Batch
   operations with 20 visible records".
4) See that the second page shows 6 results but the link is still for 20
   records.
5) Apply patch.
6) Run report again.
7) See that the link texts will show correctly 26 records on the first
   page and 6 records on the second.

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>
4 weeks agoBug 36757: Sync concerns tables
Martin Renvoize [Tue, 7 May 2024 08:45:56 +0000 (09:45 +0100)]
Bug 36757: Sync concerns tables

This patch re-syncs the two catalog concerns display tables markup. We
add the 'Title' field into the catalog/detail version of the table and
split the columns settings so you can control the table distinctly from
the cataloguing module version so we can hide 'title' by default in the
details display tab.

This results in the table matching the display from the cataloguing
module page, i.e. the assignee and status detail displays.

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36687: DBIC schema update
Katrin Fischer [Wed, 8 May 2024 14:39:03 +0000 (14:39 +0000)]
Bug 36687: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36687: DBRev 23.12.00.050
Katrin Fischer [Wed, 8 May 2024 14:36:52 +0000 (14:36 +0000)]
Bug 36687: DBRev 23.12.00.050

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36687: Update itemtypes.notforloan to not allow NULL values and change to tinyint(1)
Lucas Gass [Wed, 24 Apr 2024 17:05:18 +0000 (17:05 +0000)]
Bug 36687: Update itemtypes.notforloan to not allow NULL values and change to tinyint(1)

To test:
1. Have some itemtypes.notforloan values set to NULL.
2. APPLY PACTH, updatedatabase, restart_all
3. When you updatedatabase those values should be set to 0.
4. Try updating an itemtypes.notforloan value to NULL. You cannot.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 34263: (QA follow-up): Use flatpickr .clear instead
Pedro Amorim [Fri, 3 May 2024 14:22:13 +0000 (14:22 +0000)]
Bug 34263: (QA follow-up): Use flatpickr .clear instead

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 34263: Suspending holds consecutively populates previously used date falsely
Katariina Pohto [Thu, 2 May 2024 13:09:39 +0000 (16:09 +0300)]
Bug 34263: Suspending holds consecutively populates previously used date falsely

Suspending a hold doesn't clear the date from the date picker. When another hold is suspended
the previously used date will show on the date picker but the value is not set on the hold.
Suspending the hold will suspend it indefinitely. Also the link "Clear date to suspend indefinitely"
will not clear the date picker. This patch will make both the Suspend button and the Clear date link
clear the dates from both the date picker and the variable passed on, making the suspending consistent
with what is seen on the date picker.

Test plan:
1) Place 3 holds on a patron.
2) Suspend a hold and set a date for it.
3) Suspend a second hold and notice the previously used date is shown on the date picker.
   Note that the hold will be suspended indefinitely.
4) Open the suspending window for the third hold and pick a date. Click "Clear date to suspend indefinitely"
   and note the date picker doesn't get cleared. The hold will be suspended indefinitely.
5) Apply patch.
6) Suspend a hold and set a date for it.
7) Suspend a second hold and notice the date picker does not have a preset date.
8) Pick a date and clear it with the "Clear date to suspend indefinitely link".
   See that the date picker also gets cleared.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 weeks agoBug 36786: (Bug 31791 follow-up) Koha explodes when trying to edit a biblio with...
Janusz Kaczmarek [Mon, 6 May 2024 09:08:50 +0000 (09:08 +0000)]
Bug 36786: (Bug 31791 follow-up) Koha explodes when trying to edit a biblio with invalid biblionumber

After changes made to addbiblio with the bug 31791, when trying to open the
editor with biblionumber=<invalid_number> (e.g. a deleted biblionumber)
Koha explodes with a message << Can't call method "can_be_edited" on
an undefined value at /kohadevbox/koha/cataloguing/addbiblio.pl line 555 >>

Test plan:
==========
1. Try to edit a biblio giving as a biblionumber (in URL) a non-existing
   biblionumber, e.g. in ktd, with standard ktd test data:
   http://your_ktd:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=1234567
   Koha should explode with the message:
   Can't call method "can_be_edited" on an undefined value at
   /kohadevbox/koha/cataloguing/addbiblio.pl line 555
2. Apply the patch; restart_all.
3. Repeat p.1.  You should get a page with the info: "The record you are trying
   to edit doesn't exist...".

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36787: staticfines.pl add use Koha::DateUtils::output_pref
Fridolin Somers [Mon, 6 May 2024 10:08:02 +0000 (12:08 +0200)]
Bug 36787: staticfines.pl add use Koha::DateUtils::output_pref

misc/cronjobs/staticfines.pl is calling output_pref() but it is missing from module import :
use Koha::DateUtils qw( dt_from_string );

Test but running staticfines.pl

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36750: Fix Languages vs Language
Jonathan Druart [Tue, 7 May 2024 13:46:54 +0000 (15:46 +0200)]
Bug 36750: Fix Languages vs Language

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36750: Fix aria-label for show more/less links
Jonathan Druart [Mon, 6 May 2024 09:55:28 +0000 (11:55 +0200)]
Bug 36750: Fix aria-label for show more/less links

Didn't manage to keep the more_less_labels because of the space in the
key names

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36750: Use the same label for Zebra
Jonathan Druart [Mon, 6 May 2024 09:38:44 +0000 (11:38 +0200)]
Bug 36750: Use the same label for Zebra

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36750: Fix some labels
Jonathan Druart [Mon, 6 May 2024 09:07:13 +0000 (11:07 +0200)]
Bug 36750: Fix some labels

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36750: (35138 follow-up) Use same display code for OPAC
Nick Clemens [Thu, 2 May 2024 16:44:36 +0000 (16:44 +0000)]
Bug 36750: (35138 follow-up) Use same display code for OPAC

To test:
1 - In OPAC with ES enabled do a search
2 - Note missing facet labels
3 - Apply patch
4 - They are back!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36796: (follow-up) Fix column descriptions for the statistics table
David Nind [Tue, 7 May 2024 05:41:54 +0000 (05:41 +0000)]
Bug 36796: (follow-up) Fix column descriptions for the statistics table

This follow-up to bug 32312 fixes the descriptions for the statistics
database columns, used in guided reports.

It removes the duplicate statistics section in Koha/Database/Columns.pm
so that descriptions are displayed for all columns, as originally
intended.

It also adds a description for the interface column (a new column added
after the original patch was pushed).

Test plan:
1. Go to Reports > Guided reports > Create guided report.
2. Choose 'Circulation' for the module to report on and select
   'Next'.
3. Choose 'Tabular' for the type of report and select 'Next'.
4. Scroll down to the statistics table section and note that some
   columns have descriptions and some don't:
     Statistics date and time / statistics.datetime
     Library / statistics.branch
     Value / statistics.value
     Type / statistics.type
     Item number / statistics.itemnumber
     Item type / statistics.itemtype
     statistics.other
     statistics.location
     Borrower number / statistics.borrowernumber
     statistics.ccode
     statistics.categorycode
     statistics.interface
5. Apply the patch.
6. Restart all the things (restart_all).
7. Repeat steps 1 to 4.
8. Scroll down to the statistics table section again and note that all
   columns now have descriptions:
     Statistics date and time / statistics.datetime
     Library / statistics.branch
     Value / statistics.value
     Transaction type / statistics.type
     SIP mode / statistics.other
     Item number / statistics.itemnumber
     Koha item type / statistics.itemtype
     Shelving location / statistics.location
     Borrower number / statistics.borrowernumber
     Collection / statistics.ccode
     Patron category / statistics.categorycode
     Interface / statistics.interface
9. Sign off :D

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>
5 weeks agoBug 36612: (QA follow-up) Add 'source' to public_read_list
Martin Renvoize [Tue, 7 May 2024 12:07:53 +0000 (13:07 +0100)]
Bug 36612: (QA follow-up) Add 'source' to public_read_list

This patch adds the required 'source' field to the public_read_list for
tickets.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 30579: (follow-up) Style selections as buttons
Nick Clemens [Tue, 7 May 2024 12:35:04 +0000 (12:35 +0000)]
Bug 30579: (follow-up) Style selections as buttons

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 30579: (follow-up) Standardize labels:
Nick Clemens [Tue, 7 May 2024 12:24:24 +0000 (12:24 +0000)]
Bug 30579: (follow-up) Standardize labels:

This patch changes the heading for specific item holds, so the three options are now:

 Hold next available item
 Hold next available item from an item group
 Hold a specific item

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 30579: (follow-up) Fix rebase of multi holds form and add CSRF
Nick Clemens [Tue, 7 May 2024 12:01:33 +0000 (12:01 +0000)]
Bug 30579: (follow-up) Fix rebase of multi holds form and add CSRF

This patch restores missing elemtns to multi-hold form and adds CSRF variables

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 30579: Fix rebase issue
Nick Clemens [Thu, 2 May 2024 16:05:35 +0000 (16:05 +0000)]
Bug 30579: Fix rebase issue

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 30579: (follow-up) Remove unnecessary nested form elements
Nick Clemens [Fri, 15 Mar 2024 18:03:10 +0000 (18:03 +0000)]
Bug 30579: (follow-up) Remove unnecessary nested form elements

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 30579: (follow-up) fix button id
Emily Lamancusa [Thu, 26 Oct 2023 17:00:10 +0000 (13:00 -0400)]
Bug 30579: (follow-up) fix button id

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>
5 weeks agoBug 30579: (follow-up) Add required label and warning when hold levels required
Nick Clemens [Wed, 25 Oct 2023 12:13:49 +0000 (12:13 +0000)]
Bug 30579: (follow-up) Add required label and warning when hold levels required

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>
5 weeks agoBug 30579: (follow-up) Use same conditions on item groups place hold button as on...
Nick Clemens [Wed, 25 Oct 2023 11:40:04 +0000 (11:40 +0000)]
Bug 30579: (follow-up) Use same conditions on item groups place hold button as on other options

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>
5 weeks agoBug 30579: (follow-up) Add fieldsets and style disabled elements
Nick Clemens [Mon, 28 Aug 2023 14:42:49 +0000 (14:42 +0000)]
Bug 30579: (follow-up) Add fieldsets and style disabled elements

This patch surrounds each section with a fieldset which allow enabling/disabling
all the elements in one go. CSS is added to make it clear which fields are disabled.

Button for item specific is moved form the multi-hold section

Javascript is simplified to use the new fieldsets

To test:
1 - Repeate test plan on earlier commit
2 - Additionally, search and select multiple records and place hold
3 - Confirm multi-hold placing works :-)

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>
5 weeks agoBug 30579: Remove doubled notes field
Nick Clemens [Mon, 28 Aug 2023 12:26:44 +0000 (12:26 +0000)]
Bug 30579: Remove doubled notes field

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>
5 weeks agoBug 30579: Add missing for attribute on label
Jonathan Druart [Tue, 23 May 2023 09:36:43 +0000 (11:36 +0200)]
Bug 30579: Add missing for attribute on label

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>
5 weeks agoBug 30579: Disentangle multi-hold and single bib forms
Nick Clemens [Fri, 23 Sep 2022 15:06:05 +0000 (15:06 +0000)]
Bug 30579: Disentangle multi-hold and single bib forms

This patch alters the structure of the hold request page to make it clear
that "Hold next available", "Hold item group", and "Hold specific item" are
mutually-exclusive options.

While there is some duplication from this, it makes the sections easier to read
and allows for more variation in the two forms

To test:
 1 - Find a bib with multiple items
 2 - Enable item groups and item group holds in system preferences
 3 - Load the records detail page
 4 - Add an item group on the item groups tab
 5 - Select two items and add to the group
 6 - Click the 'Holds' tab and search for/select a patron
 7 - Confirm the three levels of holds are clear
 8 - Confirm checking the radio next to one disables the others
 9 - Check 'Hold next available item from an item group'
10 - Do not select an item group
11 - Click 'Place hold' and confirm you are notified of need to select an item group
     NOTE: if you are overrirding you may also have an alert that the items cannot normally be put on hold
12 - Click 'Place hold on a specific item' - but do not select an item
13 - Click place hold and confirm there is an alert and you cannot continue
14 - Click 'Hold next available item' and place hold
15 - Hold is successfully placed
16 - Place another hold for the same patron
17 - Only the 'Hold next available item' form is enabled
18 - Confirm you cannot switch hold type
19 - Place hold
20 - Select a new patron and place an item group hold
21 - Select the same patron and place another hold - you are forced to place an item group hold
22 - Select a new patron and place a hold on a specific item
23 - Place a second hold, confirm you can only place it on a specific item

Signed-off-by: hinemoea <hinemoea@inlibro.com>
Signed-off-by: Sam Lau <samalau@gmail.com>
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>
5 weeks agoBug 36396: DBRev 23.12.00.049
Katrin Fischer [Tue, 7 May 2024 13:16:07 +0000 (13:16 +0000)]
Bug 36396: DBRev 23.12.00.049

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36396: Add tests
Jonathan Druart [Tue, 7 May 2024 10:41:39 +0000 (12:41 +0200)]
Bug 36396: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36396: (follow-up) Prevent link to av for 'specials'
Jonathan Druart [Fri, 22 Mar 2024 13:37:22 +0000 (14:37 +0100)]
Bug 36396: (follow-up) Prevent link to av for 'specials'

Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36396: Export/import the yaml config
Jonathan Druart [Fri, 22 Mar 2024 09:04:08 +0000 (10:04 +0100)]
Bug 36396: Export/import the yaml config

Test plan:
Export the ES fields/mappings using
 misc/search_tools/export_elasticsearch_mappings.pl > mappings.yaml
Copy this file to admin/searchengine/elasticsearch/mappings.yaml

Reset the mapping from the UI
Notice that the links to the AV categories have been preserved

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36396: UI - OPAC
Jonathan Druart [Fri, 22 Mar 2024 08:23:19 +0000 (09:23 +0100)]
Bug 36396: UI - OPAC

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36396: Prevent link to av for 'specials'
Jonathan Druart [Fri, 22 Mar 2024 08:29:45 +0000 (09:29 +0100)]
Bug 36396: Prevent link to av for 'specials'

See previous commit message, 'QA' part.
We do not support the "specials" categories.

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36396: Link facet with authorised value category - ES
Jonathan Druart [Thu, 21 Mar 2024 15:48:56 +0000 (16:48 +0100)]
Bug 36396: Link facet with authorised value category - ES

This new feature adds the ability to link an ES facet to an authorised
value category, in order to display a description instead of the code.

Test plan:
1. Go to the ES mapping admin page
2. Notice the new "Authorized value category" column in the facets
   config table
3. Create a new facet that is linked to a search field containing values
   from an authorised value category. Pick this category in the list
4. Save
5. Reindex
6. Notice that the descriptions are now displayed (staff and OPAC) in
   the search result page.

QA: See the related bug report for possible improvements. It's not
easy at all to deal with the "specials" here, a lot of changes must be
done in how we fetch/cache the AVs.

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36396: DBIC schema changes
Jonathan Druart [Thu, 21 Mar 2024 14:51:44 +0000 (15:51 +0100)]
Bug 36396: DBIC schema changes

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36396: DB changes
Jonathan Druart [Thu, 21 Mar 2024 14:45:11 +0000 (15:45 +0100)]
Bug 36396: DB changes

Add the new DB column search_field.authorised_value_category

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 33134: DBRev 23.12.00.048
Katrin Fischer [Tue, 7 May 2024 13:11:23 +0000 (13:11 +0000)]
Bug 33134: DBRev 23.12.00.048

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 33134: Add some 76 missing languages
Janusz Kaczmarek [Fri, 3 Mar 2023 22:15:51 +0000 (23:15 +0100)]
Bug 33134: Add some 76 missing languages

When languages come into facets in ES, Koha should know
the names for the codes used records.  Otherwise
the three-letters language code is being displayed in
the facet instead of name.  Koha now knows about 77
languages, many are still missing.

The most missed 76 languages, in order of occurrences
in my data sets, are (MARC 21 codes): grc, syr, chu, cop, arc,
ang, epo, syc, gez, sla, san, csb, akk, gmh, egy, wen, gle,
fro, rom, mac, mal, uga, mis, sem, sux, pli, bos, che, dum,
kaz, tib, enm, frm, mlt, got, nds, ira, lin, uzb, ave, cho,
jrb, bnt, pal, tut, goh, hsb, inc, mlg, roa, cel, sam, bem,
fur, gem, hit, lad, nah, ota, peo, pro, tat, wel, yor, bra,
den, hau, her, kas, mga, myn, nya, pra, que, tir, tuk.

Plus: gwi, dgr, chp asked in bug 23693.

Here, I do not put language codes which are extremely rare
in my data sets.

Subtags and names for language_subtag_registry are taken from
https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry,
English names for language_descriptions.description - from
https://www.loc.gov/marc/languages/language_code.html, and Polish names -
from https://przepisy.bn.org.pl/aneksy#25-kody-jezykow---marc-21.

Test plan:
==========
1. Hava a ES installation with reasonable number of records,
   with a variety of languages in 008/35-39 not present in
   Koha (you can modify your record with codes from the list above).
   Set FacetMaxCount to a high number (like 500 or so,
   dependiing on the size of your data set).
2. Do a search, like '*a*'.
3. Controll the content of the Language faset -- you should
   see some bare codes instead of language names.
4. Apply the patch -- update the database.
5. Perform the same search.
6. You should see the names in place of the codes.
7. Optionally, you can activate the Polish translation and
   you should be able to see Polish names for the added languages.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36151: Update leaflet.js
Thomas Klausner [Mon, 6 May 2024 12:39:35 +0000 (12:39 +0000)]
Bug 36151: Update leaflet.js

Koha currently comes with leaflet.js 1.0.3 which is quite old (2017).
For GeoSearch (Bug 31652) we need a more current leaflet.js, so this
patch updates leaflet.js to the current version 1.9.4

Test plan:

* Go to staff /cgi-bin/koha/admin/usage_statistics.pl where you see a
  map and can set the location of the library by clicking on the map.
* Apply the patch
* Again, go to staff /cgi-bin/koha/admin/usage_statistics.pl
* Do a complete reload of the page
* It should still work:
  * Display the location as a pin
  * Set a new location

There was no code change necessary besides downloading the current
version of leaflet.js and updating the about-page

Sponsored-by: Geosphere Austria
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35169: DBRev 23.12.00.047
Katrin Fischer [Tue, 7 May 2024 12:58:55 +0000 (12:58 +0000)]
Bug 35169: DBRev 23.12.00.047

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35169: (follow-up) Fix sequence and patron categories in sysprefs.sql
Katrin Fischer [Tue, 7 May 2024 12:57:52 +0000 (12:57 +0000)]
Bug 35169: (follow-up) Fix sequence and patron categories in sysprefs.sql

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35169: (QA follow-up) Fix spelling and preference name
Martin Renvoize [Tue, 7 May 2024 10:52:42 +0000 (11:52 +0100)]
Bug 35169: (QA follow-up) Fix spelling and preference name

Update the preference name from 'Borrower' to 'Patron' and correct
spelling of receive.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35169: (QA follow-up) Fix up syspref language and group them together
Kyle M Hall [Fri, 3 May 2024 14:07:44 +0000 (14:07 +0000)]
Bug 35169: (QA follow-up) Fix up syspref language and group them together

The language used in the syspref preferences was a bit confusing.
Also, it makes sense to keep these two together on the page as they
are intrinsically linked.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35169: (follow-up) perltidy
Lucas Gass [Sat, 9 Mar 2024 17:53:13 +0000 (17:53 +0000)]
Bug 35169: (follow-up) perltidy

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35169: Resolve the override situations
Matthias Le Gac [Fri, 1 Mar 2024 19:17:20 +0000 (14:17 -0500)]
Bug 35169: Resolve the override situations

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35169: update DBupdate file
Matthias Le Gac [Fri, 1 Mar 2024 13:53:43 +0000 (08:53 -0500)]
Bug 35169: update DBupdate file

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35169: update sysprefs.sql
Matthias Le Gac [Thu, 29 Feb 2024 17:08:00 +0000 (12:08 -0500)]
Bug 35169: update sysprefs.sql

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35169: add bug_35169.pl for DB
Matthias Le Gac [Thu, 22 Feb 2024 20:33:25 +0000 (15:33 -0500)]
Bug 35169: add bug_35169.pl for DB

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35169: Make long overdue borrower category options configurable in interface
Matthias Le Gac [Thu, 22 Feb 2024 19:46:22 +0000 (14:46 -0500)]
Bug 35169: Make long overdue borrower category options configurable in interface

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36709: Add confirm flag to update_localuse_from_statistics.pl script
Lucas Gass [Mon, 29 Apr 2024 20:39:08 +0000 (20:39 +0000)]
Bug 36709: Add confirm flag to update_localuse_from_statistics.pl script

To test:
1. APPLY PATCH and restart all
2. Run the update_localuse_from_statistics.pl script without a confirm flag, nothing happens.
3. Run the script and add the --confirm flag, stuff happens.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36730: (Bug 35428 follow-up) po files (sometimes) fail to update
Janusz Kaczmarek [Tue, 30 Apr 2024 10:18:12 +0000 (10:18 +0000)]
Bug 36730: (Bug 35428 follow-up) po files (sometimes) fail to update

Under some circumstances (e.g. non-standard disk latency) po files fail
to be generated.  The output from the gulp po:update --lang xx-XX task
is than like this:

[10:01:39] 'po_update_staff' errored after 6.41 s
[10:01:39] Error: ENOENT: no such file or directory, open '/tmp/koha-5WCc9s/Koha-staff-prog.pot'

This is due to the time dependencies inside the function flush (callback)
(in the function xgettext) in gulpfile.js.  It happens that the
/tmp/koha-NNNNNN folder gets deleted before the asynchronous callback
function called by fs.readFile is completed.  The callback should copy
the content of the .pot file from /tmp/koha- to its final destination,
while, in parallel in fact, the folder inside /tmp is being removed.
This creates a race condition.

Test plan:
==========
Hard to reproduce.  But the race condition found in the code should
be obvious.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34972: (QA follow-up) Remove second transfer from Circulation.t
Marcel de Rooy [Fri, 3 May 2024 09:07:17 +0000 (09:07 +0000)]
Bug 34972: (QA follow-up) Remove second transfer from Circulation.t

Removing the manual transfer and rightaway doing the Reserve
transfer. One test description was misleading too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34972: (QA follow-up) Remove some ModReserveCancelAll imports
Marcel de Rooy [Fri, 3 May 2024 08:07:24 +0000 (08:07 +0000)]
Bug 34972: (QA follow-up) Remove some ModReserveCancelAll imports

Not used? Dont import.
Which actually only leaves circ/waitingreserves.pl as the only
'real' caller.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34972: Remove GetOtherReserves
Emily Lamancusa [Tue, 19 Mar 2024 18:14:27 +0000 (14:14 -0400)]
Bug 34972: Remove GetOtherReserves

GetOtherReserves attempts to set the waiting/transit status for the next
hold on the list when applicable, but in practice it either leaves the
hold state unchanged, or sets the itemnumber without setting the found
status (erroneously converting bib-level holds to item-level holds).

The latter situation only occurs when the user has been prompted to
confirm, cancel, or revert the hold, and is able to ignore the prompt.
In those situations, the hold's state should not change.

GetOtherReserves does not need to change the hold state, and it does not
do so correctly. Besides that, it does not do much other than call
CheckReserves, and is only used in 3 places.

This patch removes GetOtherReserves, and refactors returns.pl and
C4::Reserves::ModReserveCancelAll to call CheckReserves directly instead.

To test:
1. Place 2 bib-level holds for 2 different patrons (Patron A and Patron
    B) on the same record, both for pickup at the logged-in library
2. Check in an item from that record to fill Patron A's hold
3. Set the hold's expiration date to yesterday by accessing the database
    in the command line:
    - In a ktd shell prompt, open the db client with koha-mysql kohadev
    - UPDATE reserves
        SET expirationdate = DATE_SUB(CURDATE(), INTERVAL 1 DAY)
        WHERE borrowernumber = <Patron A's borrowernumber>
4. Go to Circulation > Holds Awaiting Pickup, and find the hold in the
    "holds waiting past their expiration date" tab
5. Click the "Cancel hold" button in the Actions column next to the hold
   (do not check in the book)
6. Return to the bib record and look at Patron B's hold
--> Note that Patron B's hold is now an item-level hold and does not
    have a waiting status

7. Cancel Patron B's hold
8. Place 2 new holds on the record: one for Patron A at the logged-in
    library, and one for Patron B at a different library
9. Check in an item to fill Patron A's hold
10. Repeat steps 3-5 to expire and cancel Patron A's hold
11. Return to the Holds tab of the bib record and look at Patron B's hold
--> Note that Patron B's hold is now an item-level hold, and there is no
    "Revert transit status" button

12. Place 2 bib-level holds for 2 different patrons (Patron A and Patron
    B) on the same record, both for pickup at the logged-in library
13. Check in an item from that record to fill Patron A's hold
14. Check in the same item again. A modal will pop up, saying that the
    hold is already waiting
15. In the modal, choose a cancellation reason and click "Cancel hold"
--> A new modal will pop up to fill Patron B's hold
16. Click "Ignore" on the modal for Patron B's hold
17. Return to the bib record and look at Patron B's hold
--> Note that Patron B's hold is now an item-level hold and does not
    have a waiting status

18. Apply patch
19. Repeat steps 1-6
--> Note that Patron B's hold is still a bib-level/"next available" hold
20. Repeat steps 7-11
--> Note that Patron B's hold is still a bib-level/"next available" hold
21. Repeat steps 12-17
--> Note that Patron B's hold is still a bib-level/"next available" hold

Make sure correct behavior is unchanged:

22. Cancel Patron B's hold
23. Place 2 new holds on the record: one for Patron A at the logged-in
    library, and one for Patron B at a different library
24. Check in an item from that record to fill Patron A's hold
25. Check in the same item again. A modal will pop up, saying that the
    hold is already waiting
26. In the modal, choose a cancellation reason and click "Cancel hold"
--> A new modal will pop up to fill Patron B's hold
27. Click "Print slip, transfer, and confirm" on the modal for Patron B's hold
--> Confirm that the information on the slip is correct
--> Confirm that the hold is correctly put in transit

22. Set HoldsAutoFill and HoldsAutoFillPrintSlip to "Do"

23. Place a bib-level hold for the logged-in library
24. Check in an item from that bib
--> Confirm the information on the slip is correct
--> Confirm the hold is correctly assigned and set to waiting
25. Place a bib-level hold for a different library
26. Check in an item from that bib
--> Confirm the information on the slip is correct
--> Confirm the hold is correctly put in transit
27. Change the logged-in branch to match the hold pickup location
28. Check the item in
--> Confirm the information on the slip is correct
--> Confirm the hold is correctly assigned and set to waiting

29. Repeat steps 22-26
--> Confirm a correct hold slip pops up for Patron B's hold
--> Confirm that Patron B's hold is correctly put in transit
30. Cancel Patron B's hold
31. Place 2 bib-level holds for 2 different patrons (Patron A and Patron
    B) on the same record, both for pickup at the logged-in library
33. Repeat steps 24-26
--> Confirm a correct hold slip pops up for Patron B's hold
--> Confirm Patron B's hold is correctly set to Waiting

34. Prove t/db_dependent/Circulation.t
35. Prove t/db_dependent/Koha/Holds.t
--> Tests pass

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>
5 weeks agoBug 34972: Add tests for ModReservesCancelAll
Emily Lamancusa [Wed, 3 Apr 2024 20:24:38 +0000 (16:24 -0400)]
Bug 34972: Add tests for ModReservesCancelAll

To test:
1. Apply this patch only
2. prove t/db_dependent/Koha/Holds.t
--> Tests pass
3. Apply the other patch
4. prove t/db_dependent/Koha/Holds.test
--> Tests still pass

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>
5 weeks agoBug 36792: Limit POSIX imports
Janusz Kaczmarek [Mon, 6 May 2024 12:06:22 +0000 (12:06 +0000)]
Bug 36792: Limit POSIX imports

A Marcel's QA patch to Bug 36552 added use POSIX; in two spots.
In https://metacpan.org/pod/POSIX we read:

CAVEATS
Everything is exported by default (with a handful of exceptions). This is
an unfortunate backwards compatibility feature and its use is strongly
discouraged. You should either prevent the exporting (by saying use
POSIX ();, as usual) and then use fully qualified names (e.g.
POSIX::SEEK_END), or give an explicit import list. If you
do neither and opt for the default (as in use POSIX;), you will
import hundreds and hundreds of symbols into your namespace.

This patch fixes this.

No test plan.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36790: List table columns for 230600052 queries
Jonathan Druart [Mon, 6 May 2024 10:58:33 +0000 (12:58 +0200)]
Bug 36790: List table columns for 230600052 queries

We must list the columns, or the db rev will fail when a new column is
added. It happened here when 33478 added 'style'

Also remove id and dates

To test:
1. On current main, run:
   $ ktd --shell
  k$ perl /kohadevbox/misc4dev/run_tests.pl --koha-dir=. --run-db-upgrade-only
=> FAIL: Tests explode for DB query issues
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 25159: (QA follow-up) Make DBRev idempotent
Tomas Cohen Arazi [Mon, 6 May 2024 12:35:59 +0000 (09:35 -0300)]
Bug 25159: (QA follow-up) Make DBRev idempotent

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36788: Update debian/control file
Katrin Fischer [Mon, 6 May 2024 10:22:13 +0000 (10:22 +0000)]
Bug 36788: Update debian/control file

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36554: Document languages from field 041 should be present in 'ln' search field...
Janusz Kaczmarek [Tue, 14 Mar 2023 13:22:27 +0000 (14:22 +0100)]
Bug 36554: Document languages from field 041 should be present in 'ln' search field and Languages facet (MARC 21)

In Elasticsearch, the field 041 (subfields: a, d, e, i, j)
is not indexed with 'ln' search field.  As a result, records cannot
be found when searching with languages present in 041 (but only
with the one from 008/35-37), and the languages are also missing
from the facet.

Subfields content (only relevant subfields):
$a - Language code of text/sound track or separate title
$d - Language code of sung or spoken text
$e - Language code of librettos
$i - Language code of intertitles
$j - Language code of subtitles

Test plan
=========
0. Have a test installation with Elasticsearch.
1. In ktd with its test data, make a biblio search for a language present
   in 041 a/d/e/i/j but not in 008/35-37, e.g. for Japanese (with ln:jpn
   or from Advance search).  You will get no results.
2. Apply the patch, reindex with:
   sudo koha-elasticsearch --rebuild -r -b kohadev
3. Repeat the test. You should get some records and also you should see
   the Japanese language in the Languages facet.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36760: Use 'strong' for 'Assignee' label
Martin Renvoize [Thu, 2 May 2024 14:30:40 +0000 (15:30 +0100)]
Bug 36760: Use 'strong' for 'Assignee' label

This patch simply add the 'strong' class to the assignee label in the
catalog concerns display ticket modal.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36390: Two minor OPAC CSS fixes
Owen Leonard [Thu, 29 Feb 2024 16:36:34 +0000 (16:36 +0000)]
Bug 36390: Two minor OPAC CSS fixes

This patch makes corrections to OPAC CSS to address two small issues.

To test, apply the patch and rebuild the OPAC CSS.

- Perform a catalog search which will return multiple results..
- In the table of search results, check the icon and text for the
  controls under each title: "Place hold", "Add tag", "Add to cart" etc.
  - The colors should be consistent, with a slightly darker blue for the
    icons.
- Scroll down until the table header "sticks" to the top of the
  viewport.
- There should be no gap between the header row with the pagination
  links and the row with the "Select all", "Clear all", etc. controls.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36074: Add classes to materials specfied message on check in and checkout when...
Lucas Gass [Mon, 12 Feb 2024 22:03:38 +0000 (22:03 +0000)]
Bug 36074: Add classes to materials specfied message on check in and checkout when CircConfirmItemParts is on.

To test:
1. APPLY PATCH
2. Set CircConfirmItemParts to 'Require'.
3. Add a materials specified message to an item. ( 952$3 )
4. Add the following CSS to your IntranetUserCSS:

    .mats_spec_label { color: white; background: purple;  }
    .mats_spec_message { color: white; background: green; }

5. Checkout that item. Notice the message should be green and the label (Note about the accompanying materials:) should be purple.
6. Check in that item. Notice the message should be green and the label (Note about the accompanying materials:) should be purple.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 31981: Add classes to each NEEDSCONFIRM message in circ/circulation.tt
Lucas Gass [Thu, 21 Mar 2024 16:37:13 +0000 (16:37 +0000)]
Bug 31981: Add classes to each NEEDSCONFIRM message in circ/circulation.tt

This patch adds a 'needsconfirm' class and a unique class to each NEEDSCONFIRM message on circ/circulation.tt to make these easier to style individually.

To test:
1. APPLY patch
2. Review the diff to see each of the NEEDSCONFIRMATION messages.
3. Add some CSS to IntranetUserCSS like this:

.needsconfirm { padding: 1em; color: #fff; }

.reserved { background: blue; }
.debt { background: red; }
.reserve_waiting { background: orange; }
.rentalcharge { background: purple; }
.renew_issue { background: limegreen; }

4. Place a hold on an item for Patron A, do not trigger the hold, and check the item out to Patron B.  The message background is blue.
5. Then check the item in, confirm the hold, then check the item out to Patron B.  The message background is orange
6. Check something out that is already checked out to that patron, message background is lime green.
7. Have too much debt and check something out to a patron, message is red.

Note: There are plenty more NEEDSCONFIRMATION messages but I don't think we need to test every single one.
Note: These background colors are more testing purposes only.
Signed-off-by: Donna <donna@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36584: Add fields 520, 561, and 563 (MARC 21) to ES note search field
Janusz Kaczmarek [Thu, 11 Apr 2024 18:02:14 +0000 (18:02 +0000)]
Bug 36584: Add fields 520, 561, and 563 (MARC 21) to ES note search field

With Zebra, the general keyword search covered the entire record content,
even if the field was not explicitly indexed with a Zebra index (the Any index).
With Elasticsearch only the content of the fields explicitly indexed
can be found with general keyword search.  This is OK, to some extent, but with
the current configuration it hides the content fo some important notes from the
searches, and librarians complained about that: 520 - Summary, etc.,
561 - Ownership and Custodial History, 563 - Binding Information.

This patch adds the content of 520, 561, and 563 fields to the 'note'
search field.

Test plan
=========
1. Have an installation with Elasticsearch.
2. Add some information to the 520, 561, and/or 563 fields (561 is
   hidden in the default framework--one should enable it to be able to use
   the 561 field).  Save teh record.
3. Try to find the record with the general keyword search, with the words
   you used.  If they were specific enough, you will get no results.
4. Apply the patch, reindex with:
   sudo koha-elasticsearch --rebuild -r -b kohadev
5. Confirm that now you are able to find the record with the information
   you entered.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36578: Elasticsearch: publisher-location (pl) index should include field 752...
Janusz Kaczmarek [Thu, 11 Apr 2024 14:32:51 +0000 (14:32 +0000)]
Bug 36578: Elasticsearch: publisher-location (pl) index should include field 752 (for old prints) and also support UNIMARC

Extension to bug 36269: 1) when cataloguing old prints, the standardized form of
the place of publication is given in the field 752 and as such should also be indexed.

2) Also, normal UNIMARC fields for publication place should be indexed (210a, 214a).

Test plan
=========

Scenario A (MARC 21, field 752)
-------------------------------
0. Have an installation with Elasticsearch and MARC 21 configuration.
1. Activate subfields 752 $a, $d in the default framework (Visibility: Editor).
2. Edit an existing record with this framework, putting some rare words in the
   752 $a and $d subfields.
3. Try to make a search with tis words (general keyword or by publication place,
   i.e. pl:).
4. You hsold get no results.
5. Apply the patch, reindex with:
   sudo koha-elasticsearch --rebuild -r -b kohadev
6. Repeat p. 3. You should get your edited record.

Scenario B (UNIMARC)
--------------------
0. Have an installation with Elasticsearch and UNIMARC configuration.
1. Try to search for a publication place, either with pl: directly in the
   search window, or in Advanced search, with Publisher location.
   With ktd UNIMARC test date you can search for 'Ste Geneviève Cedex'.
2. You should get no results.
3. Apply the patch, reindex with:
   sudo koha-elasticsearch --rebuild -r -b kohadev
4. Repeat p. 1. You should get some results (with ktd test data set and
   Ste Geneviève Cedex - record #1).

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 34693: Add 035$a as Other-control-number index in default authorities search...
Caroline Cyr La Rose [Fri, 1 Sep 2023 19:27:44 +0000 (15:27 -0400)]
Bug 34693: Add 035$a as Other-control-number index in default authorities search indexes

This patch adds a new index for authorities, Other-control-number, and maps it to 035$a.

This will help when trying to match authority records when importing external records.

Test 1:
0. Make sure Elasticsearch is set as the search engine
1. Apply patch and restart
2. Import the attached record
   2.1. Go to Cataloging > Stage records for import
   2.2. Choose the file
   2.3. Click Upload file
   2.4. Choose Record type: Authority
   2.5. Click Stage for import
   (wait until the job is finished...)
   2.6. Click View batch
   2.7. Click Import this batch into the catalog
   (wait until the job is finished...)
   2.8. Click Manage imported batch
   2.9. Click View next to the record
   2.10. Note the auth id number

3. Examine the ES entry for the record (replace INDEX_NAME with the index name (found in koha-conf.xml and XX with the auth_id)

curl -XGET 'http://localhost:9200/INDEX_NAME_authorities/data/XX?_source_includes=other-control-number&pretty'

--> It should give you the value of 035$a

Test 2 (optional):
1. Steps 1 and 2 as above
2. Add a matching rule to match on 035$a for authority records
   2.1. Go to Administration > Record matching rules
   2.2. Click New record matching rule
   2.3. Fill out the form
        - Matching rule code: enter a code (for example AUTCONTROL)
        - Description: enter a description (for example 035$a for authorities)
        - Match threshold: 100
        - Record type: Authority record
        - Search index: Other-control-number
        - Score: 100
        - Tag: 035
        - Subfields: a
   2.4. Click Save
3. Import the same record again, checking for matches using the new rule
   3.1. Go to Cataloging > Stage records for import
   3.2. Choose the file
   3.3. Click Upload file
   3.4. Choose Record type: Authority
   3.5. Choose Record matching rule: rule created above
   2.6. Click Stage for import
   (wait until the job is finished...)
   --> It should say that 1 record was found using the rule

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36247: MARC21 Addition to relator terms in technical notice 2024-02-27
Caroline Cyr La Rose [Wed, 6 Mar 2024 15:05:14 +0000 (10:05 -0500)]
Bug 36247: MARC21 Addition to relator terms in technical notice 2024-02-27

This patch adds the relator code gdv (Game developer) in the list of
MARC21 relator terms in Koha.

To test:
1. Apply patch and reset_all
2. Go to Administration > Authorized values > RELTERMS
3. Search for gdv
   --> The new relator code should be there with its corresponding term
       "Game developer"

Note: this is added in the installer files. It will not affect existing
installations. For existing installations, add the new relator code in
Administration > Authorized values > RELTERMS.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36108: Update MARC21 default framework to Update 37 (December 2023)
Caroline Cyr La Rose [Thu, 15 Feb 2024 21:11:03 +0000 (16:11 -0500)]
Bug 36108: Update MARC21 default framework to Update 37 (December 2023)

This patch updates the default MARC21 framework to reflect the changes
brought by Update 37 (December 2023).

To test:
1. Apply patch and reset_all
2. Go to Administration > MARC bibliographic framework
3. Click Actions next to the default framework and choose MARC structure
4. Check for the changes detailed in the update
https://www.loc.gov/marc/bibliographic/bdapndxg.html

- Two subfields of 022 should be marked as obsolete
  - l ISSN-L [OBSOLETE]
  - m Canceled ISSN-L [OBSOLETE]

- There should be a new field 023, named CLUSTER ISSN
  - This field should be repeatable
  - Subfields:
    - 0 Authority record control number or standard number (NR)
    - 1 Real World Object URI (R)
    - 2 Source (NR)
    - 6 Linkage (NR)
    - 8 Field link and sequence number (R)
    - a Cluster ISSN (NR)
    - y Incorrect Cluster ISSN (R)
    - z Canceled Cluster ISSN (R)

- There should be one new subfield in field 532
  - 3 Materials specified (NR)

5. Optional: run the framework test in Administration > MARC
   bibliographic framework test
   --> All should be OK

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35895: (follow-up) Add markup comments
Owen Leonard [Tue, 19 Mar 2024 15:06:08 +0000 (15:06 +0000)]
Bug 35895: (follow-up) Add markup comments

This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

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>
5 weeks agoBug 35895: Reindent tags review template
Owen Leonard [Tue, 19 Mar 2024 15:05:25 +0000 (15:05 +0000)]
Bug 35895: Reindent tags review template

This patch reindents the tags review template so that it has consistent
indentation, with tab indentation coverted to space.

The patch also adds "FILTER collapse" around the <style> block in the
head of the page.

To test, apply the patch and go to Tools -> Tags.

 - The page should look unchanged.
 - Test that no functionality has been affected:
   - Tag searches
   - Tag status changes
   - Check lists
- If you view the diff while ignoring whitespace the only changes should
  be places where line breaks were introduced

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>
5 weeks agoBug 27753: Update preference description
Katrin Fischer [Mon, 6 May 2024 07:03:26 +0000 (07:03 +0000)]
Bug 27753: Update preference description

Replace description by authorized value code in link texts.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 27753: DBRev 23.12.00.046
Katrin Fischer [Mon, 6 May 2024 06:59:06 +0000 (06:59 +0000)]
Bug 27753: DBRev 23.12.00.046

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 27753: (QA follow-up) Use librarian as resolver
Martin Renvoize [Wed, 1 May 2024 11:58:17 +0000 (12:58 +0100)]
Bug 27753: (QA follow-up) Use librarian as resolver

This patch updates the changed code to set the logged in librarian as
the person who resolved the return claim at checkin/checkout action.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 27753: (QA follow-up) Enhance unit tests
Martin Renvoize [Wed, 1 May 2024 11:57:54 +0000 (12:57 +0100)]
Bug 27753: (QA follow-up) Enhance unit tests

This patch further unit tests highlighting possible issues

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 27753: (QA follow-up) Improve unit tests
Martin Renvoize [Wed, 1 May 2024 09:52:52 +0000 (10:52 +0100)]
Bug 27753: (QA follow-up) Improve unit tests

This patch adds unit tests that test the functionality more specifically
and adds a few notes/fixme for things we need to consider here

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 27753: (QA follow-up) Check that item exists before using it
Martin Renvoize [Wed, 1 May 2024 08:57:49 +0000 (09:57 +0100)]
Bug 27753: (QA follow-up) Check that item exists before using it

We're actioning the change of claim status outside of any block that
checks the $item exists. As such we'll want to add that check in here.

I did consider that this should live inside AddIssue, but on reflection
the librarian may want to not proceed with the issue given other return
values from the CanBookBeIssued call, but you still want the
AutoClaimReturn to fire regardless as you've now found the item.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 27753: (follow-up) Tidy unit tests
Laura Escamilla [Tue, 30 Apr 2024 15:56:41 +0000 (15:56 +0000)]
Bug 27753: (follow-up) Tidy unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 27753: (follow-up) Tidy new code in circulation.pl
Laura Escamilla [Tue, 30 Apr 2024 15:54:01 +0000 (15:54 +0000)]
Bug 27753: (follow-up) Tidy new code in circulation.pl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 27753: (follow-up) Tidy introduced code in Circulation.pm
Laura Escamilla [Tue, 30 Apr 2024 15:51:45 +0000 (15:51 +0000)]
Bug 27753: (follow-up) Tidy introduced code in Circulation.pm

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 27753: (follow-up) Update logic in AddReturn
Laura Escamilla [Tue, 30 Apr 2024 14:21:35 +0000 (14:21 +0000)]
Bug 27753: (follow-up) Update logic in AddReturn

The new logic in AddReturn was flawed, we were missing return messages
due to moving the if statement too high and catching more code than
intended.

Mentored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 27753: Unit tests
Laura Escamilla [Tue, 19 Mar 2024 16:03:54 +0000 (16:03 +0000)]
Bug 27753: Unit tests

Add unit tests for new logic introduced to C4::Circulation::AddReturn

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>
5 weeks agoBug 27753: Added new system preferences for automatically resolving claims
Laura Escamilla [Tue, 12 Mar 2024 02:44:05 +0000 (02:44 +0000)]
Bug 27753: Added new system preferences for automatically resolving claims

To test:
1. Configure Claims returned
    1. Go to Administration > Authorized Values > LOST
    2. Add a new authorized value with value:6 and description:Claims returned
    3. Go to Administration > System Preferences
    4. Set ClaimReturnedLostValue to 6 and save
2. Check out an item to a patron.
    1. Mark the item as claim returned
    2. Check the item in.
    3. A message stating that the item has been claimed as returned pops up with
       an option to resolve.
    4. Resolve the claim.
3. Check out the item to the patron again.
    1. Mark the item as claim returned.
    2. Check out the item to a new patron. Select “Yes, check out”
    3. Go back to the previous patron. Notice that their claim was not resolved.
4. Apply the patch.
    1. Updatedatabase
    2. restart_all
    3. Go to the system preferences and set the system preference
       ‘AutoClaimReturnStatusOnCheckin’ to ‘Returned by patron’
    4. Set ‘AutoClaimReturnStatusOnCheckout’ to ‘Found in library’
5. Redo step 2
    1. When checking the claim returned item in you will now see a message that
       says “The previously claimed returned item has been found, automatically
       resolving the associated claim.”
    2. View the previous patron. Their claim has automatically been resolved
       with a status of ‘Returned by patron’
6. Redo step 3
    1. Upon checking the item out to another patron you will see a message that
       says “The previously claimed returned item has been found, automatically
       resolving the associated claim.”
    2. View the previous patron. Their claim has automatically been resolved
       with a status of ‘Found in library’.
7. Sign off and have a wonderful day!

Sponsored-by: Altadena Library District
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>
5 weeks agoBug 36393: Renewal with a specific date does not take the new date due that we pick
Hammat Wele [Thu, 21 Mar 2024 22:53:26 +0000 (22:53 +0000)]
Bug 36393: Renewal with a specific date does not take the new date due that we pick

When we renew a notice with a specific date and we have to override the limit, the new date due is not the date that we picked

To reproduce

1- Log in to the staff interface
     1-1. Make sure you have a ciculation rule that allows you to renew
     1-2. set the AllowRenewalLimitOverride system preference to Allow and SpecifyDueDate to Allow
2. Check out the item to a Borrower
5. Access the borrower's account and renew it until the limit is reached and note the due date.
6. Go to Circulation, click Renew
7. Enter the item barcode and choose a due date further than the due date from step 5 and submit
8. Click on Override limit and renew button
     ---> Note that the new date due is not the date that we picked in step 7
9. Apply the patch
10. Repeat step 6, 7 snd 8
     ---> Note that the new date due is the date that we picked

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 35954: Add --status to koha-plack
Magnus Enger [Mon, 5 Feb 2024 08:12:29 +0000 (08:12 +0000)]
Bug 35954: Add --status to koha-plack

This adds a --status switch to the koha-plack command.

To test on ktd:
- Copy the script to /usr/sbin, so you run the modified script,
  and not the one installed by Koha:
  $ sudo cp debian/scripts/koha-plack /usr/sbin/
- Stop and start Plack for kohadev like so:
  $ sudo koha-plack --stop kohadev
  $ sudo koha-plack --start kohadev
  And make sure this reports the correct status, both when Plack
  is running and when it is not running:
  $ sudo koha-plack --status kohadev
- Make sure --status is mentioned here:
  $ sudo koha-plack --help
- See https://wiki.koha-community.org/wiki/Testing_man_pages for
  details on how to check the manual page for the command

Signed-off-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 22740: DBRev 23.12.00.045
Katrin Fischer [Fri, 3 May 2024 17:25:15 +0000 (17:25 +0000)]
Bug 22740: DBRev 23.12.00.045

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 22740: Write unit tests for automatic lost status switching
Jacob O'Mara [Mon, 8 Apr 2024 08:50:37 +0000 (09:50 +0100)]
Bug 22740: Write unit tests for automatic lost status switching

This patch adds the unit tests for the new system preferences that will
automatically change an items lost status to an authorised value defined
in these preferences on payment or write off of outstanding balance.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 22740: Automatically change lost status when item is paid for
Jacob O'Mara [Wed, 27 Mar 2024 14:58:13 +0000 (14:58 +0000)]
Bug 22740: Automatically change lost status when item is paid for

This patch implements two new system preferences, "UpdateItemLostStatusWhenWriteOff" and "UpdateItemLostStatusWhenPaid" that allow you to specify the status to change an item to when the outstanding balance of a lost item is paid or written off. These preferences are tied to the LOST authorised values set.

Test Plan:
 - Set one of the system preference to any of the available values
 - Set an item as lost
 - Make a manual invoice for your desired user and assign it to the barcode of the above item
 - Save and Pay
 - Select Pay/Write Off depending on the system preference you selected above
 - Pay
 - Note that the status of the item has changed to the status you set with the system preference
 - Repeat for all values of both system preferences
 - Check that when the system preference is left blank and no option is chosen, the lost status does not update.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 25996: Amend system preference description for BorrowerLogs
Katrin Fischer [Fri, 3 May 2024 15:57:08 +0000 (15:57 +0000)]
Bug 25996: Amend system preference description for BorrowerLogs

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 25996: (follow-up) Log the entire object on deletion
Tomas Cohen Arazi [Mon, 22 Apr 2024 11:26:46 +0000 (08:26 -0300)]
Bug 25996: (follow-up) Log the entire object on deletion

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 25996: Add restrictions to the log viewer
Tomas Cohen Arazi [Mon, 22 Apr 2024 03:07:48 +0000 (00:07 -0300)]
Bug 25996: Add restrictions to the log viewer

This patch adds the new log actions, related to restrictions, to the log
viewer.

To test:
0. Set BorrowersLog to 'Log'
1. Pick a patron
2. Add a restriction and identify it's id, maybe using the DB:
   $ ktd --shell
  k$ koha-mysql kohadev
   > SELECT * FROM borrower_debarments;
3. Run [1]:
  k$ perl -MKoha::Patron::Debarments \
         -e 'Koha::Patron::Debarments::ModDebarment( { borrower_debarment_id => 195, comment => "potato" } );'
4. Visit the log viewer.
=> SUCCESS: You can filter on 'Create restriction', 'Modify restriction'
and 'Delete restriction', things are displayed correctly.

[1] There's the ModDebarment method in the codebase, but I couldn't find
a way to trigger it for testing, so my last resort was to do it from the
CLI, manually. The tests on the previous patches cover the method
anyway.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 25996: Add logging to restrictions actions
Tomas Cohen Arazi [Mon, 22 Apr 2024 04:04:31 +0000 (01:04 -0300)]
Bug 25996: Add logging to restrictions actions

This patch adds logging for the following actions:

* CREATE_RESTRICITON
* MODIFY_RESTRICTION
* DELETE_RESTRICTION

To test:
1. Apply the unit tests
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Patron/Borrower_Debarments.t
=> FAIL: The feature is not implemented! Nothing is logged!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 25996: Unit tests
Tomas Cohen Arazi [Mon, 22 Apr 2024 04:03:54 +0000 (01:03 -0300)]
Bug 25996: Unit tests

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 25996: Make AddDebarment() use Koha::Patron::Restriction
Tomas Cohen Arazi [Mon, 22 Apr 2024 03:07:30 +0000 (00:07 -0300)]
Bug 25996: Make AddDebarment() use Koha::Patron::Restriction

This patch makes the AddDebarment() method use the Koha::Object-based
class to ease the next steps. The current codebase makes the feature
fragile otherwise, as adding a new row and then querying for the latest
row of that kind seems risky,

With this approach the result is the same, but we have the
Koha::Patron::Restriction object for using it later in logging.

I opted to return 1 as it does now. The whole module deserves to be
removed in the future but it is out of the scope of this report.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Patron/Borrower_Debarments.t
=> SUCCESS: Tests pass
2. Apply this tiny refactoring patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36137: Make update_totalissues cron always skip the holds queue
Lucas Gass [Wed, 10 Apr 2024 11:56:01 +0000 (11:56 +0000)]
Bug 36137: Make update_totalissues cron always skip the holds queue

To test:
1. Run the update_totalissues cron, the holds queue is updated.
2. APPLY PATCH, restart services
3. Run update_totalissues cron again, this time the holds queue should always be skipped.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 weeks agoBug 36246: Remove space before question mark in confirmation message
Katrin Fischer [Fri, 3 May 2024 14:15:32 +0000 (14:15 +0000)]
Bug 36246: Remove space before question mark in confirmation message

This has the benefit of making the messages on 2 separate pages
consistent so they appear as one string to translate.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>