]> git.koha-community.org Git - koha.git/log
koha.git
5 months agoBug 35149: Add Option to ignore submit of checkout field when empty
Stefan Berndtsson [Mon, 25 Sep 2023 12:05:06 +0000 (14:05 +0200)]
Bug 35149: Add Option to ignore submit of checkout field when empty

1) Apply patch
2) Set CircAutoPrintQuickSlip to "do nothing"
3) Go to the checkouts form for a specific patron
4) Submit the form with empty value
5) Verify that no action is taken and you stay on the current page

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36797: Change WHILE loop into FOREACH
Lucas Gass [Tue, 7 May 2024 16:03:54 +0000 (16:03 +0000)]
Bug 36797: Change WHILE loop into FOREACH

To test:
1. Find a record that has 1000 non-waiting holds with different priorities.
2. Try loading the reserve page for that record ( /reserve/request.pl?biblionumber=X )
3. Error: Template process failed: undef error - WHILE loop terminated (> 1000 iterations)
4. APPLY PATCH
5. Try again, this time the page should load.
6. Try testing on a record with less than 1000 holds, making sure the priorities are still set right.
7. Make sure you can change your priorities and everything works right.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36832: (bug 36791 follow-up) Allow authid=0
Emily Lamancusa [Fri, 10 May 2024 18:01:59 +0000 (14:01 -0400)]
Bug 36832: (bug 36791 follow-up) Allow authid=0

To test:
1. Go to the Authorities module and do a Z39.50 search that will return
   results (e.g. a general subject heading)
2. Import an authority record from the results
--> Confirm that the record is imported into the editor
3. Authorities > New, replace it via Z39.50, confirm it's imported
4. Authorities > New, fill the required fields, confirm it saves
5. Edit an existing authority, replace it via Z39.50, confirm it saves
6. Edit an existing authority, replace authid=nn in the URL with a
   number that doesn't exist like 1000000, confirm you get a 404 page

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35927: Selecting MARC framework again doesn't work when adding to basket from...
Fridolin Somers [Mon, 29 Jan 2024 09:08:00 +0000 (10:08 +0100)]
Bug 35927: Selecting MARC framework again doesn't work when adding to basket from an external source

Like Bug 19372, selecting MARC framework currently doesn't work when adding to basket from an external source.
Strangly I can reproduce on koha-testing-docker, but we have this issue with a Ubuntu Focal install.
Looks like it comes from a bad syntaxe than needs to be replaced in any case.

Test plan:
1) Add an order to a basket from an external source
2) Select another framework than the default one on the search result
   view. Before doing 'add order' on choosen search result line.
3) Chek the framework code you will pick will be used in the created biblio record

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36335: Fix ILS-DI GetRecords bad encoding for UNIMARC
Fridolin Somers [Fri, 15 Mar 2024 15:02:11 +0000 (16:02 +0100)]
Bug 36335: Fix ILS-DI GetRecords bad encoding for UNIMARC

ILS-DI GetRecords generates bad encoding of MARCXML for UNIMARC, like OAI in Bug 34467

Enable ILS-DI and display a record with :
<opac url>/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=<biblionumber>

Well-known issue, fixed
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34788: (follow-up): Fix translations
Matt Blenkinsop [Fri, 10 May 2024 14:14:54 +0000 (14:14 +0000)]
Bug 34788: (follow-up): Fix translations

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 33737: (QA follow-up) Add missing column configuration
Martin Renvoize [Fri, 10 May 2024 14:58:37 +0000 (15:58 +0100)]
Bug 33737: (QA follow-up) Add missing column configuration

I somehow missed commiting the column configuration bits.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36735: (follow-up) Fix TT filters and add a comment
Emily Lamancusa [Mon, 6 May 2024 16:04:39 +0000 (12:04 -0400)]
Bug 36735: (follow-up) Fix TT filters and add a comment

holds_table.inc depends on form-submit.js, but importing the asset
directly breaks the script. Add a comment stating that any script that
imports holds_table.inc must import form-submit.js too.

Also change uri filters to html

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36735: Fix revert hold button
Emily Lamancusa [Tue, 30 Apr 2024 19:32:13 +0000 (15:32 -0400)]
Bug 36735: Fix revert hold button

Update the revert hold button to use the new include for submitting
forms from link data with a POST request

To test:
1. Place a hold on a biblio record
2. Check an item in to fill the hold
3. On the holds tab for the biblio record, click the "Revert waiting
   status" button for that hold
--> The page reloads but the hold is still waiting
4. Apply patchset
5. Click to another page and then return to the holds tab (we don't want
   to refresh the page and resend the request)
6. Click the "Revert waiting status" button for that hold
--> The hold should be reverted to pending status

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 months agoBug 34041: (follow-up) escape double dashes to prevent issues
Tomas Cohen Arazi [Fri, 10 May 2024 12:30:53 +0000 (09:30 -0300)]
Bug 34041: (follow-up) escape double dashes to prevent issues

Having double dashes inside a commmented block is not valid XML. This
patch restores it, with an added message explaining it

To test:
1. Run:
   $ xmllint etc/z3950/config.xml
=> FAIL: You get:
etc/z3950/config.xml:5: parser error : Double hyphen within comment: <!--
  <config>
      <z3950_responder_options>
      <z3950_responder_options>--add-item-status k -t 5</z3950_responder_options
2. Apply this patch
3. Repeat 1
=> SUCCESS: All good!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34041: z3950 responder additional options not coming through properly
Liz Rea [Fri, 16 Jun 2023 17:50:35 +0000 (12:50 -0500)]
Bug 34041: z3950 responder additional options not coming through properly

This patch adds the <config> node that the z3950 responder starter script is looking for in the z3950/config.xml to the example code.

To test:
 - verify that the <config> </config> is around the commented z3950_additional_options suggestion in the etc/z3950/config.xml file
 - copy the config stanza to the live file: /etc/koha/sites/kohadev/z3950/config.xml
 - restart_all
 - ps aux | grep z3950
 - confirm the script has restarted
 - confirm the options: --add-item-status k -t 5 have been passed through

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36830: Update delete -> cud-delete
Pedro Amorim [Fri, 10 May 2024 14:14:59 +0000 (14:14 +0000)]
Bug 36830: Update delete -> cud-delete

1) Visit <staff_url>/cgi-bin/koha/tools/holidays.pl
2) Select "Holiday only on this day" (or whatever other option to add an holiday). Click 'Save.
3) Now click on that day in the calendar, pick "delete this holiday". Click 'Save'. Notice the holiday is still there.
4) Apply patch. Repeat. Notice its deleted.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 33737: (QA follow-up) Translatability
Martin Renvoize [Fri, 10 May 2024 14:15:12 +0000 (15:15 +0100)]
Bug 33737: (QA follow-up) Translatability

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 33737: Fix undefined variable issues
Martin Renvoize [Sun, 18 Feb 2024 17:25:33 +0000 (17:25 +0000)]
Bug 33737: Fix undefined variable issues

