]> git.koha-community.org Git - koha.git/log
koha.git
5 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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>
5 months agoBug 36246: (QA follow-up) Add missing filter
Martin Renvoize [Wed, 1 May 2024 13:20:19 +0000 (14:20 +0100)]
Bug 36246: (QA follow-up) Add missing filter

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36246: (QA follow-up) New JS should start tidy
Martin Renvoize [Wed, 1 May 2024 13:19:02 +0000 (14:19 +0100)]
Bug 36246: (QA follow-up) New JS should start tidy

Add the `/* keep tidy */` flag so the new file stays tidy

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36246: (follow-up) Fix confirm
Nick Clemens [Fri, 12 Apr 2024 11:50:34 +0000 (11:50 +0000)]
Bug 36246: (follow-up) Fix confirm

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 months agoBug 36246: Add the confirmation text directly to the attribute
Jonathan Druart [Wed, 20 Mar 2024 09:53:11 +0000 (10:53 +0100)]
Bug 36246: Add the confirmation text directly to the attribute

To avoid the eval and have all the values together.

For discussion.

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 months agoBug 36246: Add JS function/include for submitting forms from link data
Nick Clemens [Wed, 28 Feb 2024 14:46:43 +0000 (09:46 -0500)]
Bug 36246: Add JS function/include for submitting forms from link data

This patch adds a new js include file form-submit.js which will read data elements from a link
and use those to submit a form

This patch fixes forms on acqui/invoice.pl as an example

To test:
1 - Add some invoices for a vendor
2 - Got to Acquisitions->Invoices
3 - Actions -> Close - confirm it works
4 - Got to 'Closed invoices' - reopen
5 - Go to Details on the invoice
6 - Add an adjustment
7 - Delete the adjustment
8 - Confirm it works

Signed-off-by: David Nind <david@davidnind.com>
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 months agoBug 36574: Canceled/invalid ISBN not indexed by ES for MARC 21
Janusz Kaczmarek [Thu, 11 Apr 2024 09:21:42 +0000 (09:21 +0000)]
Bug 36574: Canceled/invalid ISBN not indexed by ES for MARC 21

For MARC 21, canceled/invalid ISBNs (subfield 020 $z) are not being
indexed in Elasticsearch (search fields identifier-standard and isbn),
but it is for UNIMARC (subfield 010 $z).  As a result, a user searching
for such an ISBN (e.g. with wrong checksum--and therefor put in 020 $z)
will not find the record in the catalogue.

A new isbn-all Elasticsearch search field 'isbn-all' has been created with
020az (MARC 21, and 010az for UNIMARC), 010z has been removed from isbn
search field for UNIMARC, and 020z has been added to identifier-standard
search field.

Test plan
=========
0. Have a test installation with Elasticsearch.
1. In ktd with its test data, make a biblio search for a cancelled ISBN
   e.g. 9780007269854.  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 "The ice princess / Camilla Läckberg".

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36003: Add cookie consent buttons to hidden list on print
Martin Renvoize [Wed, 7 Feb 2024 13:34:20 +0000 (13:34 +0000)]
Bug 36003: Add cookie consent buttons to hidden list on print

This patch adds #consentMoreInfo, #cookieConsentFooter and
.consentAcceptEssential to the hidden fields for OPAC printing.

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 months agoBug 36120: DBIC schema update
Katrin Fischer [Fri, 3 May 2024 13:15:27 +0000 (13:15 +0000)]
Bug 36120: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: DBRev 23.12.00.044
Katrin Fischer [Fri, 3 May 2024 13:11:23 +0000 (13:11 +0000)]
Bug 36120: DBRev 23.12.00.044

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: (QA follow-up) Fix api/v1/bookings.t
Martin Renvoize [Wed, 1 May 2024 14:47:47 +0000 (15:47 +0100)]
Bug 36120: (QA follow-up) Fix api/v1/bookings.t

We now require pickup_library_id and so need to update the unit
tests to reflect that for our sample bookings

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: (QA follow-up) Fix Circulation.t
Martin Renvoize [Wed, 1 May 2024 14:41:10 +0000 (15:41 +0100)]
Bug 36120: (QA follow-up) Fix Circulation.t