This patch resolves the undefined bookings_table variable issue reported
and also further fixes a subsequent undefined timeline bug that was
exposed by the original fix.

Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 33737: Link from patron bookings to biblio bookings
Martin Renvoize [Fri, 18 Aug 2023 10:38:53 +0000 (11:38 +0100)]
Bug 33737: Link from patron bookings to biblio bookings

Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 33737: Fix patron bookings table display issues
Martin Renvoize [Fri, 18 Aug 2023 10:21:37 +0000 (11:21 +0100)]
Bug 33737: Fix patron bookings table display issues

Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 33737: Add bookings tab to patron details
Martin Renvoize [Tue, 7 Dec 2021 14:38:06 +0000 (14:38 +0000)]
Bug 33737: Add bookings tab to patron details

This patch adds a new 'bookings' tab to the bottom of the members
details pages.  When a patron has any future or current bookings against
their record the tab will display the number of bookings in the tab name
and on clicking the tab a bookings table will display the current and
upcoming bookings.

Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35994: (follow-up) Add class for customization
Katrin Fischer [Fri, 10 May 2024 14:33:29 +0000 (14:33 +0000)]
Bug 35994: (follow-up) Add class for customization

Also wraps statuses into b instead of the SWITCH statement,
which should hopefully help to make translation a little nicer.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35994: (QA follow-up) Fix Biblio.t
Marcel de Rooy [Fri, 10 May 2024 08:37:32 +0000 (08:37 +0000)]
Bug 35994: (QA follow-up) Fix Biblio.t

A follow-up changed orders->cancel a bit. This test assumed to
cancel completed lines here. So we are doing it now with a
direct update to have the original result.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35994: Show acq_status on catalogue/detail
Marcel de Rooy [Thu, 22 Feb 2024 13:52:41 +0000 (13:52 +0000)]
Bug 35994: Show acq_status on catalogue/detail

Test plan:
Based on the described criteria, check a few biblio records.
Look at Acquisitions tab on the intranet detail page.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 months agoBug 35994: Add $biblio->acq_status
Marcel de Rooy [Thu, 22 Feb 2024 12:48:55 +0000 (12:48 +0000)]
Bug 35994: Add $biblio->acq_status

This allows you to see quickly if a biblio has linked orders or not.
And if they are all cancelled, or some still in processing, or some
are complete (and the rest cancelled).

Test plan:
Run t/db_dependent/Koha/Biblio.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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 months agoBug 36755: DBIC schema update
Katrin Fischer [Fri, 10 May 2024 14:01:40 +0000 (14:01 +0000)]
Bug 36755: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 30047: DBIC schema update
Katrin Fischer [Fri, 10 May 2024 14:02:51 +0000 (14:02 +0000)]
Bug 30047: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 30047: DBRev 23.12.00.055
Katrin Fischer [Fri, 10 May 2024 13:56:34 +0000 (13:56 +0000)]
Bug 30047: DBRev 23.12.00.055

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 30047: Unit tests
Nick Clemens [Fri, 19 Jan 2024 14:24:25 +0000 (14:24 +0000)]
Bug 30047: Unit tests

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 30047: Add new heading field to auth_header table
Nick Clemens [Fri, 19 Jan 2024 14:20:19 +0000 (14:20 +0000)]
Bug 30047: Add new heading field to auth_header table

This patch adds a new heading field containing the display form of the authority record

NOTE: If trying to save an auhority in the 'DEFAULT' framework, you will get an error, you should not be
using DEFAULT for authorities and we should remove from the list on another bug

To test:
1 - Apply patches
2 - Update database
3 - Restart all
4 - Create a new authority, save.
5 - Do this for various types
6 - View the db records:
    SELECT * FROM auth_header\G
7 - Note new heading field is populated correctly
8 - Edit your new authorities
9 - Confirm the heading field is updated correctly
10 - Import some authorities and confirm heading generated correctly
11 - Import auth via Z39.50 and confirm heading generated correctly

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 30047: DB Updates
Nick Clemens [Fri, 19 Jan 2024 14:19:32 +0000 (14:19 +0000)]
Bug 30047: DB Updates

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 33418: Add overlay_framework option to connexion scripts
Nick Clemens [Wed, 5 Apr 2023 12:49:59 +0000 (12:49 +0000)]
Bug 33418: Add overlay_framework option to connexion scripts

This patch adds the option to specify a framework to be used when overlaying records from webservices/connexion

To test:
1 - vim /etc/koha/sites/kohadev/connexion.cnf
2 - Set content:
    host:
    port: 8888
    koha:http://localhost:8081
    log:/var/log/koha/kohadev/connexion.log
    match:ISBN
    user:kohauser
    password:kohapass
    overlay_action:replace
    nomatch_action:create_new
    item_action:always_add
    import_mode:direct
    framework:BKS
    overlay_framework:
    debug:1
3 - Save the sample file from this bug into your kohaclone (or copy and paste into a file your koha test site can reach)
4 - On the command line:
    perl misc/bin/connexion_import_daemon.pl -c /etc/koha/sites/kohadev/connexion.cnf
5 - In another terminal:
    cat bug_33418.test  | nc -v localhost 8888
6 - It should report success and a biblionumber
7 - In Koha: Cataloguing->Manage staged MARC record
8 - View the most recent batch with file name (webservice)
9 - Confirm it was imported, no match
10 - Click 'View' under the 'Record' column
11 - Confirm record loads correctly and 'MARC framework' detail is 'Books, Booklets, Workbooks'
12 - On the terminal repeat the command:
    cat bug_33418.test  | nc -v localhost 8888
13 - It should succed
14 - View the new batch, confirm the record matched this time
15 - View the record details, confirm framework is now 'default'
16 - On the first terminal hit Ctrl+C to stop the daemon
16 - Edit connexion.cnf and change:
    import_mode:stage
    framework:ACQ
    overlay_framework:IR
17 - Restart daemon:
     perl misc/bin/connexion_import_daemon.pl -c /etc/koha/sites/kohadev/connexion.cnf
18 - Delete the record created above
19 - On the second terminal repeat the command:
    cat bug_33418.test  | nc -v localhost 8888
20 - Confirm the batch is created, but not imported
21 - In terminal:
     perl misc/cronjobs/import_webservice_batch.pl --framework=ACQ --overlay_framework=BKS
22 - Confirm batch imported, and record in ACQ framework
23 - In terminal:
     cat bug_33418.test  | nc -v localhost 8888
     perl misc/cronjobs/import_webservice_batch.pl --framework=ACQ --overlay_framework=BKS
24 - Confirm batch added, record matched, record imported, and record now in Books framework
25 - Stop the deamon, edit connexion.cnf:
     import_mode:direct
26 - Start the daemon, and on other terminal repeat:
     cat bug_33418.test  | nc -v localhost 8888
27 - Confirm record in Binders framework
28 - Set record framework to Books
29 - Stop daemon, edit cnf and remove 'overlay_framework' setting
30 - Start daemon and cat the file again
31 - Confirm the record remains in Books framework

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36486: Fix file perms and tidiness
Julian Maurice [Fri, 10 May 2024 08:29:13 +0000 (10:29 +0200)]
Bug 36486: Fix file perms and tidiness

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36486: Add tests for Koha::DateTime::Format::SQL
Julian Maurice [Tue, 2 Apr 2024 07:34:25 +0000 (09:34 +0200)]
Bug 36486: Add tests for Koha::DateTime::Format::SQL

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36018: (follow-up) Disambiguate quantity
Marcel de Rooy [Fri, 19 Apr 2024 07:21:57 +0000 (07:21 +0000)]
Bug 36018: (follow-up) Disambiguate quantity

One of the embeds refers to suggestions. This table also has
a quantity column.

Test plan:
Verify that Pending Orders table does load now instead of
triggering an internal server error on ambiguous column.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36018: (follow-up) Do not rely on assumed correct quantities
Marcel de Rooy [Mon, 25 Mar 2024 09:46:06 +0000 (09:46 +0000)]
Bug 36018: (follow-up) Do not rely on assumed correct quantities

Now filter_by_active checks quantities, we should ascertain that
our test data is correct, not leaving it to random values from
TestBuilder.

Test plan:
Run t/db_dependent/Koha/Acquisition/Order.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36018: $orders->filter_by_active should check quantityreceived
Marcel de Rooy [Wed, 21 Feb 2024 15:20:23 +0000 (15:20 +0000)]
Bug 36018: $orders->filter_by_active should check quantityreceived

An active order that has no items to receive any more is actually
not very active anymore :)

Test plan:
Run t/db_dependent/Koha/Acquisition/Orders.t
Enable OPACAcquisitionDetails.
Add order on basket for new biblio. Check that opac-detail does not
yet count the item as on order (since status is still new).
Close basket. Check opac-detail again. Should count it now.
Reopen basket. Cancel line. Check opac-detail again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36018: biblio->active_orders should be ->uncancelled_orders
Marcel de Rooy [Wed, 21 Feb 2024 14:39:00 +0000 (14:39 +0000)]
Bug 36018: biblio->active_orders should be ->uncancelled_orders

Active orders are more than just not cancelled. See filter_by_active
in Koha::Acquisition::Orders. They are still in the acq process; we
still need to receive items on those orders.

When we cancel and want to delete a biblio, we should check for not
cancelled orders (broader than active orders as in Orders.pm).

Test plan:
Git grep active_orders.
Run t/db_dependent/Koha/Biblio.t
Run t/db_dependent/Koha/Acquisition/Order.t
Add two order lines in a basket referring to same biblio. Try to
cancel with delete biblio. Should not be possible.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36018: Rename orders->filter_by_current
Marcel de Rooy [Wed, 21 Feb 2024 12:34:50 +0000 (12:34 +0000)]
Bug 36018: Rename orders->filter_by_current

Current is a bit misleading here. It means the ones that are not
cancelled.
We already use the filter_out_etc naming schema. So in harmony with
that, we switch it to filter_out_cancelled.

Test plan:
Run t/db_dependent/Koha/Acquisition/Order.t
Run git grep -l '::Orders' | xargs grep filter_by_current
* All occurrences should be related to Recalls, not Orders.
Go to acqui/basket.pl. Delete a whole basket who has some active
and some cancelled lines.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35907: Tidy execute_query
Kyle M Hall [Thu, 25 Jan 2024 15:27:11 +0000 (10:27 -0500)]
Bug 35907: Tidy execute_query

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35907: Add ability to log all custom report runs with or without query
Kyle M Hall [Thu, 25 Jan 2024 14:59:32 +0000 (14:59 +0000)]
Bug 35907: Add ability to log all custom report runs with or without query

Because of the way Koha::Logger has been used to log to different categories based on the interface and caller, it can be extremely hard to log all of a particular log statement to one place.

For custom report runs, the category is plack-intranet.C4::Reports::Guided when run from the web interface, cron.C4::Reports::Guided when run from runreport.pl, and plack-intranet.C4::Auth when run from svc/report.

We should add a more standardized report run log, both with and without the full query, so that administrators can log all report runs to a centralized location. If an administrator were to need the "point of entry" for reports, it is easy to include via parameters in PatternLayout.

Test Plan:
1) Apply this patch
2) Modify your log4perl file, add the following:

log4perl.logger.reports.execute.time = INFO, REPORTTIME
log4perl.appender.REPORTTIME=Log::Log4perl::Appender::File
log4perl.appender.REPORTTIME.filename=/tmp/report-time.log
log4perl.appender.REPORTTIME.mode=append
log4perl.appender.REPORTTIME.layout=PatternLayout
log4perl.appender.REPORTTIME.layout.ConversionPattern=[%d] [%p] [%P] %m%n
log4perl.appender.REPORTTIME.utf8=1

log4perl.logger.reports.execute.query = INFO, REPORTQUERY
log4perl.appender.REPORTQUERY=Log::Log4perl::Appender::File
log4perl.appender.REPORTQUERY.filename=/tmp/report-query.log
log4perl.appender.REPORTQUERY.mode=append
log4perl.appender.REPORTQUERY.layout=PatternLayout
log4perl.appender.REPORTQUERY.layout.ConversionPattern=[%d] [%p] [%P] %m%n
log4perl.appender.REPORTQUERY.utf8=1

3) Restart all the things!
4) Run a report somehow:
   CLI: ./misc/cronjobs/runreport.pl 1
   API: /cgi-bin/koha/svc/report?id=1
   Web: /cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Run this report
5) Note the report runs are logged to /tmp/report-time.log and /tmp/report-query.log

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 26567: (follow-up) Update label and add check for RoutingSerials
Katrin Fischer [Mon, 5 Feb 2024 10:20:04 +0000 (10:20 +0000)]
Bug 26567: (follow-up) Update label and add check for RoutingSerials

The system preference RoutingSerials controls if the routing list
feature is available in the staff interface or not. If routing lists
are deactivated, the search option should not show.

Also updated the label to read: "Has routing list"

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 26567: Allow to limit subscription search to subscriptions with routing lists
danyonsewell [Wed, 20 Dec 2023 04:15:06 +0000 (04:15 +0000)]
Bug 26567: Allow to limit subscription search to subscriptions with routing lists