We now require pickup_library_id and so need to update the unit tests to
reflect that for our sample bookings

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: (QA follow-up) Fix /biblios.t unit test
Martin Renvoize [Mon, 29 Apr 2024 14:53:01 +0000 (15:53 +0100)]
Bug 36120: (QA follow-up) Fix /biblios.t unit test

This patch adds some mock data for pickup_items getting included in the
pickup locations response.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: Restore edit
Martin Renvoize [Fri, 19 Apr 2024 15:39:46 +0000 (16:39 +0100)]
Bug 36120: Restore edit

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: (follow-up) Only display locations for bookable items
Martin Renvoize [Fri, 19 Apr 2024 15:20:42 +0000 (16:20 +0100)]
Bug 36120: (follow-up) Only display locations for bookable items

This patch updates the pickup locations picker to only include locations
for items that are bookable.

We should look at doing this on the API level as it highlights some
issues with re-using item holds pickup location rules.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: Ensure pickup location and item can be picked in either order
Martin Renvoize [Thu, 18 Apr 2024 16:56:15 +0000 (17:56 +0100)]
Bug 36120: Ensure pickup location and item can be picked in either order

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: Account for both pickup_location and date selection in items
Martin Renvoize [Thu, 21 Mar 2024 15:34:59 +0000 (15:34 +0000)]
Bug 36120: Account for both pickup_location and date selection in items

This patch ensures we account for both pickup location and date
selections having taken place before an item selection is pondered. We
now correctly disable item options given both conditions rather than it
being a race between the two.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: Re-enable 'Any item' selectable
Martin Renvoize [Thu, 21 Mar 2024 14:13:04 +0000 (14:13 +0000)]
Bug 36120: Re-enable 'Any item' selectable

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: Unit tests for pickup_locations change
Martin Renvoize [Thu, 21 Mar 2024 12:52:57 +0000 (12:52 +0000)]
Bug 36120: Unit tests for pickup_locations change

This patch adds unit tests for the additional caching of location_items
in the pickup_locations method of Koha::Biblio.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: Add unit test for pickup_library relation accessor
Martin Renvoize [Thu, 21 Mar 2024 10:32:32 +0000 (10:32 +0000)]
Bug 36120: Add unit test for pickup_library relation accessor

This patch adds a unit test for the newly introduced pickup_library
accessor added to Koha::Booking

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: Ensure pickup_library_id is NOT NULL
Martin Renvoize [Thu, 21 Mar 2024 10:16:28 +0000 (10:16 +0000)]
Bug 36120: Ensure pickup_library_id is NOT NULL

This patch updates the database schema to ensure
bookings.pickup_library_id is NOT NULL

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: Ensure existing bookings are assigned a pickup library
Martin Renvoize [Fri, 8 Mar 2024 16:00:57 +0000 (16:00 +0000)]
Bug 36120: Ensure existing bookings are assigned a pickup library

Sponsored-by: Cuyahoga County Public Library
Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: Add pickup library to bookings list table
Martin Renvoize [Thu, 7 Mar 2024 17:34:35 +0000 (17:34 +0000)]
Bug 36120: Add pickup library to bookings list table

Sponsored-by: Cuyahoga County Public Library
Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: Add pickup locations to place bookings modal
Martin Renvoize [Thu, 7 Mar 2024 13:18:19 +0000 (13:18 +0000)]
Bug 36120: Add pickup locations to place bookings modal

This patch adds a call to /biblios/biblionumber/pickup_locations to
fetch valid pickup locations for the biblio.

Upon selecting a pickup location we adapt the item select to only allow
for selecting items returned as valid for pickup at the selected
location.

Sponsored-by: Cuyahoga County Public Library
Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: Add pickup_library support to bookings API
Martin Renvoize [Thu, 7 Mar 2024 17:12:51 +0000 (17:12 +0000)]
Bug 36120: Add pickup_library support to bookings API

Sponsored-by: Cuyahoga County Public Library
Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: Add pickup_items to the pickup_locations response
Martin Renvoize [Thu, 7 Mar 2024 15:30:26 +0000 (15:30 +0000)]
Bug 36120: Add pickup_items to the pickup_locations response