Adds a search option to the advanced search in the
serials module that allows to limit search on subscriptions
with routing lists.

Test plan:
1. Apply this patch
2. Create two subscriptions, one with a routing list and one without
3. Navigate to Serials home and tick the checkbox labeled "Search routing lists only:"
4. Confirm that the only search result to appear is the subscription you added the routing list to
5. Run unit tests: prove t/db_dependent/Serials.t

Sponsored by: Bibliotheksservice-Zentrum Baden-Wuerttemberg

Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Perltidied changes to make QA test tools pass.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36757: (QA follow-up) Fix for action on different triggers
Martin Renvoize [Thu, 9 May 2024 12:34:06 +0000 (13:34 +0100)]
Bug 36757: (QA follow-up) Fix for action on different triggers

This patch updates the 'title' and 'comment count' links to action the
same ticket detail/update modal as the 'details' button.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Paul Derscheid <paulderscheid@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34655: (QA follow-up) Tidy the file
Martin Renvoize [Fri, 10 May 2024 12:36:25 +0000 (13:36 +0100)]
Bug 34655: (QA follow-up) Tidy the file

As we're already updating whitespace over almost the entire file, we may
as well go and tidy the whole thing too and add the /* keep tidy */
flag. (I checked for conflicts with existing bugs.. there's bug 20930
which will need a rebase, but it will already conflict and need a rebase
and is currently FQA)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34655: Prevent selenium/system_preferences_search.t to fail randomly
Jonathan Druart [Fri, 10 May 2024 08:33:26 +0000 (10:33 +0200)]
Bug 34655: Prevent selenium/system_preferences_search.t to fail randomly

Removing this JS code from document.ready.
The script tag is at the end of the DOM and there is no good reasons (at
least I didn't find any) to wait for the whole document to be ready
before executing the JS code.

It made the selenium tests selenium/system_preferences_search.t to fail
randomly with:
    #   Failed test 'The first "Policy" section (under "Accounting") is currently expanded'
    #   at t/db_dependent/selenium/system_preferences_search.t line 63.
    #          got: undef
    #     expected: 'expanded'
    # Looks like you failed 1 test of 6.

Because we set the class in this JS code and selenium won't wait for it
to finish before starting running the 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>
5 months agoBug 36380: Add filter value on patron statistics report summary
Thibaud Guillot [Thu, 21 Mar 2024 08:25:08 +0000 (09:25 +0100)]
Bug 36380: Add filter value on patron statistics report summary

Test plan:
1) Go to reports and select "Patrons"
2) Select some filters (patron category, library,..) and run it
3) Normally you will see filters selected but with blank value like
   "branch code = "
4) Apply this patch
5) Refresh

Sponsored by: BibLibre

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34788: (follow-up) Terminology: biblio record
Katrin Fischer [Fri, 10 May 2024 13:04:58 +0000 (13:04 +0000)]
Bug 34788: (follow-up) Terminology: biblio record

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34788: (QA follow-up)
Matt Blenkinsop [Wed, 8 May 2024 14:29:36 +0000 (14:29 +0000)]
Bug 34788: (QA follow-up)

This patch fixes a few things:
1) The blue dialog box now clears when navigating away from the page
2) The background job now uses skip_record_index to avoid queuing indexing jobs for every new biblio and instead queues one job at the end
3) Large files that get chunked now successfully create linked biblios if requested
4) Title matching rules have been expanded to check the package ID so that we can have duplicate titles in different packages
5) A link to the package is now included on the job report page

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34788: Allow import of file with additional columns
Matt Blenkinsop [Tue, 30 Apr 2024 10:27:48 +0000 (10:27 +0000)]
Bug 34788: Allow import of file with additional columns

This patch allows a file with additional columns to be imported. When the file is submitted, the system will enqueue the background job and send back information to the UI that certain columns have been ignored. The data will stil l import as normal but only the standard KBART columns will be parsed and imported

Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34788: Make biblio creation optional
Matt Blenkinsop [Wed, 17 Apr 2024 14:22:29 +0000 (14:22 +0000)]
Bug 34788: Make biblio creation optional

This patch rebases in the changes from bug 36618 to make biblio creation optional

Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34788: Allow for import of CSV files
Matt Blenkinsop [Thu, 19 Oct 2023 16:12:58 +0000 (16:12 +0000)]
Bug 34788: Allow for import of CSV files

This commit allows CSV files to be imported alongside TSV files.
It also adds some performance improvements relating to the max_allowed_packet and the matching of titles, as well as some small bugfixes and unit test changes

Test plan:
1) Enable the ERM module
2) Navigate to E-resource management > eHoldings > Local > Packages
3) Create at least one package
4) Navigate to E-resource management > eHoldings > Local > Titles
5) There should be a button for "Import from KBART file"
6) Click this button
7) Select the package that you created from the dropdown and then choose your KBART file using the "Choose file" button. I have attached some example files to the bug but feel free to use your own if you have them.
8) Click Submit
9) If your file is a valid file, a background job will be queued, if not then a warning will display showing what is incorrect in your file
10) To test the file format warning, edit your file and add a random column heading into the file e.g. test_column. When you upload it, the warning should show that an invalid column "test_column" has been detected
11) Click on the background job. (If you have uploaded a very large file, the system will chunk the file into smaller pieces and create multiple background jobs)
12) It should display a progress bar followed by a report and any error messages
13) Navigate to E-resource management > eHoldings > Local > Titles and you should see your new titles.
14) Run the unit test: prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t

Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34788: Add a relationship to a package for the imported file
Matt Blenkinsop [Mon, 16 Oct 2023 10:45:25 +0000 (10:45 +0000)]
Bug 34788: Add a relationship to a package for the imported file

Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34788: Add unit test
Matt Blenkinsop [Thu, 14 Sep 2023 12:39:45 +0000 (12:39 +0000)]
Bug 34788: Add unit test

Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34788: Add a background job to import a KBART file
Matt Blenkinsop [Thu, 14 Sep 2023 12:36:40 +0000 (12:36 +0000)]
Bug 34788: Add a background job to import a KBART file

This patch adds a background job that will import a KBART file

Sponsored-by: UKHSA
Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34788: Add Vue components, api client and navigation route
Matt Blenkinsop [Thu, 14 Sep 2023 12:35:08 +0000 (12:35 +0000)]
Bug 34788: Add Vue components, api client and navigation route

This patch adds a new component to handle the file import, a route to that component and the API client route needed to access the API

Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34788: Add an API endpoint to import a KBART file
Matt Blenkinsop [Thu, 14 Sep 2023 12:34:06 +0000 (12:34 +0000)]
Bug 34788: Add an API endpoint to import a KBART file