This patch adds pickup_items as a list of itemnumbers that can be picked
from the library should it be selected as a pickup location.

Sponsored-by: Cuyahoga County Public Library
Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36120: Add pickup_library_id to bookings table
Martin Renvoize [Thu, 7 Mar 2024 17:06:52 +0000 (17:06 +0000)]
Bug 36120: Add pickup_library_id to bookings table

Sponsored-by: Cuyahoga County Public Library
Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com>
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36567: Get rid of Datetime warning in Circulation.t and dateexpiry.t
Emmi Takkinen [Wed, 10 Apr 2024 11:50:04 +0000 (14:50 +0300)]
Bug 36567: Get rid of Datetime warning in Circulation.t and dateexpiry.t

Running either t/db_dependent/Circulation.t or t/db_dependent/Circulation/dateexpiry.t
cause following error to be dispalyed:

You are creating a DateTime object with a far future year (9999) and a time
zone (Europe/Helsinki). If the time zone you specified has future DST changes
this will be very slow.

Smallest allowed value is 4999, so we need to use that rather than 9999 in tests.

To test prove t/db_dependent/Circulation.t and t/db_dependent/Circulation/dateexpiry.t.

Sponsored-by: Koha-Suomi Oy
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>
5 months agoBug 36673: Filter used categories and item types to current branch
Nick Clemens [Mon, 22 Apr 2024 18:12:47 +0000 (18:12 +0000)]
Bug 36673: Filter used categories and item types to current branch

To test:
1 - Define some circulation rules for default and specific branches
2 - Apply patch
3 - Confirm rules display as before

PA amended:
- bug->Bug in commit title
- squashed tidy

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36526: Remove circular dependency from Koha::Objects
Julian Maurice [Thu, 4 Apr 2024 14:26:00 +0000 (16:26 +0200)]
Bug 36526: Remove circular dependency from Koha::Objects

Koha::Objects depends on Koha::DateUtils, which depends on C4::Context,
which depends on Koha::Config::SysPrefs, which depends on Koha::Objects

Apart from the circular dependency, the dependency on C4::Context alone
is problematic as it loads a bunch of modules that are not needed at all
in Koha::Objects (YAML::XS and ZOOM for instance).
As Koha::Objects is used as a base for a lot of modules, we should take
care to only load the minimum required.

This patch removes uses of Koha::DateUtils from Koha::Objects.
It was only used in Koha::Objects::filter_by_last_update

filter_by_last_update now requires that the 'from' and 'to' parameters
must be DateTime objects. Previously it would also allow date and
datetime strings. This possibility was only used in two places:
* misc/cronjobs/cleanup_database.pl
* tools/cleanborrowers.pl

Now they call dt_from_string first and pass a DateTime object to
filter_by_last_update

Test plan:
1. Run `perl -cw Koha/Objects.pm`. It should only say:
   "Koha/Objects.pm syntax OK" without warnings
2. Run `prove t/db_dependent/Koha/Objects.t`
3. Verify that misc/cronjobs/cleanup_database.pl works as before,
   especially with the options --pseudo-transactions,
   --pseudo-transactions-from and --pseudo-transactions-to
4. Go to Tools » Batch patron deletion and anonymization, check "Verify
   you want to anonymize patron checkout history" and enter a date in
   the text input below. Then click Next and verify that the correct
   count of borrowers is shown. Click on the "Finish" button and verify
   that the circulation history has been correctly anonymized

See also bug 36432

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 months agoBug 36738: Don't copy date when repeating date fields
Shi Yao Wang [Tue, 30 Apr 2024 19:02:50 +0000 (15:02 -0400)]
Bug 36738: Don't copy date when repeating date fields

Make the repeatable date patron attribute empty when repeating the
inputs to avoid date formatting problems (and keeping past date value
after repeating is not something we want)

Test plan:
1- create a patron attribute type with is a date and repeatable checked
(administration -> patron attribute types)
2- add a couple of patron attribute of type date, notice the repeated
inputs contain previous data
3- Apply the patch
4- redo step 2 and notice the repeated inputs are empty