This patch adds the endpoint needed to queue an import_from_kbart_file background job

Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35925: Adjust default purchase suggestion notices to use TT
Emily Lamancusa [Mon, 15 Apr 2024 21:48:46 +0000 (17:48 -0400)]
Bug 35925: Adjust default purchase suggestion notices to use TT

1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Set syspref EmailPurchaseSuggestions to "email address of library"
4. Under Administration > Libraries, enter an email address for at least
   one library
5. Go to "my account", and enter a Primary email and Phone number
6. Go to the Acquisitions module > Suggestions page
7. Click "New purchase suggestion", and fill in values for, at minimum:
    Bibliographic information:
        Title
        Author
        Copyright date
        ISBN/ISSN
        Publisher
        Publication place
        Collection title
        Document type
        Reason for suggestion
        Notes
    Acquisition information:
        Library (set to the library you entered an email for in step 4)
        Copies
8. Submit the suggestion
9. Set the suggestion status to "Rejected"
    a. Check the checkbox next to the suggestion
    b. Set the "Mark selected as" drop-down (below the table) to Rejected
    c. Select a value for the "Reason" drop-down
    d. Click the Submit button
10. Set the suggestion status to "Accepted" (as above)
11. Set the suggestion status to "Ordered" (as above)
12. Return to "my account" and open the Notices tab
--> There should be notices suggestion declined, suggestion accepted,
    suggestion ordered, and (depending on settings) new suggestion*
13. Open each notice, and confirm the all information was filled in
    correctly

* New suggestion will be there if you're using default KTD settings/data
and logged in as the root user. If it is not there, query the database
(by command line or SQL report) to see the generated notice text:
SELECT * FROM message_queue WHERE letter_code = 'NEW_SUGGESTION'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36106: Adjust DUE and PREDUE notices to use TT
Emily Lamancusa [Thu, 25 Apr 2024 20:54:16 +0000 (16:54 -0400)]
Bug 36106: Adjust DUE and PREDUE notices to use TT

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Enable SMS Notices
    a) Find the system preference SMSSendDriver
    b) Enter "Email" as the value for SMSSendDriver and save
4. Go to a patron account, and set the following messaging preferences:
    Item due:
        - Check SMS
        - Check Email
        - Leave Digests only unchecked
    Advance notice
        - Select 1 day in advance
        - Check SMS
        - Check Email
        - Leave Digests only unchecked
5. Go to the checkout tab for that patron
6. Set a custom due date for today and check out an item
7. Set a custom due date for tomorrow and check out another item
8. Run the cron job to generate notices:
   misc/cronjobs/advance_notices.pl -v -c
9. Open the Notices tab on that patron's account
--> The patron should have four notices:
    Item due reminder (one for SMS and one for email)
    Advance notice of item due (one for SMS and one for email)
10. Open each notice and confirm that all information is correct

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36126: Adjust default HOLD notices to use TT
Emily Lamancusa [Mon, 29 Apr 2024 20:01:59 +0000 (16:01 -0400)]
Bug 36126: Adjust default HOLD notices to use TT

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Enable SMS Notices
    a) Find the system preference SMSSendDriver
    b) Enter "Email" as the value for SMSSendDriver and save
4. Go to a patron account, and set the following messaging preferences:
    Hold filled:
        - Check SMS
        - Check Email
        - Leave Digests only unchecked
5. Leave SMS number and all email address fields blank for that patron
6. Place a hold for that patron
7. Check in an item to fill the hold
8. Open the Notices tab on that patron's account
--> The patron should have a Print "hold filled" notice, since they
don't have an email address or SMS number in the system
9. Add a Primary email and SMS number to the patron account
10. Place another hold for that patron
11. Check in an item to fill the hold
12. Go back to the Notices tab on that patron's account
--> The patron should now have Email and SMS "hold filled" notices as well
13. Open each notice and confirm that all information is correct

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36113: Adjust default RENEWAL notice template to use TT
Emily Lamancusa [Mon, 15 Apr 2024 21:21:37 +0000 (17:21 -0400)]
Bug 36113: Adjust default RENEWAL notice template to use TT

Test plan:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Enable the system preference RenewalSendNotice
4. Check an item out to a patron
5. Edit that patron:
    a. Enter a value for Primary email
    b. Set messaging preference to enable email notices for Item
       checkout and renewal
6. Renew the checked-out item
7. Check the patron's Notices tab for the Item renewal notice, and
   confirm that the notice is correct

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 months agoBug 36125: (follow-up) Use $KohaDates
Emily Lamancusa [Tue, 30 Apr 2024 12:54:20 +0000 (08:54 -0400)]
Bug 36125: (follow-up) Use $KohaDates

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36125: Adjust default HOLD_SLIP to use TT
Emily Lamancusa [Thu, 25 Apr 2024 21:03:20 +0000 (17:03 -0400)]
Bug 36125: Adjust default HOLD_SLIP to use TT

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Find a patron and make sure their account contains values for
   all of the following fields:
   First name
   Surname
   Card number
   Phone
   Address
   Address 2
   City
   Zipcode
   Email
4. Place a hold for this patron, specifying a hold note
5. Check in an item to fill the hold and click "Confirm and print slip"
6. Confirm that all information on the hold slip is correct

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36608: Adjust TO_PROCESS and AVAILABLE to use TT
Emily Lamancusa [Thu, 25 Apr 2024 20:17:41 +0000 (16:17 -0400)]
Bug 36608: Adjust TO_PROCESS and AVAILABLE to use TT

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Go to "my account", and enter a Primary email
4. Under Administration > Libraries, enter an email address for at least
   one library
5. Add the demo user (koha) as the owner of the Main Fund
    a) Go to the Acquisitions module
    b) Click on Main Fund
    c) Click the Actions button at the end of Main Fund row > click Edit
    d) Click "Select owner"
    e) Search for "koha"
    f) Click the Select button
    g) Click Submit
6. Click "Suggestions" on the left side of the page, and click "New
   purchase suggestion"
7. Fill in values for, at minimum:
    Bibliographic information:
        Title
        Author
    Acquisition information:
        Library (set to the library you entered an email for in step 4)
        Fund (set to Main Fund)
9. Submit the suggestion
10. Run the cron job to generate TO_PROCESS notification email:
misc/cronjobs/notice_unprocessed_suggestions.pl -v -c --days=0
11. Set the new suggestion to "Accepted"
    a) Check the checkbox next to the new suggestion
    b) Below the table, set "Mark selected as" drop-down to "Accepted"
    c) Click Submit
12. Create an order from the purchase suggestion
    a) Return to the Acquisitions homepage
    b) Leave the Vendor field blank and click Search
    c) Next to the sample basket (My Basket), click "Add to basket"
    d) Click "From a suggestion"
    e) Click "+ Order" next to the suggestion
    f) Make sure there are values for all required item fields
    g) Click "Add item"
    h) Click Save