Follow up for bug 32610 (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32610)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36612: Add public_read_list to Koha::Ticket
Martin Renvoize [Tue, 16 Apr 2024 17:22:41 +0000 (18:22 +0100)]
Bug 36612: Add public_read_list to Koha::Ticket

Without the public_read_list to define which fields should be accessible
from the public endpoints we will always return a 500 from the API on
otherwise successfull additions of tickets via the OPAC.

Test plan
1) Enable OPACCatalogConcerns
2) Login to the OPAC and "Report a concern"
3) Note the error message in the UI "There was an error when submitting
   your concern, please contact a librarian."
4) Confirm that the concern is actually created regardless
5) Apply the patch here and restart plack
6) Submit another 'Report a concern' and now note the success message
   "Your concern was successfully submitted."

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36612: Unit test for public ticket add
Martin Renvoize [Tue, 16 Apr 2024 17:49:19 +0000 (18:49 +0100)]
Bug 36612: Unit test for public ticket add

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 25159: DBIC schema update
Katrin Fischer [Thu, 2 May 2024 14:31:05 +0000 (14:31 +0000)]
Bug 25159: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 25159: DBRev 23.12.00.043
Katrin Fischer [Thu, 2 May 2024 14:26:08 +0000 (14:26 +0000)]
Bug 25159: DBRev 23.12.00.043

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 25159: (QA follow-up) Tidy changes
Martin Renvoize [Thu, 25 Apr 2024 11:53:10 +0000 (12:53 +0100)]
Bug 25159: (QA follow-up) Tidy changes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 25159: (QA follow-up) Allow passing of 'original' as hashref or Koha::Object
Kyle M Hall [Tue, 12 Dec 2023 17:02:53 +0000 (12:02 -0500)]
Bug 25159: (QA follow-up) Allow passing of 'original' as hashref or Koha::Object

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 25159: Implement diffs in action logs for holds
Kyle M Hall [Tue, 18 Jul 2023 13:07:59 +0000 (09:07 -0400)]
Bug 25159: Implement diffs in action logs for holds

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable HoldsLog
5) Perform various hold related actions
6) Observe the diff column is populated by a JSON string
   of the diff format generated by Struct::Diff

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 25159: Add ability to specify a pre-modified version of action log data and store...
Kyle M Hall [Tue, 18 Jul 2023 13:06:36 +0000 (09:06 -0400)]
Bug 25159: Add ability to specify a pre-modified version of action log data and store as diff

Test Plan:
1) sudo cpanm Struct::Diff
2) prove t/db_dependent/Log.t

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 25159: DB Update
Kyle M Hall [Tue, 18 Jul 2023 11:00:50 +0000 (07:00 -0400)]
Bug 25159: DB Update

Signed-off-by: Kyle Hall <kyle@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35681: (follow-up) Pass filehandle in skeleton.pl
Tomas Cohen Arazi [Tue, 16 Apr 2024 14:22:38 +0000 (11:22 -0300)]
Bug 35681: (follow-up) Pass filehandle in skeleton.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35681: Use Koha::Installer::Output in template
Martin Renvoize [Tue, 16 Apr 2024 11:22:42 +0000 (12:22 +0100)]
Bug 35681: Use Koha::Installer::Output in template

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35681: Add Koha::Installer::Output
Martin Renvoize [Tue, 16 Apr 2024 11:06:54 +0000 (12:06 +0100)]
Bug 35681: Add Koha::Installer::Output

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35681: Add to template
Martin Renvoize [Wed, 10 Jan 2024 14:22:13 +0000 (14:22 +0000)]
Bug 35681: Add to template

This patch adds colors to the skeleton atomic update to hint at their
use

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35681: Use ::Bootstrap version of FromANSI
Martin Renvoize [Wed, 10 Jan 2024 10:51:27 +0000 (10:51 +0000)]
Bug 35681: Use ::Bootstrap version of FromANSI

With the next iteration of HTML::FromANSI::Tiny we can add our own subclass
to map ANSI strings to Bootstrap classes.