13. Close the basket and receive the order
    a) Click "Close basket" and click "Yes, close"
    b) Click "Receive shipments"
    c) Enter a number in "Vendor invoice" and click Next
    d) Check the checkbox next to "My Basket" and click "Receive
       selected" button
    e) Check the checkbox under "Receive?" in the Items table
    f) Click Confirm
14. Return to "my account" and open the Notices tab
--> There should be (among others) notices for "A suggestion is ready to
    be processed" and "Suggested purchase available"
15. Open each of the above two notices, and confirm all the information
    was filled in correctly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36823: Switch database schema links in Reports from master to main
Phil Ringnalda [Thu, 9 May 2024 22:45:45 +0000 (15:45 -0700)]
Bug 36823: Switch database schema links in Reports from master to main

Test plan:
1. Reports > click Database schema link, verify it gets a 404 not foun
2. Reports > Use saved > click Database schema link, verify 404
3. Apply patch
4. Reports > click Database schema link, verify it loads as main
5. Reports > Use saved > click Database schema link, verify it loads

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36824: Fix conversion of __VERSION__ in system preferences to use main rather...
Phil Ringnalda [Thu, 9 May 2024 23:31:56 +0000 (16:31 -0700)]
Bug 36824: Fix conversion of __VERSION__ in system preferences to use main rather than master

Test plan:
1. Administration > search system preferences for the words database columns
2. Click the links to schema.koha-community.org, note that they 404 with
   /master/ in the URL
3. Apply patch, reset_all
4. Search again, click the links, note that they load successfully with /main/

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36676: SIP2 drops connection on unknown patron id in fee paid message
Jan Kissig [Tue, 23 Apr 2024 18:19:05 +0000 (20:19 +0200)]
Bug 36676: SIP2 drops connection on unknown patron id in fee paid message

When sending a fee paid message to SIP2 with an unknown patron id it will respond with an empty response followed by dropping the connection to a client.

Test plan:
a) perl /usr/share/koha/bin/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1   -l CPL --patron 2352900100046 -m fee_paid --fee-type FT --fee-amount 0.01
Output:
Trying 'fee_paid'
SEND: 3720240423    124447FT00USDBV0.01|AO|AA2352900100046|ACterm1|
Use of uninitialized value $data in concatenation (.) or string at /usr/share/koha/bin/sip_cli_emulator.pl line 355, <GEN0> chunk 1.
READ:

b) apply patch
c) perl /usr/share/koha/bin/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1   -l CPL --patron 2352900100046 -m fee_paid --fee-type FT --fee-amount 0.01
Output:
Trying 'fee_paid'
SEND: 3720240423    125602FT00USDBV0.01|AO|AA2352900100046|ACterm1|
READ: 38N20240423    125602AO|AA2352900100046|AFInvalid patron barcode.|

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 months agoBug 35812: Fix search URL aliases in Plack Apache config
Michał Kula [Wed, 27 Mar 2024 12:25:49 +0000 (13:25 +0100)]
Bug 35812: Fix search URL aliases in Plack Apache config

Mimic missing stuff from apache-shared-opac.conf into apache-shared-opac-plack.conf, where /search and /opac-search.pl aliases were missing.

Note that while RewriteRule applies before reverse proxy directives and works, ScriptAlias applies purely to standard cgi perl scripts, meaning it didn't apply there.

Now it's mimicked analogously to how /index.html is configured.

This patch fixes an issue where someone might have just a reverse proxy to Plack configured without native Perl scripting, where this URL would then otherwise be failing.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35812: specify canonical URL for the main page
Michał Kula [Wed, 27 Mar 2024 09:20:17 +0000 (10:20 +0100)]
Bug 35812: specify canonical URL for the main page

Currently main page can be accessed by:
- /
- /index.html
- /cgi-bin/koha/opac-main.pl

This specifies the canonical link for all of them to be "/", to aid search engines in assessing what's url to put in the index.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35812: Add canonical URL for biblio details page
Michał Kula [Wed, 27 Mar 2024 09:16:06 +0000 (10:16 +0100)]
Bug 35812: Add canonical URL for biblio details page

This adds a nice canonical URL for search engines to use. Will prevent duplicates with different URL query parameters from getting indexed separately, will also prevent search engine confusion when opac-search.pl redirects to opac-detail.pl when there's just one result.

Should result in prettier/simpler URLs in the search engines too, plus removal of constant warnings in Google Search Console and other tools.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35812: add noindex attribute to search result pages in OPAC
Michał Kula [Wed, 27 Mar 2024 08:25:37 +0000 (09:25 +0100)]
Bug 35812: add noindex attribute to search result pages in OPAC

This will prevent search engines from putting the search results pages into their indexes, to prevent cluttering of the search results and give better visibility to the actual bibliographic records' pages.

Note that "noindex" is separate from "nofollow", meaning that the search engine is allowed to get and process the search results page and extract ("follow") further links from it, such as links to biblio records, which is exactly what we want.

This approach is better to the sitemaps, which search engines are free to choose whether to use or not, based on multiple factors such as the size of the page. In practice for small pages Google will just not download them at all, meaning that indexing by following links around is the only way the indexer will extract any links.