This patch adds a local lib HTML::FromANSI::Tiny::Bootstrap module to
do said mapping and then uses it in the installer.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35681: Add new perl dependancy
Martin Renvoize [Wed, 3 Jan 2024 09:38:34 +0000 (09:38 +0000)]
Bug 35681: Add new perl dependancy

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35681: Allow for ANSI color in database updates
Martin Renvoize [Tue, 2 Jan 2024 15:56:12 +0000 (15:56 +0000)]
Bug 35681: Allow for ANSI color in database updates

This patch adds support for colored output in database updates.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36756: Don't require status change on ticket updates
Martin Renvoize [Thu, 2 May 2024 14:09:44 +0000 (15:09 +0100)]
Bug 36756: Don't require status change on ticket updates

Follow-up for bug 35628, we lost a class during rebases that meant the
'Update' split button when status's are enabled no longer submitted
unless you explicitly selected a new status each time.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoUpdate docs/contributors.yaml
Katrin Fischer [Thu, 2 May 2024 14:18:21 +0000 (14:18 +0000)]
Update docs/contributors.yaml

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35993: (follow-up) Another fix for MarcOverlayRules.t
Marcel de Rooy [Thu, 2 May 2024 11:42:41 +0000 (11:42 +0000)]
Bug 35993: (follow-up) Another fix for MarcOverlayRules.t

We should not assume comparing within the same second. Now just
remove 005 before comparing.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35657: (follow-up) Update label to the more explicit "Notify reporter"
Katrin Fischer [Thu, 2 May 2024 12:58:30 +0000 (12:58 +0000)]
Bug 35657: (follow-up) Update label to the more explicit "Notify reporter"

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35657: (follow-up) Placeholders should be translatable
Martin Renvoize [Thu, 2 May 2024 12:17:21 +0000 (13:17 +0100)]
Bug 35657: (follow-up) Placeholders should be translatable

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35657: DBIC schema update
Katrin Fischer [Thu, 2 May 2024 11:39:50 +0000 (11:39 +0000)]
Bug 35657: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35657: DBRev 23.12.00.042
Katrin Fischer [Thu, 2 May 2024 11:34:31 +0000 (11:34 +0000)]
Bug 35657: DBRev 23.12.00.042

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35657: (follow-up) Add missing DB update
Martin Renvoize [Tue, 30 Apr 2024 12:58:38 +0000 (13:58 +0100)]
Bug 35657: (follow-up) Add missing DB update

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35657: Unit test for addition to tickets endpoint
Martin Renvoize [Fri, 26 Apr 2024 16:01:43 +0000 (17:01 +0100)]
Bug 35657: Unit test for addition to tickets endpoint

This patch adds a unit test for the additional option of now setting the
assignee from the tickets update endpoint.

Signed-off-by: Paul Derscheid <paulderscheid@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35657: Unit tests for ticket_update api addition
Martin Renvoize [Fri, 26 Apr 2024 13:48:30 +0000 (14:48 +0100)]
Bug 35657: Unit tests for ticket_update api addition

This patch adds unit tests for the addition of assignee handling in the
ticket update endpoint

Signed-off-by: Paul Derscheid <paulderscheid@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35657: Unit tests for relation accessor additions
Martin Renvoize [Fri, 26 Apr 2024 13:24:08 +0000 (14:24 +0100)]
Bug 35657: Unit tests for relation accessor additions

This patch adds the unit tests for the new 'assignee' relation accessors
added to Koha::Ticket and Koha::Ticket::Update classes.

Signed-off-by: Paul Derscheid <paulderscheid@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35657: Add option to set assignee during update
Martin Renvoize [Fri, 29 Dec 2023 11:53:25 +0000 (11:53 +0000)]
Bug 35657: Add option to set assignee during update

This patch exposes the UI to allow setting assignee from the ticket
update modal.

Test plan
1) Apply the patches and run the database updates
2) Enable catalog concerns - `CatalogConcerns` or `OPACCatalogConcerns`
3) Submit a catalog concern via the OPAC or Staff client biblio page
4) Navigate to the concerns management page 'Cataloging > Catalog
   concerns'
5) Note there is no assignee displayed in the status field for your new
   concern.
6) Click the concern to view it's details
7) Note that in the modal there is now a new 'Change assignee' option
8) Use this new option to search for and assign a librarian to the
   concern.
9) Submit the update
10) Your assignee should now appear in the 'status' data field in the
    table
11) Clicking through to details again, you should see when the assignee
    was set and should also be able to re-assign it

Signed-off-by: Paul Derscheid <paulderscheid@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35657: Add support for assignee_id to ticket_updates endpoint
Martin Renvoize [Thu, 28 Dec 2023 15:03:36 +0000 (15:03 +0000)]
Bug 35657: Add support for assignee_id to ticket_updates endpoint

This patch adds support for cross-synced ticket.assignee_id updates.

The API allows you to set assignee directly on a ticket or via a
ticket_update. In both cases we store a ticket_update with the fine
details of when and who set the assigee.

Signed-off-by: Paul Derscheid <paulderscheid@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35657: Add assignee_id to tickets and ticket_updates
Martin Renvoize [Thu, 28 Dec 2023 15:02:36 +0000 (15:02 +0000)]
Bug 35657: Add assignee_id to tickets and ticket_updates

This patch updates the tickets and ticket_updates tables to include a
assignee_id.

Signed-off-by: Paul Derscheid <paulderscheid@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36546: (follow-up) Add fallback to unbundled spec
Martin Renvoize [Wed, 1 May 2024 08:16:21 +0000 (09:16 +0100)]
Bug 36546: (follow-up) Add fallback to unbundled spec

Some developers are running without ktd still and as such may not want
to install the node modules required to bundle the specification.

This patch adds a fallback to the unbundled yaml files when the
bundle.json file isn't found.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36122: Update unit test
Matthias Le Gac [Fri, 5 Apr 2024 14:12:37 +0000 (10:12 -0400)]
Bug 36122: Update unit test

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36122: Add unit test
Matthias Le Gac [Fri, 8 Mar 2024 21:44:51 +0000 (16:44 -0500)]
Bug 36122: Add unit test

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36122: NEW_SUGGESTION is sent for every modification to the suggestion
Matthias Le Gac [Thu, 7 Mar 2024 21:55:37 +0000 (16:55 -0500)]
Bug 36122: NEW_SUGGESTION is sent for every modification to the suggestion

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36555: (QA follow-up) Tidy
Nick Clemens [Wed, 1 May 2024 10:33:43 +0000 (10:33 +0000)]
Bug 36555: (QA follow-up) Tidy

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36555: Add report_id to download file name
Andrew Fuerste Henry [Tue, 9 Apr 2024 14:51:17 +0000 (14:51 +0000)]
Bug 36555: Add report_id to download file name

To test:
- apply patch, restart all
- run a report
- export results
- confirm file name is the report ID, followed by report name

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35559: Correctly parse previous flatpickr date
Emily Lamancusa [Sun, 24 Mar 2024 20:07:16 +0000 (16:07 -0400)]
Bug 35559: Correctly parse previous flatpickr date

The Flatpickr configuration for futuredate and futuredateinclusive is
meant to allow the preexisting date, even if it is in the past, to avoid
data loss. As of Bug 30718 - Use flatpickr's alt option everywhere,
that incoming date is in yyyy-mm-dd format, not the configured
human-readable format, and needs to be parsed accordingly.

To test:
1. Place 2 holds on the same bib, both with an expiration date set
2. Set the expiration date for one of the holds to a date in the past
   (e.g., in Koha Testing Docker, use the commands:
   ktd --shell
   koha-mysql kohadev
   to access the database directly)
3. Reload the holds tab for that bib
--> Note that the future expiration date will be editable, and the past
    expiration date will not be editable
4. In a new tab, go to Administration > Patron Categories
5. Edit one patron category to have an enrolment period date in the future
6. Edit another patron category to have an enrolment period date in the
   past (e.g. by accessing the database directly, as above)
7. Reload the Edit pages for each of the above categories (in new tabs)
--> Note that the future enrolment period date will be retained in the
    date field, but the past enrolment period date will be blanked out
8. Apply this patchset
9. Refresh the holds tab from step 3
--> Note that both expiration dates are now editable
10. Refresh the 2 patron category tabs from step 7
--> Note that both enrolment dates are now retained correctly
11. Open the date picker on one of the date fields that has a past date
--> Note that other past dates, besides the existing date, are prevented

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35559: Revert changes from bug 34634
Emily Lamancusa [Sun, 24 Mar 2024 19:58:47 +0000 (15:58 -0400)]
Bug 35559: Revert changes from bug 34634