Note that for this to work properly, you must NOT block the affected pages in your robots.txt file (they're not blocked by default).

Also, this patch moves "cssinclude" block in opac-results.tt inside of <head>, because in all other templates it's inside, meaning its current positioning is a small mistake I fixed while at it.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36503: (follow-up) Fix tests count
Tomas Cohen Arazi [Fri, 10 May 2024 12:03:46 +0000 (09:03 -0300)]
Bug 36503: (follow-up) Fix tests count

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36503: Move and update unit test
Martin Renvoize [Fri, 3 May 2024 11:34:33 +0000 (12:34 +0100)]
Bug 36503: Move and update unit test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36503: Fix unit tests
Martin Renvoize [Fri, 3 May 2024 10:19:42 +0000 (11:19 +0100)]
Bug 36503: Fix unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36503: (follow-up) Use the call method of Koha::Plugins
Raphael Straub [Thu, 2 May 2024 09:19:32 +0000 (09:19 +0000)]
Bug 36503: (follow-up) Use the call method of Koha::Plugins

This removes the option to call multiple plugins in a prioritized order,
but this is not needed if there is only one plugin that uses this hook.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36503: (follow-up) Move the plugin hook to include the domain
Raphael Straub [Wed, 24 Apr 2024 13:48:37 +0000 (13:48 +0000)]
Bug 36503: (follow-up) Move the plugin hook to include the domain

This allows the plugin to read/change the domain.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36503: Add a plugin hook after user authentication
Raphael Straub [Thu, 28 Mar 2024 12:31:15 +0000 (12:31 +0000)]
Bug 36503: Add a plugin hook after user authentication

This plugin hook allows to change patron data or define the patron
based on the authenticated user.

To test: Run
prove t/db_dependent/Koha/Auth/Client.t

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 31627: (follow-up) Update -Id to -ID
Katrin Fischer [Fri, 10 May 2024 12:04:02 +0000 (12:04 +0000)]
Bug 31627: (follow-up) Update -Id to -ID

This also makes it match with the Message-ID.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 31627: (QA follow-up) Tidy test block
Martin Renvoize [Wed, 8 May 2024 12:32:14 +0000 (13:32 +0100)]
Bug 31627: (QA follow-up) Tidy test block

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 31627: (QA follow-up) Catch more locations
Martin Renvoize [Wed, 8 May 2024 12:22:02 +0000 (13:22 +0100)]
Bug 31627: (QA follow-up) Catch more locations

This patch moves the header set into Koha::Email->create and passes the
template_id in a few additional locations to ensure we catch more cases.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 31627: Add ability to embed the letter id in outgoing email notices
Kyle Hall [Mon, 26 Sep 2022 16:23:33 +0000 (12:23 -0400)]
Bug 31627: Add ability to embed the letter id in outgoing email notices

It can be useful to know exactly what template was used to generate a notice. To further this end, it would be useful be able to send the letter id as part of any emails sent out if there is a letter template associated with the message.

Test Plan:
1) Apply this patch
2) Restart all the things!
3) Generate an email notice like a checkout notice
4) Inspect the email headers, note the new X-Koha-Template-Id and
   X-Koha-Message-Id headers!

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36388: Mouse operation does not work in draggable fields in authority editor
Janusz Kaczmarek [Thu, 21 Mar 2024 15:20:24 +0000 (16:20 +0100)]
Bug 36388: Mouse operation does not work in draggable fields in authority editor

When using the authority editor in Firefox, it is not possible to set
the cursor or select text from the text field.

This patch mimics the corrections made in bug 35425 for biblio editor.

Test plan:
==========
1. Start editing an existing authority record and try to put the cursor
   with the mouse in the middle of the content of any subfield or to
   select text with the mouse. It should not be possilbe.
2. Apply the patch (reload plack etc.).
3. Repeat p. 1 - everything should work as expected.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36775: (QA follow-up) Remove max_length attribute
Emily Lamancusa [Thu, 9 May 2024 16:32:35 +0000 (12:32 -0400)]
Bug 36775: (QA follow-up) Remove max_length attribute

The existing code for "Holds to place (count)" sets the input field's
maxlength to remaining_holds_for_record, which does not do what we want
and makes the field unusable when the circulation rules allow unlimited
holds. Better to remove it.

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36775: Allow multiple holds on record when holds per record is unlimited
Andrew Fuerste Henry [Thu, 9 May 2024 16:00:12 +0000 (16:00 +0000)]
Bug 36775: Allow multiple holds on record when holds per record is unlimited

To test:
1 set Holds Per Record to Unlimited
2 confirm hold placement interface does not include "Holds to place (count)"
3 apply patch, restart all
4 reload hold placement interface, confirm it does include "Holds to place (count)"
5 set Holds Per Record to 2
6 confirm Holds to place shows when placing a first hold for a patron, but not when placing a second
7 set Holds Per Record to 1
8 confirm Holds to Place does not show
9 sign off and eat a nice snack

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36791: (QA follow-up) Simplify conditional
Emily Lamancusa [Thu, 9 May 2024 15:26:52 +0000 (11:26 -0400)]
Bug 36791: (QA follow-up) Simplify conditional

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36791: Koha explodes when trying to edit an authority rec. with an invalid authid
Janusz Kaczmarek [Mon, 6 May 2024 11:44:26 +0000 (11:44 +0000)]
Bug 36791: Koha explodes when trying to edit an authority rec. with an invalid authid

When trying to open the authority editor with authid=<invalid_authid>
(e.g. a deleted authid) Koha explodes with a message:
Can't call method "authtypecode" on an undefined value at
/kohadevbox/koha/authorities/authorities.pl line 556

This this because authtypecode method is called on the result of
->find without verifying that it was succesful.

Test plan:
==========
1. Try to edit an auth rec. giving as a authid (in URL) a non-existing
   authid, e.g. in ktd, with standard ktd test data:
   http://your_ktd:8081/cgi-bin/koha/authorities/authorities.pl?authid=100000
   Koha should explode with the message:
   Can't call method "authtypecode" on an undefined value at
   /kohadevbox/koha/authorities/authorities.pl line 556
2. Apply the patch; restart_all.
3. Repeat p. 1.  You should get the 404 error page.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 27363: Restore temporary selection of Z39.50 targets throughout multiple searches
Phil Ringnalda [Thu, 2 May 2024 23:19:17 +0000 (16:19 -0700)]
Bug 27363: Restore temporary selection of Z39.50 targets throughout multiple searches

The advanced editor currently saves which Z39.50 servers are selected
in local storage using the index in the sorted array of servers, and
then misreads them back as though they were server_ids. We want them to
be server_ids, since that's immutable and the index can change with
changes in rank or server name.

We use the data-server-id property in the HTML more often as a server_id
than as the index that's currently stored there, so this patches
switches it back to be the server_id, and in the one place we would use
the index, instead uses Array.find to just get the server object instead
of referencing it by index.

Test plan:
 1. Set the preference EnableAdvancedCatalogingEditor to enable
 2. Administration - Z39.50 Servers, for NATIONAL LIBRARY OF FRANCE
    uncheck "Preselected"
 3. To be sure you don't have confusing saved preferences, open
    Firefox's Developer Tools, in the Storage tab open Local Storage and
    select your URL
 4. In the row for cateditor_preferences_{your Koha user id}, if there
    are any values for selected_search_targets, delete them so you
    have "selected_search_targets":{}
 5. Open the advanced editor, and click "Advanced »" in the search box
 6. You should have Local catalog unchecked, LIBRARY OF CONGRESS checked
    because it is preselected, and NATIONAL LIBRARY OF FRANCE unchecked
 7. Toggle each checkbox so Local catalog and France are selected, and
    LoC is unselected.
 8. In a new broser tab, open the advanced editor, and click "Advanced »"
 9. You will see Local catalog unchecked, LoC checked, and France
    unchecked.
    That's the bug.
10. Apply patch, open the advanced editor in a new tab, click "Advanced »"
11. Toggle the checkboxes so Local catalog and France are selected, and
    LoC is not selected.
12. Open the advanced editor in another new tab, click "Advanced »"
13. You should see what you just set, Local catalog and France checked,
    and LoC unchecked, That's the correct behavior.

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>
5 months agoBug 36804: Fix clear filter
Pedro Amorim [Tue, 7 May 2024 15:46:23 +0000 (15:46 +0000)]
Bug 36804: Fix clear filter