This reverts commit fad3af0005c3a4234634ee477fafc85902540843

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 15565: DBRev 23.12.00.041
Katrin Fischer [Thu, 2 May 2024 10:46:19 +0000 (10:46 +0000)]
Bug 15565: DBRev 23.12.00.041

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 15565: (QA follow-up) Add atomic update
Nick Clemens [Wed, 1 May 2024 15:29:34 +0000 (15:29 +0000)]
Bug 15565: (QA follow-up) Add atomic update

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 15565: Add 'DisplayMultiItemHolds' system preference to toggle display of multi...
David Cook [Tue, 13 Feb 2024 00:44:51 +0000 (00:44 +0000)]
Bug 15565: Add 'DisplayMultiItemHolds' system preference to toggle display of multi item holds

These patches allow the display of checkboxes instead of radio buttons for placing specific
item holds in the OPAC and staff interface. This display is controlled by the system preference
'DisplayMultiItemHolds'. When disabled, the hold display is the same as in the past. When enabled,
the user can select multiple items to place holds on at the same time.

If there is an error placing one or more holds, an error will display on the following screen.

Test plan:
0. Apply the patches and koha-plack --reload kohadev
1. Enable 'DisplayMultiItemHolds' syspref
2. In staff interface, go to a record with multiple holdable items
3. Check the boxes next to 2+ items and click the button to place the holds
4. Note that the holds are all placed (unless there is a failure)
5. Cancel the holds, and try again (but this time make Holds per record (count) only
1 in the circ rules)
6. Note that one of the holds is placed, but the others are not and an error message
is displayed saying that one or more holds could not be placed because the holds per
record was exceeded

7. Perform the same above procedure on the OPAC
8. If DisplayMultiPlaceHold is enabled, you can test placing multiple specific item holds
across multiple bibs in the OPAC via the search results
9. If EnableItemGroups and EnableItemGroupHolds is enabled, you can test that you can
either place item group holds or specific item holds. Toggling the checkboxes in the
staff interface will uncheck the item group hold radio button.

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 15565: Place multiple holds on one or more records in OPAC
David Cook [Tue, 13 Feb 2024 00:26:42 +0000 (00:26 +0000)]
Bug 15565: Place multiple holds on one or more records in OPAC

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 15565: Tidy reserve/placerequest.pl
David Cook [Mon, 12 Feb 2024 23:20:35 +0000 (23:20 +0000)]
Bug 15565: Tidy reserve/placerequest.pl

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 15565: Place multiple holds on one record on staff interface
David Cook [Mon, 12 Feb 2024 23:17:05 +0000 (23:17 +0000)]
Bug 15565: Place multiple holds on one record on staff interface

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 35977: (follow-up) Cleaner working approach
Martin Renvoize [Tue, 30 Apr 2024 15:13:25 +0000 (16:13 +0100)]
Bug 35977: (follow-up) Cleaner working approach

This patch removes the Date_from_syspref recently added and replaces it
with the correct parseDate call as per bug 35559. We also clean up the
code around setting the input value in the first place and use iso which
is what the rest of flatpickr expects and now is handled correctly in
futuredate pickers.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36614: Restore 'phone' on the main patron search
Jonathan Druart [Wed, 17 Apr 2024 10:33:24 +0000 (12:33 +0200)]
Bug 36614: Restore 'phone' on the main patron search