1) Visit serials and click "New subscription":
http://localhost:8081/cgi-bin/koha/serials/serials-home.pl
2) Enter '112' on the record input and '1' on the vendor input. Click "Next"
3) 'First issue publication date' -> Enter some date in the past
4) 'Frequency' -> Enter '2/day'
5) 'Subscription start date' Same as step 3)
6) 'Subscription end date' Some date in the future
7) 'Numbering pattern' -> Enter 'Number'
8) Click 'Test prediction pattern'. Click 'Save subscription'
9) On the left side menu -> Click "Serial collection". Click the yellow button 'Edit serials'
10) On the first serial, edit the status to 'Late'. Save.
11) Visit serials claims:
http://localhost:8081/cgi-bin/koha/serials/claims.pl?supplierid=1
12) Input some dates in "From" and "To"
13) Click 'Clear filter'. Notice it doesn't work.
14) Apply patch. Repeat.

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 months 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>
5 months 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>
5 months agoBug 36774: Add cypress tests
Pedro Amorim [Wed, 8 May 2024 15:26:52 +0000 (15:26 +0000)]
Bug 36774: Add cypress tests

Inside k-t-d, run:
cypress run --spec t/cypress/integration/flatpickr_spec.ts

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36774: Remove wrapper if already exists
Pedro Amorim [Fri, 3 May 2024 14:07:25 +0000 (14:07 +0000)]
Bug 36774: Remove wrapper if already exists

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 34360: Get distinct biblionumber
Nick Clemens [Thu, 11 Jan 2024 11:53:42 +0000 (11:53 +0000)]
Bug 34360: Get distinct biblionumber

This fixes the problem noted in the bug:
[WARN] DBIx::Class::ResultSetColumn::new(): Attempting to retrieve non-unique column 'biblionumber' on a resultset containing one-to-many joins will return duplicate results. at /usr/share/koha/Koha/Objects.pm line 421

We are taking a list of items, assuming the scenario is that these are from a single biblio and possibly some host_items, then searching and ordering conditionally on whether the biblio is a serial.

Current code gets the first biblio from the list - this patch adds a 'DISTINCT' to the results ebfore fetching the column

To test:
1 - Find a biblio in the staff interface
2 - Transfer one of the items a few times
3 - Recreate the issue on the command line:
    export DBIC_TRACE=1
    perl -e 'use Koha::Items; my $items = Koha::Items->search({biblionumber=>9})->search_ordered(undef,{ prefetch => ['issue','current_branchtransfers'] }); $items->next'
4 - Note warning:
    DBIx::Class::ResultSetColumn::new(): Attempting to retrieve non-unique column 'biblionumber' on a resultset containing one-to-many joins will return duplicate results. at /kohadevbox/koha/Koha/Objects.pm line 426
5 - Apply patch
6 - Repeat 3
7 - Error is gone

Signed-off-by: baptiste <baptiste.bayche@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36582: Fix regressions.t
Jonathan Druart [Fri, 10 May 2024 08:04:40 +0000 (10:04 +0200)]
Bug 36582: Fix regressions.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 35138: (follow-up) Mark DisplayLibraryFacets as zebra only
Jonathan Druart [Wed, 8 May 2024 12:35:11 +0000 (14:35 +0200)]
Bug 35138: (follow-up) Mark DisplayLibraryFacets as zebra only

The tests are no longer relevant

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 months agoBug 36687: (RM follow-up) Fix more unit tests
Martin Renvoize [Thu, 9 May 2024 07:58:46 +0000 (08:58 +0100)]
Bug 36687: (RM follow-up) Fix more unit tests

Use currency.active to test `int(1) DEFAULT NULL` now that itemtypes.notforloan
is `NOT NULL DEFAULT '0'`

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 months agoBug 36687: (RM follow-up) Fix unit tests
Martin Renvoize [Thu, 9 May 2024 07:40:18 +0000 (08:40 +0100)]
Bug 36687: (RM follow-up) Fix unit tests

Set notforloan to '0' as apposed to 'undef' for tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 months agoBug 19768: DBRev 23.12.00.054
Katrin Fischer [Wed, 8 May 2024 17:53:44 +0000 (17:53 +0000)]
Bug 19768: DBRev 23.12.00.054

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 19768: (follow-up) Database update
Owen Leonard [Wed, 8 May 2024 17:37:59 +0000 (17:37 +0000)]
Bug 19768: (follow-up) Database update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 19768: Add "Title notes" tab to OpacSerialDefaultTab preference
Owen Leonard [Tue, 30 Apr 2024 12:08:09 +0000 (12:08 +0000)]
Bug 19768: Add "Title notes" tab to OpacSerialDefaultTab preference

This patch adds a "title notes tab" option to the opacSerialDefaultTab
preference.

To test, apply the patch and restart services.

- Go to Administration -> System preferences -> opacSerialDefaultTab.
- There should now be a new options, "title notes tab."
- Set the preference to the new value.

- Go to the OPAC and locate a bibliographic record which is associated
  with a subscription and which has data in a 5XX notes field.
- On the bibliographic detail page the "Title notes" tab should be
  selected by default.
- Test that the other system preference values still work correctly too.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36618: (QA follow-up) Hide option for titles with no linked record
Matt Blenkinsop [Wed, 8 May 2024 10:30:10 +0000 (10:30 +0000)]
Bug 36618: (QA follow-up) Hide option for titles with no linked record

This patch hides the "Update linked biblio" option for titles that have been created with no linked biblio record

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36618: Add unit tests
Matt Blenkinsop [Wed, 17 Apr 2024 10:34:49 +0000 (10:34 +0000)]
Bug 36618: Add unit tests

prove t/db_dependent/api/v1/erm_eholdings_titles.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoBug 36618: Make biblio creation optional for ERM local titles
Matt Blenkinsop [Wed, 17 Apr 2024 10:31:27 +0000 (10:31 +0000)]
Bug 36618: Make biblio creation optional for ERM local titles

This patch makes biblio creation on local title creation optional.

Test plan:
1) Navigate to the local title creation form
2) Create a title and leave the "Create record" box unchecked
3) Submit the form
4) Search the catalogue for the title you have just created - no biblio result will be available
5) Repeat steps 2 - 3 but this time check the box to create a record
6) You should now be able to find a record in the catalogue for the title you just imported

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
5 months agoRevert "Bug 34263: Suspending holds consecutively populates previously used date...
Katrin Fischer [Wed, 8 May 2024 17:43:22 +0000 (19:43 +0200)]
Revert "Bug 34263: Suspending holds consecutively populates previously used date falsely"

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