It disappeared at some point (history is tricky here, I didn't manage to
track down what happened, it's a mess)

This patch adds a phone column after the "name and address" one. It's
hidden by default.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36678: Index fields with non-filing characters in both versions
Nick Clemens [Tue, 23 Apr 2024 18:57:54 +0000 (18:57 +0000)]
Bug 36678: Index fields with non-filing characters in both versions

Currently we only remove non-filing characters for sort fields, however, this can make searching difficult.
This patch adds the filing form to the index as well to aid in searching.

To test:
 0 - Setup Koha with Elasticsearch
 1 - Import the sample record on this report: "L'amour de l'art"
 2 - Search for "amour de l'art" - no results
 3 - Apply patch
 4 - Reindex
 5 - Search for "amour de l'art" - result!
 6 - Search for "title:amour de l'art" - result!

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>
6 months agoBug 36678: Adjust unit tests
Nick Clemens [Tue, 23 Apr 2024 18:57:45 +0000 (18:57 +0000)]
Bug 36678: Adjust unit tests

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>
6 months agoBug 36481: (QA follow-up) Rename branch_default to library_default
Martin Renvoize [Wed, 1 May 2024 12:48:35 +0000 (13:48 +0100)]
Bug 36481: (QA follow-up) Rename branch_default to library_default

Use agreed terminology

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 months agoBug 36700: Fix CSRF-TOKEN header in image upload
David Cook [Mon, 29 Apr 2024 01:36:02 +0000 (01:36 +0000)]
Bug 36700: Fix CSRF-TOKEN header in image upload

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 months agoBug 36700: Update svc to use CSRF-TOKEN
David Cook [Mon, 29 Apr 2024 01:23:17 +0000 (01:23 +0000)]
Bug 36700: Update svc to use CSRF-TOKEN

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 months agoBug 36700: Fix underscore in CSRF header
Marcel de Rooy [Fri, 26 Apr 2024 08:32:52 +0000 (08:32 +0000)]
Bug 36700: Fix underscore in CSRF header

Also change the cache key in template plugin. And the X- header
that had an underscore in svc script.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 months agoBug 29393: (QA follow-up) Add key to Permissions test
Martin Renvoize [Wed, 1 May 2024 06:30:42 +0000 (07:30 +0100)]
Bug 29393: (QA follow-up) Add key to Permissions test

We missed adding the new superlibrarian key to the Permissions test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
6 months agoBug 32610: (follow-up) Adjust TestBuilder
Tomas Cohen Arazi [Tue, 30 Apr 2024 18:54:54 +0000 (15:54 -0300)]
Bug 32610: (follow-up) Adjust TestBuilder

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 months agoBug 36546: (QA follow-up) Add bundle spec to .gitignore
Tomas Cohen Arazi [Tue, 30 Apr 2024 18:07:12 +0000 (15:07 -0300)]
Bug 36546: (QA follow-up) Add bundle spec to .gitignore

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
6 months agoBug 36545: (follow-up) Remove closeOnSelect option
Owen Leonard [Tue, 30 Apr 2024 10:36:31 +0000 (10:36 +0000)]
Bug 36545: (follow-up) Remove closeOnSelect option

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 months agoBug 36545: (follow-up) Style tweaks for Select2 multiple fields
Owen Leonard [Fri, 12 Apr 2024 17:46:43 +0000 (17:46 +0000)]
Bug 36545: (follow-up) Style tweaks for Select2 multiple fields

This patch does some fine-tuning of Select2 style on fields which accept
multiple selections. The patch also changes the way the form rows are
displayed on this page. I thought that the Select2 fields should be
wider to accpet multiple selections without the container wrapping onto
another line.

The patch also sets the Select2 "closeOnSelect" option to false on this
page because I think that makes more sense in a situation where multiple
selections might be made.

To test, apply the patch and clear your browser cache.

- Go to item search in the staff client
- Confirm that the form looks good and adjusts well to various browser
  widths.
- Make some selections to confirm that the style of selections looks
  good and that the dropdown stays open as you make multiple selections.

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>
6 months agoBug 36545: Use select2 in item search
Michael Skarupianski [Tue, 9 Apr 2024 14:00:15 +0000 (14:00 +0000)]
Bug 36545: Use select2 in item search

This patch modifies the multi-select fields in the item search to use
the select2 framework.

To test:
1. Apply patch
2. Go to staff interface -> "Item search"
3. Check item search form and search for
      - Home library
      - Current library
      - Shelving location
      - Item type
      - Collection
      - Status
      - Lost
      - Withdrawn
      - Damaged
4. Search with multiple variations (nothing selected, only one value,
   multiple values, ...) If no value is selected this means that "All"
   values are searched
5. Check that the search is working well

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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>