]> git.koha-community.org Git - koha.git/log
koha.git
15 months agoBug 33858: Format dates in offline circ
Jonathan Druart [Wed, 7 Jun 2023 08:57:37 +0000 (10:57 +0200)]
Bug 33858: Format dates in offline circ

1 - check item 3999900000001 out to a patron
2 - upload the attached KOC file from bug 33838
3 - navigate to pending offline circ actions
4 - verify that the date is shown unformatted
5 - apply patch
6 - verify that the date is now shown formatted

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Univ Brest <cecile.lambour@univ-brest.fr>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3e15d728e5698bd9afe512a53456da0560cdc5c9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6bb6b7797d2bd374c7523c9f20d3781a495e2457)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34131: (QA follow-up) Update page title to reflect breadcrumbs and side-menu...
Pedro Amorim [Fri, 7 Jul 2023 10:46:14 +0000 (10:46 +0000)]
Bug 34131: (QA follow-up) Update page title to reflect breadcrumbs and side-menu behaviour

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eef588d71c3c53884df0b8b2917528028b81f2b4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 05c6a2c042f07a50ff573b41b1dd6b5096ae69f8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34131: (QA follow-up): Add 'ill_availability_services' to method filter check
Pedro Amorim [Fri, 7 Jul 2023 10:34:22 +0000 (10:34 +0000)]
Bug 34131: (QA follow-up): Add 'ill_availability_services' to method filter check

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cfee701b85b5e05e946440ccf9a8bc463f53a0c1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit eb0182bd2ded037976a66907d652e7c97fed5e30)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34131: Add 'current' class on correct side menu link
Pedro Amorim [Tue, 27 Jun 2023 12:38:09 +0000 (12:38 +0000)]
Bug 34131: Add 'current' class on correct side menu link

This changes the way we're looking for the correct menu item to set as
active.

If we don't find an exact match for path+params, we attempt to set
'current' to just matching on path.

What this does is it sets the 'Plugins' menu item as active, even if
the url is 'plugins-home.pl?method=report

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 680bf6af2faa3b1612e16f77ec58daf129ef431a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 919ba4ab3e1aee446e98769b94d9652aba937402)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34131: Update breadcrumbs and side bar
Pedro Amorim [Tue, 27 Jun 2023 12:33:16 +0000 (12:33 +0000)]
Bug 34131: Update breadcrumbs and side bar

Update plugins-home accordingly if tool plugins only filter is being
used or not.
Update breadcrumbs for plugins-disabled page

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 053439e50bd59a981a7f8c727818520653f484b5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5d923bf69fde1d1bd7186012a7c3d0e972a61950)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33790: Fix and add various links to the manual
Katrin Fischer [Mon, 29 May 2023 19:39:03 +0000 (19:39 +0000)]
Bug 33790: Fix and add various links to the manual

* Makes the move from tools to cataloguing for the pages linked
  from the cataloguing start page
* Adds missing help links to admin and tools pages
* Fix other existing links

To test:
* Best is to look at the patch, you'll see the pages you need
  to test on the left.
* Open the page and access the help page through the help link
  Note: for a few links you'll need to update the version in the
  URL to 23.05 (identity providers is one) as the page doesn't
  exist yet in the 22.11 manual

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c3b1d009bf1b5eddfbb90d775846a007146ca3ae)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4c8a0e42ee13eedc35d8dfbb1f424f9a964ef1d1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34107: Switch order for id and name feeding the first column in datatables
Pedro Amorim [Tue, 4 Jul 2023 15:26:27 +0000 (15:26 +0000)]
Bug 34107: Switch order for id and name feeding the first column in datatables

Test plan:
* Create 3 agreements, agreement #1 named 'a', agreement #2 named 'c' and agreement #3 named 'b'.
* Go to agreements list, click the Name column header, notice how the agreements get sorted by id #, not by first char in name. Expected order would be abc or cba, but it's acb or bca.
* Apply patch, on k-t-d, run the following if you're not using 'yarn js:watch':
    yarn js:build
* Sort the list again on the 'name' column, notice how it now sorts alphabetically as expected, either abc or cba.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f3cc00d945ecdd74f84c9183e3fb9655248b0e68)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1009fc17dff823b9da25ab0655cae4016a94c4ea)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34002: Check for stage_marc_import permssion
Lucas Gass [Tue, 13 Jun 2023 19:41:48 +0000 (19:41 +0000)]
Bug 34002: Check for stage_marc_import permssion

-1 Log in to the staff client as a user who has  Acquisition management (acquisition) permissions but not the stage_marc_import (tools) permission.
-2 Go to Acquisitions and Add to a basket.
-3 Select 'From a new file'
-4 You will be logged out as the user does not have percussion to visit that page.
-5 Apply patch
-6 Try again, you will not see the link for 'From a new file' if you don't have the permssion.
-7 Give the user the stage_marc_import, you will now see the link

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4e1a2f148c91bc2438410f3e71c91f8deb889b91)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 44ab05d7b7ff313d1cd22489518dc9f771fdd53c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34174: (bug 33341 follow-up) Fix Ris export
Jonathan Druart [Wed, 5 Jul 2023 14:45:19 +0000 (16:45 +0200)]
Bug 34174: (bug 33341 follow-up) Fix Ris export

Bug 33341 incorrectly fix the perlcritic warning.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6a2ef1a82de62c6e245933e91ec795f39f1a4ada)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 452a98f67b440559249eb7fceddd838ce357d05c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33667: Allow copying holidays to all libraries when editing
Emmi Takkinen [Tue, 23 May 2023 12:29:12 +0000 (15:29 +0300)]
Bug 33667: Allow copying holidays to all libraries when editing

When editing an existing holiday and checking the
"copy to all libraires" checkbox, the other calendars won't
get updates. Allow this by first checking if holiday exists
in target calendar and if not, add it.

To test:
1. Add unique holiday to branch A.
2. Don't check checkbox "Copy to all libraries".
3. Save.
4. Verify the holidays shows on all calendars as
a green box.
5. Edit the holiday, now check "Copy to all libraries"
and save.
=> Verify nothing has changed in other calendars:
only the green box, no holiday in list on the right
6. Edit again, make a change to description,
check checkbox, save.
=> Verify it's still not showing in the other
calendars.
9. Apply this patch.
10. Edit holiday again, check "Copy to all libraries"
and save.
=> Verify holiday is now added to other calendars.
11. Edit again, this time do not copy and save.
=> Verify holiday was edited just in branch A.
12. Again edit, check and save.
=> Verify holiday was edited in all libraries.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 83589f0317068a5cd2da7b5524ea6b6b738dfdfe)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8a342549536ee92d4bcf84aaebff0a4e0f50e12c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 18855: Don't create duplicate overdue fines if an issue is returned
Michael Hafen [Thu, 19 Jan 2023 21:56:31 +0000 (14:56 -0700)]
Bug 18855: Don't create duplicate overdue fines if an issue is returned

This includes Jonathan's followup

If cronjobs/fines.pl is running during circulation hours, then an issue may
be considered for having it's overdue fine updated after the issue has been
returned and it's fine status flipped from 'UNRETURNED' to 'RETURNED'.  In
this case UpdateFine will create a duplicate fine because it can't find the
specific accountline for the (formerly) overdue issue.

This changes cronjobs/fines.pl to double check the issue before updating
the fine.  If the issue has changed between starting the script and updating
the fine, then the script will skip it.

There is a small amount of time between the check and calling UpdateFine
where the issue can be changed and this problem can reoccure.  The chance
of that happening is so small that it's probably fine to leave as is.

It is also possible that the fine won't be updated because the issue was
returned.  In this case the fine payed by the patron will be lower, but that
is better then the patron finding later that there is more to a fine they
thought they had paid all of.

Test plan (by Caroline):
0. Preliminary settings
   0.1. finesMode system preference must be set to Calculate and charge
   0.2. There must be a circulation rule that will charge fines (beware of bug 32271)
   0.3. In Tools > Calendar, today must not be a holiday

1. Make a lot of overdue checkouts - I used the batch checkout feature, but if your system already has a lot of overdue checkouts, you can skip to step 2

   1.1. Enable batch checkouts
        1.1.1. Go to Administration > Global system preferences
        1.1.2. Search for BatchCheckouts
        1.1.3. Set BatchCheckouts to Allow
        1.1.4. Select all categories in BatchCheckoutsValidCategories
        1.1.5. Click "Save all Circulation preferences"

   1.2. Get a list of barcodes
        1.2.1. Go to Reports
        1.2.2. Click "Create from SQL"
        1.2.3. Give the report a name
        1.2.4. For the SQL query, enter

               SELECT barcode FROM items WHERE onloan IS NULL LIMIT 60;

1.2.5. Click "Save report"
1.2.6. Click "Run report"
1.2.7. Click "Download" > "Tab separated text"

   1.3. Go to a patron's file
        1.3.1. Go to Patrons
        1.3.2. Click on "Search"
        1.3.3. Click on a patron's name

   1.4. Do a batch checkout with a due date in the past
        1.4.1. Click on the "Batch check out" tab on the left
        1.4.2. In "Use a file", click "Choose file"
        1.4.3. Choose the file downloaded from the report
        1.4.4. In "Hard due date", choose a date in the past
        1.4.5. Click "Check out"
        1.4.6. Click "Checkout or renew"

2. Find the last issue in the database

   2.1. In the database (or in reports), type the following query

        SELECT issues.*, items.itype as itemtype, items.homebranch, items.barcode, items.itemlost, items.replacementprice, items.biblionumber FROM issues  LEFT JOIN items USING (itemnumber) WHERE date_due < NOW() \G;

   2.2. Copy the barcode from the last entry

3. Set up so that you can run fines.pl and check in the item at the same time (or very close to the same time)

   3.1. In Koha, click the "Check in" option in the search bar at the top of the page
   3.2. Paste the barcode in the search bar BUT DO NOT PRESS ENTER OR THE ARROW RIGHT AWAY
   3.3. In a terminal, enter the fines.pl command

        ./misc/cronjobs/fines.pl

   3.4. Execute the command and immediately click on the arrow in the staff interface to check in the item

4. Check the patron's fines

    4.1. Click on the patron's name in the check in screen
    4.2. Go to the Accounting tab on the left
    4.3. In the search box just above the table, paste in the returned item's barcode

    --> Without the patch, there are two fines, one Fine (Accruing) and one Fine (Returned) for the same item at the same time
    --> With the patch, there is only one fine, Fine (Returned)

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7e1104da8340b3c62d3747fe75c13c8c5adea21d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 931e2b2d52514e013bf41f7bcce96c8600dde5df)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33497: (follow-up) Adjust relationship name from bug 33493
Nick Clemens [Wed, 31 May 2023 12:06:20 +0000 (12:06 +0000)]
Bug 33497: (follow-up) Adjust relationship name from bug 33493

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 82d0021cd854787127ffdb42c769919ddb41dcdc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fa9118ed8daef4f34571fab963b72c8c138a63cb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33497: (follow-up) Remove unecessary scalar
Nick Clemens [Wed, 31 May 2023 11:32:54 +0000 (11:32 +0000)]
Bug 33497: (follow-up) Remove unecessary scalar

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c662bfe18e6cb47671cf5cc3fb7865e59e6bc007)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a41761b35711b61a28f037e0a3c5743307273f53)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33497: Add a filter relationship for branchtransfers
Nick Clemens [Fri, 10 Mar 2023 16:14:50 +0000 (16:14 +0000)]
Bug 33497: Add a filter relationship for branchtransfers

This uses the new relationship from bug 33493 to fetch the transfers for items

To test:
1 - Transfer some items on a bib
2 - View the biblio details page in the staff interface
3 - Apply patch
4 - Confirm  the view is the same

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2fe2a0aa03b40e143de551aaf9ee87edd592dc0f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f3890f6cb281e61d51c0712f10f9686e6c84556c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33497: Use 'host_items' param to fetch all items at once
Nick Clemens [Fri, 10 Mar 2023 12:40:30 +0000 (12:40 +0000)]
Bug 33497: Use 'host_items' param to fetch all items at once

This patch adjusts the detail page to fetch items and host items
together, and prefetches transfers and checkouts

To test:
1 - Enable easy analytics
2 - Attach some items to a bib
3 - Checkout an item on the bib
4 - View the details page
5 - Apply patch
6 - View details page, confirm nothing has changed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2cf00f1a49a7b9f8d5ca105e2dd1add5d5d95198)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dc273a8dfe384b7c847a23b842f1dde601537d82)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33496: (QA follow-up) Update POD statement
Marcel de Rooy [Fri, 19 May 2023 09:57:23 +0000 (09:57 +0000)]
Bug 33496: (QA follow-up) Update POD statement

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d72e686531a54c51534a2871909256b22832128)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 552c25f4f95e0ab6f70d93e5581f0acff4f66d7e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33496: (follow-up) Correct param names
Nick Clemens [Fri, 14 Apr 2023 12:40:55 +0000 (12:40 +0000)]
Bug 33496: (follow-up) Correct param names

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1d4182a944e5048e307d1b554a3724041b1ce75a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f0e208c1e7e804a9e8db2de614ad612e3d14255d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33496: Add 'host_items' param to Koha::Biblio->items
Nick Clemens [Fri, 10 Mar 2023 12:37:49 +0000 (12:37 +0000)]
Bug 33496: Add 'host_items' param to Koha::Biblio->items

This patch adds an option to the $biblio->items method to allow
retrieving the items and analytic items for a record. This is intended
to allow fetching a single Items object, and related object, rather than
having to fetch the items, and the host items, and push them together

This is step towards being able to fetch items using API/DataTables directly

To test:
1 - prove -v t/db_dependent/Koha/Biblio.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8ff2e962b2e8e41db60cbc746a849287a83ccb65)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit aac8c1e36ea84deed0f4b9ad59f9f1bd44ba607f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33879: Do no longer overwrite interface in check_cookie_auth
Marcel de Rooy [Thu, 1 Jun 2023 13:03:50 +0000 (13:03 +0000)]
Bug 33879: Do no longer overwrite interface in check_cookie_auth

This will only have effect on installations running OPAC and staff
on the same domain name. In that case an OPAC cookie still allows
you to access intranet, and v.v.

Test plan:
Repeat the following steps WITHOUT this patch and WITH it.
Login via OPAC.
Go to staff. Perform an action that logs the interface in e.g. the
statistics table, like a checkout.
Inspect interface in the corresponding table. Observe difference
that this patch makes.

With this patch:
Run t/db_dependent/Auth.t. Should pass again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 68aeaf5c4c6aeeca4347995e5f74464929c20ac5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fdc49e0fb34e138059f7b47b87c66cc8a1347162)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33879: Add unit test to show problem
Marcel de Rooy [Thu, 1 Jun 2023 13:42:03 +0000 (13:42 +0000)]
Bug 33879: Add unit test to show problem

Test plan:
Run t/db_dependent/Auth.t without second patch.
Should fail:
    #          got: 'opac'
    #     expected: 'intranet'

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Björn Nylén <bjorn.nylen@ub.lu.se>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a7fda386475f5d8b9c5866305ab6a4128a9ef584)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5377331f46ff83c4dd83623d5dcb8734c7f73833)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33404: Add unit tests
Marcel de Rooy [Thu, 25 May 2023 07:29:30 +0000 (07:29 +0000)]
Bug 33404: Add unit tests

Test plan:
Run t/db_dependent/Breeding.t
Run t/db_dependent/Breeding_Auth.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Amended patch: perltidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e9cab7f1fc7acc0b340d07770c750ac9fed50a58)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fdcb386548ef8bd0c6f85a17b1fa69ab1f16c298)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33404: Fix serverhost and init $page
Marcel de Rooy [Thu, 25 May 2023 06:03:48 +0000 (06:03 +0000)]
Bug 33404: Fix serverhost and init $page

The array serverhost is not filled. Should be replaced with values
from servers array.

Test plan:
Nothing exciting here. Read the patch.
Note that we will test in the next patch if the hostname is saved
correctly in the import batch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eb759719908949bc5f7c388d26d4e9dd28b1e415)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ba442b1a3b1d77585c8507697c6a5d2755605bb8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33404: Z3950SearchAuth: Save in UTF-8 encoding
Marcel de Rooy [Wed, 24 May 2023 14:57:46 +0000 (14:57 +0000)]
Bug 33404: Z3950SearchAuth: Save in UTF-8 encoding

Test plan:
[1] If you have access to a Z3950 MARC8 auth server, search
    for an authority record and import it.
[2] If you have access to a Z3950 UTF8 auth server, search
    for an authority record and import it.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1233480ffaecb307ae7e9279acee7b516e42776f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 52a243e3cae0afc9d1cc9cc97f5746ba6384bf01)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34180: Template variable in JavaScript prevents authority MARC preview from displ...
Owen Leonard [Wed, 16 Nov 2022 12:10:16 +0000 (12:10 +0000)]
Bug 34180: Template variable in JavaScript prevents authority MARC preview from displaying

Since template variables cannot be processed by JS, we must use a
template to declare a JS variable which the JS file can used. This patch
corrects this problem in the JS file which handles display of the
authority MARC preview from the authority search results page.

To test, apply the patch and go to Authorities.

- Perform a search which will return multiple authority results.
- Click "Actions -> MARC preview." The preview should display correctly.
- Click "Actions -> MARC preview" on another search result. This preview
  should also look correct.
- There should be no JavaScript errors in the browser console.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6d433ffa8931487c967ec01c483e9bb13eb5700b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 955d3a53e7c1c3a29c82d7fb8754875559c05c32)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34092: (QA follow-up) Typo
Marcel de Rooy [Fri, 30 Jun 2023 06:55:29 +0000 (06:55 +0000)]
Bug 34092: (QA follow-up) Typo

Typo patron_searh_js.

Note for QA/RM: Ignore this qa tools warning:
    forbidden pattern: console.log (line 211)
This is an intended console warning.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3a805557dbce850942ec28845974dfc616e2a942)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 58efec81e3dbb9d36ccce3c52bf23cea7dd10c35)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34092: Move search-patron.inc logic into buildPatronSearchQuery
Pedro Amorim [Mon, 26 Jun 2023 12:51:13 +0000 (12:51 +0000)]
Bug 34092: Move search-patron.inc logic into buildPatronSearchQuery

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a9f8db17fed36434ef831316f53ded6a478e6747)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 0c3b4bb30f294828be1e4c3cb29250a0e3634164)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34092: Preparation: New buildPatronSearchQuery function
Pedro Amorim [Mon, 26 Jun 2023 12:37:08 +0000 (12:37 +0000)]
Bug 34092: Preparation: New buildPatronSearchQuery function

Move patron search query logic out of patron_autocomplete into new function

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ea599d774de4f43adb36a6a8382f0026246b16c1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e650fe865f53ff5f2c1d8c479a92bad98a1232f2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34092: Move patron_autocomplete to staff-global.js
Pedro Amorim [Mon, 26 Jun 2023 10:22:19 +0000 (10:22 +0000)]
Bug 34092: Move patron_autocomplete to staff-global.js

Remove patron-autocomplete.js file

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 972c847bddec64b84f85e221c4edf708bb521740)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 39345a33622fb38cc4b644c1eb05a8e199261e6f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34094: Use DefaultPatronSearchMethod consistently
Martin Renvoize [Thu, 22 Jun 2023 14:37:55 +0000 (15:37 +0100)]
Bug 34094: Use DefaultPatronSearchMethod consistently

This patch updates the patron search bar and pages to default search
method to that defined by DefaultPatronSearchMethod system preference.

Test plan
1) Prior to this patch confirm that regardless of what you set
   DefaultPatronSearchMethod to, the search in /members/member.pl,
   members/members-home.pl and the search from the patrons search top bar
   all default to 'contains'.
2) Apply the patch
3) Confirm that the system preference now affects the default option for
   match type upon page load.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b804313c20462fce7648570a4619b7b212765262)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2f3e1cd76b38452da0d23c46d33e44d49b7adea0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 28726: Add sort1 and sort2 to patron card creator - patron search.
Michael Hafen [Tue, 20 Jul 2021 18:12:42 +0000 (12:12 -0600)]
Bug 28726: Add sort1 and sort2 to patron card creator - patron search.

Also adds a select all / clear all and checkboxes.

Test plan:

1. start a new batch in the patron card creator (Tools -> Patron card creator -> New -> card batch)
2. click the Add patron(s) button.  Observe that Category and Library are the only options.
3. Close search for patron window.
4. Apply patch.
5. click the Add patron(s) button.  Observe that you can now search for patrons by their sort1 and sort2 values.
6. perform a search and observe the 'Select all | Clear all | Add selected patrons' links and button.
7. use the Select all link to select all the patrons found by the search.
8. use the Add selected patrons button to add the selected patrons to the card batch's Add by borrowernumber(s) text input field.
9. close the search for patron window.

Signed-off-by: Solene Ngamga <solene.ngamga@inLibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 79f8e148af7f7f84ccf43334e73e14f919157edd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f1e90cc4c2b75752122f540013ff9753e0111677)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 29664: (QA follow-up) Typo transacton
Marcel de Rooy [Fri, 30 Jun 2023 07:38:46 +0000 (07:38 +0000)]
Bug 29664: (QA follow-up) Typo transacton

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e3803577eedac53c26280f1a0f6837803b69d82e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 59a61fbb7258e20a2c886525387982aa40a4477d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 29664: Do not show voided payments in cash_register_stats.pl
Kyle M Hall [Mon, 1 May 2023 13:50:24 +0000 (09:50 -0400)]
Bug 29664: Do not show voided payments in cash_register_stats.pl

Test Plan:
1) Set up your cash register
2) Take a payment
3) Void that payment
4) Verify the voided fee shows for the "All payments to the library" and
   "Payment" transaction type filters
5) Apply this patch
6) Restart all the things!
7) Verify the voided fee no longer shows for the "All payments to the library" and
   "Payment" transaction type filters

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 65a45b761b65b784ac03d2c5901fb60e0dfe06b2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 586fe347993093a49e2158c47796450e743618c8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33999: (follow-up) Use link-styled button
Owen Leonard [Mon, 26 Jun 2023 14:04:23 +0000 (14:04 +0000)]
Bug 33999: (follow-up) Use link-styled button

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 35c6d94d251e87ab2e09724e8b30fae4c882d0af)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 698067dea19dcbd1823e151f967acf56662d4ee5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33999: Subscription details link on bibliographic detail page should have permiss...
Owen Leonard [Tue, 13 Jun 2023 14:11:33 +0000 (14:11 +0000)]
Bug 33999: Subscription details link on bibliographic detail page should have permission check

This patch wraps the "Subscription details" link on the bibliographic
detail page with a permissions check, "CAN_user_serials," so that a user
lacking permission to access the Serials module will not be shown the
link.

To test, apply the patch and view the bibliographic detail page of a
serial record.

- When viewing the "Subscriptions" tab as a user with Serials
  permissions you should see the "Subscription details" link.
- When viewing the tab as a user without the correct permissions the
  link should not be present.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 72524c3fbf3caf67c29c6f1f14afaacf04abd232)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4cc64fc6362122a8bf7222e86c5e6416ee344c81)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34146: Counterpart for serials-edit
Marcel de Rooy [Thu, 29 Jun 2023 06:18:04 +0000 (06:18 +0000)]
Bug 34146: Counterpart for serials-edit

Not only additem suffers from it. We can do the same with serials-edit.
This patch adds a server-side and client-side check as we did for additem.

Test plan:
Receive serial with adding items.
Try to add more than 999 items in number of copies.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f88d2e7983a8962e6c7de424dee7cc20200f2c74)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 505b4354a9e2cfeea9e9f71bbb9e47fbc4a125dc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34146: Add a client-side check with maxlength too
Marcel de Rooy [Thu, 29 Jun 2023 05:58:29 +0000 (05:58 +0000)]
Bug 34146: Add a client-side check with maxlength too

Test plan:
Try to add more than 3 characters now in the number of copies.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 143693e217c2ef4616678aa1b1cf9e53e2b0e456)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e11650c69c1ed08524935d7eb20d02aeb59fe595)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34146: Do not allow multiple copies to crash server
Marcel de Rooy [Wed, 28 Jun 2023 14:14:51 +0000 (14:14 +0000)]
Bug 34146: Do not allow multiple copies to crash server

Currently hardcoded to 1000.
Can be refined later. Let's first prevent this kind of accidents.

Test plan:
Add additem.pl. Edit the 1000 to 2. Restart all.
Add 3 multiple copies. Notice that you got 2.
Revert your code change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2eba689a5a5db2ac6a747c927d6daf01e7c64002)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4945626e32cf5387694485261f26a3f18588704c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 23775: Claiming a serial issue doesn't create the next one
jeremy breuillard [Mon, 4 Apr 2022 09:00:09 +0000 (11:00 +0200)]
Bug 23775: Claiming a serial issue doesn't create the next one

Whenever we need to generate manually a new serial we go to page
'serials-edit.pl'. With this patch it is possible to generate a new
serial on page 'serials.pl'.

Test Plan:
-- Previously we need a serial which is in EXPECTED status & the Date
received should not be later than today --
1) On the intra. Make sure to have at least 1 subscription for a
   bibliographic record & 1 vendor linked
2) Then Home > Serials > Claims > Claims for <your_vendor_name>
3) Tick the checkbox of the row where the status is EXPECTED then
4) Click 'Send notification'
5) Notice the status of the row : it is now CLAIMED
6) To verify: Home > Serials > Serial collection information for
   <your_record_name>
7) Here the status is CLAIMED too but nothing happened around
8) Apply patch
9) Repeat from 2) to 6)
10) The status is still CLAIMED & the new serial with status EXPECTED is
    freshly generated

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bd72f24d04a9843cdb6a86b2ee7a7adff1fc46bb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e495547b8bb6bd7115ef3bc6aff819a8b61ffce7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34106: Retain searchtype parameter in member-search-box
Lucas Gass [Thu, 22 Jun 2023 21:59:35 +0000 (21:59 +0000)]
Bug 34106: Retain searchtype parameter in member-search-box

To test:

1. In the main search header switch to 'Search patrons'. Bring up the dropdown and look at 'Search type:'.
2. It defaults to 'Starts with'.
3. Go to '/cgi-bin/koha/members/members-home.pl' and look at the 'Search type:' on the left side.
4. It defaults to 'Contains'
5. Do a patron search from both these places, setting the 'Search type' to contains.
6. The search bar in the header always resets to 'Starts with'
7. Apply patch
8. Try everything again. By default both places should default to contain.
9. If you change the 'Search type' the search in the main header should always retain that value.

Signed-off-by: Ed Veal <eveal@mckinneytexas.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6f1d3883c81184e067e334f3d29f1366f62508d3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e27e5cd886323f211417330bc7f074399f329c7f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34106: Update header search box searchtype when form is submitted
Pedro Amorim [Tue, 27 Jun 2023 14:40:59 +0000 (14:40 +0000)]
Bug 34106: Update header search box searchtype when form is submitted

We're updating the side menu searchtype when the search header is submitted,
we should also update the searchtype in the search header when the form is submitted

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b9ffc47100dbb13e966af73c713a6857cb9e8ca0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 252f297a5a9b6ce51d2973dcfcc8a1131e2f3e8c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33720: Also flush in install
Martin Renvoize [Thu, 29 Jun 2023 08:19:59 +0000 (09:19 +0100)]
Bug 33720: Also flush in install

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 41c43449c6c2e2e926ed04cc06647d223a5864dd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1961490c2e677d1e8f5fdf2b9344b0264abc1587)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33720: Update the updatedatabase.pl script to flush caches before running
Jake Deery [Wed, 7 Jun 2023 11:37:09 +0000 (13:37 +0200)]
Bug 33720: Update the updatedatabase.pl script to flush caches before running

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4391e23ea573bdf4ebec4e5abfc86eb87d504390)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 834245b70996f842eea08c33c7dd62a8f94ee99d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 34029: DBRev 22.11.07.003
Tomas Cohen Arazi [Mon, 26 Jun 2023 13:28:55 +0000 (10:28 -0300)]
Bug 34029: DBRev 22.11.07.003

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 532cf4ab9f5549c1e8f41d6c7191f9e1a9ed9e3c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a0cc737bc649d1446af06b6cd04900d17069caea)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 34029: DBIC schema
Tomas Cohen Arazi [Mon, 26 Jun 2023 13:25:33 +0000 (10:25 -0300)]
Bug 34029: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 16ad89bb96630fd9fb74fe69a30cb37dc3c1a411)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 41a86239d2f226e3b2736f7d661421052138d1ee)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 34029: (QA follow-up) Fix pushing undef to biblio_ids
Marcel de Rooy [Mon, 26 Jun 2023 10:46:17 +0000 (10:46 +0000)]
Bug 34029: (QA follow-up) Fix pushing undef to biblio_ids

See comment1. Although we now fix the error on publishercode, it
is good to verify the result before pushing.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 377e2a70dec073063443c23e9b6a06f54da6b53c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 561f6e5bd8dc5c9a671168fde67d412dbe3a0895)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 34029: Extend datatypes of biblioitems.columns to text to avoid breaking import
Katrin Fischer [Fri, 16 Jun 2023 11:14:29 +0000 (11:14 +0000)]
Bug 34029: Extend datatypes of biblioitems.columns to text to avoid breaking import

This updated the datatype of the following columns from varchar(255) to text
to avoid import problems if the mapped MARC field's data exceeds 255
characters.

This is for:
* place (260$a and 264$a)
* publishercode (260$b and 264$b)
* size (300$c)
* illus (300$b)
* pages (300$a)

To test:
* Edit a bibliographic record and enter more than 255 characters into
  the MARC fields listed above. Try to save.
* Run the updatedatabase script to modify the DB structure
* restart_all
* Edit a bibliographic record and enter more than 255 characters into
  the MARC fields listed above.
* Save
* Export the record
* Import the record using staging tools, all should work well

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 00545f8780390d735dad664d76d09cc67f42fdaa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ad93540d59660fdb887569d3837d5cf6eed4d089)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 34103: Capitalization: Currencies & Exchange rates
Caroline Cyr La Rose [Thu, 22 Jun 2023 20:06:50 +0000 (16:06 -0400)]
Bug 34103: Capitalization: Currencies & Exchange rates

This patch corrects the breadcrumbs in the Administration > Currencies
and exchange rates page to follow current capitalization and
typographical guidelines.

To test:
0. Apply patch
1. Go to Administration > Currencies and exchange rates
2. Verify that the breadcrumb has no spelling errors, and that
   capitalization and typography guidelines are applied
3. Click 'Delete' next to one of the currencies
4. Verify that the breadcrumb has no spelling errors, and that
   capitalization and typography guidelines are applied

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1a29ff17a550eedfa6ca2c68b6c02b817cb709b3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 10cd6dc5841329e04bad6523b815e5c32e6d5bd7)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 34015: Terminology: Relative issues should be Relative's checkouts
Caroline Cyr La Rose [Thu, 15 Jun 2023 13:45:50 +0000 (09:45 -0400)]
Bug 34015: Terminology: Relative issues should be Relative's checkouts

This patch changes the term 'issues' in a screen reader caption in the
OPAC to the correct term 'checkouts'.

To test:
Setup:
- Have a patron with a guarantee
- Check out an item to the guarantee
- Make sure the guarantee allows their guarantor to see their checkouts
  (AllowStaffToSetCheckoutsVisibilityForGuarantor must be on for you to
  be able to set this)

1. In the OPAC, log in with the guarantor patron
2. Click on the Relatives' checkouts tab
3. Open a screen reader (in Ubuntu, Super + Alt + S to turn on/off)
4. Navigate to the table in the Relative's checkouts tab
   --> The screen reader should say 'Relative issue table with...'
5. Apply patch
6. Refresh the page
7. Restart the screen reader (if it was off)
   --> The screen reader should now say 'Relatives' checkouts table
   with...'

Alternatively, open the page inspector and inspect the table, the
caption is in the table tag, before the thead tag.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b77e8d1b3706dd4c58848c97718b8bcd75735fb0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 32c5ed50993082f8ca99af7b33d34d72464558c6)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33968: Add missing colons to guarantor related labels
Katrin Fischer [Fri, 9 Jun 2023 09:46:47 +0000 (09:46 +0000)]
Bug 33968: Add missing colons to guarantor related labels

Fixes some inconsistencies with the labels on the
patron detail page and patron edit form.

To test:
* Activate AllowStaffToSetCheckoutsVisibilityForGuarantor
  and AllowStaffToSetFinesVisibilityForGuarantor system
  preferences
* Link a patron to a guarantor
* Verify on the details tab the options for showing fines
  and checkouts show and are missing colons on the label
* Edit the patorn and verify the same is true for the form
* Apply patch
* Verify missing colons have been added :)

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d7e189b5bf187184c83645b5d26cc49b56d8f408)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fd2423140705292b5f4d3b28afaf7abea7b7103a)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 34071: Change the phrasing of 'automatic checkin' to fit consistent terminology
Sam Lau [Wed, 21 Jun 2023 17:18:20 +0000 (17:18 +0000)]
Bug 34071: Change the phrasing of 'automatic checkin' to fit consistent terminology

This patch simply changes 'Automatic checkin' to be 'Automatic
check-in'.

Test plan:
1) Go to administration -> item types and click the edit button on an
   item.
2) Notice there is a checkbox labeled 'Automatic checkin'.
3) Apply patch.
4) Refresh the page and notice the checkbox now says 'Automatic
   check-in'.
5) prove t/db_dependent/Koha/Checkouts.t
6) Sign-off :)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e2e236fa9eae3954b75afc8919f5ad18baf9d8a6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d6cf2b91ac07608011bff715a02bdd9d942eeb11)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 31253: Item search in staff interface should call barcodedecode if the search...
Kyle Hall [Thu, 28 Jul 2022 13:13:09 +0000 (09:13 -0400)]
Bug 31253: Item search in staff interface should call barcodedecode if the search index is a barcode

We should run any inputted barcode through barcodedecode before passing it to any subroutines.
This was missed during the initial development of bug 26351.

Test Plan:
1) Set itemBarcodeInputFilter to "Remove spaces from"
2) Create an item with the barcode "MYTEST"
3) Browse to the staff side advanced search
4) Run a barcode search for "MY TEST"
5) Note no results are round
6) Apply this patch
7) Restart all the things!
8) Repeat your search
9) Note the item was found!

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: fixed typo in comment
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d735a5804ba5f2a63bf1dcd3925ace9f872ae0ce)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 41d9b86323dec57a98bee6387a608a051d85f450)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33972: Remove settings of batch status to importing
Nick Clemens [Tue, 27 Jun 2023 13:26:10 +0000 (13:26 +0000)]
Bug 33972: Remove settings of batch status to importing

This change was done in a transaction - it would either be set as imported
on success, or rolled back to staged on failure

There is no need for the intermediate status which is never committed

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 52917c63ab10a165ddf82fd405f387f11921a299)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c77c03a3ae139020c2effdbfbaaeda21af84bfd2)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 34130: Make requested_date nullable in api definition
Pedro Amorim [Tue, 27 Jun 2023 13:23:08 +0000 (13:23 +0000)]
Bug 34130: Make requested_date nullable in api definition

This patch allows the requested_date for an ILL request to be NULL to accomodate
older data

To test:
1 - Install the Koha 2 Koha ILL plugin:
    https://gitlab.com/koha-community/plugins/koha-plugin-ill-koha
2 - Enable the ILL  system preference
3 - Force an ILL request with minimal data from backend:
    INSERT INTO illrequests (borrowernumber,biblio_id,branchcode,backend,status) VALUES (5,3,'CPL','Koha','placed');
4 - View the ILL table
5 - Error:
    {"message":"Expected string - got null.","path":"\/body\/0\/requested_date"}
6 - Apply patch
7 - Table loads successfully

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a8633a58129bc2bb6b26986973501aa6649f2c78)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5edd76121ba4804599e3f3b29c0a223b2a9087d8)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33989: Only look up authorized value descriptions for items in results
David Cook [Tue, 13 Jun 2023 04:44:41 +0000 (04:44 +0000)]
Bug 33989: Only look up authorized value descriptions for items in results

This patch changes the inventory tool so that it only populates the
authorized value descriptions for items that show up in the results.
That is, items that will be viewed by a human.

This change saves a lot of time by not performing unnecessary
database lookups.

Test plan:

0. Apply patch and koha-plack --restart kohadev
1. Go to create a SQL report from SQL
/cgi-bin/koha/reports/guided_reports.pl?phase=Create%20report%20from%20SQL
2. Save a report with the following SQL:
SELECT barcode FROM items where barcode <> '';
3. Run the report
4. Download as CSV
5. Edit the CSV and remove the "barcode" heading

6. Go to edit item for barcode 3999900000001
/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=1&itemnumber=1
7. Add "Damaged status" of "Damaged"
8. Click "Save changes"

9. koha-mysql kohadev
10. update items set notforloan = 9 where barcode = 3999900000001;

11. Go to inventory tool
http://localhost:8081/cgi-bin/koha/tools/inventory.pl
12. Upload barcode file via "Choose file"
13. Uncheck "Compare barcodes list to results"
14. Open F12 tools
15. Click "Submit"
16. Click "OK" on confirm box

17. Note that the inventory job takes around 30 seconds to run
instead of 60 seconds
17b. The exact figures may vary. If you compare with before patch
inventory runs, you'll be saving roughly 18 seconds.
18. Note that "Damaged" appears in the "Damaged" column, which
demonstrates that the authorized value lookup was completed for
the item in the result list

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 30be338c2421a5b1e791e28732f83eb2542f7eb0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 64c328b9e140fbfcde89c14c07bd96ecda864201)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33976: Disable claims returned option in moredetail.pl when another lost status...
Emily Lamancusa [Fri, 9 Jun 2023 18:54:33 +0000 (14:54 -0400)]
Bug 33976: Disable claims returned option in moredetail.pl when another lost status is selected

Prevent "claims returned" from being selectable from moredetail.pl, even
if another lost status is already set

To test:
1. Configure Claims returned
    i. Go to Administration > Authorized Values > LOST
    ii. Add a new authorized value with value:6 and description:Claims returned
    iii. Go to Administration > System Preferences
    iv. Set ClaimReturnedLostValue to 6 and save
2. Go to any title record and click the barcode for any item
3. Click the Lost status drop-down.
   Note that the Claims Returned option is disabled.
4. Select a Lost status and click "Set status"
5. Click the Lost status drop-down.
   Note that the Claims Returned option is now selectable.
6. Apply the patch and refresh the page
7. Note that the Claims Returned option is now disabled.
8. Find a different item and check it out to a customer.
9. On that customer's account, click "Claim Returned" for that item
10. Click the barcode to view moredetail for that item
    Note that the Lost status drop-down is disabled with Claims Returned selected

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6857d4f896f5a79875ce609e54307cf8afc2b448)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5d8ae3f3167c3dd793329802d2537b60a17bc2ab)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 34080: Make suggestions_batch_ops a class
Lucas Gass [Fri, 23 Jun 2023 15:13:42 +0000 (15:13 +0000)]
Bug 34080: Make suggestions_batch_ops a class

To test:
1. Make some suggestions with different statuses.
2. Try moving some suggestion to different statuses.
3. Going from PENDING to another status works fine.
4. Moving from other status (REJECTED, ORDERED, etc ) will cause a 500 error.
5. Apply patch
6. Try 2 - 4 again, no more 500 errors, yay!

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1d60fd79a47cd1dcc3f8e9e1e27ac2c887d77f3c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6656b6674185ae4394555dbc731d52f4357a9448)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 34083: (follow-up) Prevent showing 'null'
Pedro Amorim [Thu, 22 Jun 2023 08:58:34 +0000 (08:58 +0000)]
Bug 34083: (follow-up) Prevent showing 'null'

In patron lists, if the patron added is an organization without the firstname, it presents 'null'. This fixes that

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 17e19fe311d470e73d2cca332ffcce4dc5663a47)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fd372ddcd3153b8e7027e2f4a223c62ceae46dc0)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 34083: Add searching for full term on patron auto-complete
Pedro Amorim [Wed, 21 Jun 2023 16:10:17 +0000 (16:10 +0000)]
Bug 34083: Add searching for full term on patron auto-complete

To reproduce, on k-t-d:
1) Create a new patron of category 'School'
2) Enter 'Middle school high school' on the mandatory 'Name' field and put something in 'Card number:'
3) Visit patron lists at /cgi-bin/koha/patron_lists/lists.pl and click 'New patron list'
4) Put something in 'Name:' and click 'Save'
5) On the 'Patron search' input, enter 'middle school high school' slowly and observe the auto-complete behaviour
6) Notice how after you start typing the second word, the auto complete results vanish.
7) Apply patch, repeat plan and verify it now works as expected.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a8e9b25d8e1a1da19a22f20c3cd74ed8a32e3ffb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c93e7167f6431b9ad9b96111bda2e637a8eca14c)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33578: Fix controller when editing a restriction type
Jonathan Druart [Wed, 10 May 2023 11:53:20 +0000 (13:53 +0200)]
Bug 33578: Fix controller when editing a restriction type

Do not display a warning when we are editing a restriction type and no
other types with this description exists.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b5de15c4b8daccfb80718e82633553f7dbb8b623)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 61b9002848cdb316da6405f615bb4ca746dab26a)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33578: Fix patron restriction types edition
Jonathan Druart [Wed, 10 May 2023 09:21:19 +0000 (11:21 +0200)]
Bug 33578: Fix patron restriction types edition

When editing an existing patron restriction type you'll always get an error on saving:

Label is already in use

To test:
* Activate use of patron restriction types
* Edit any of the system types
* Create new ones

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9e32945f208fa16c773dfc0867754649fcf820ca)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 87864a5ccf03ae2c7499fb22c1884e6bedcd9aaf)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33894: Use template wrapper for tabs: OPAC search history
Owen Leonard [Thu, 1 Jun 2023 13:40:02 +0000 (13:40 +0000)]
Bug 33894: Use template wrapper for tabs: OPAC search history

This patch updates the OPAC search history page so that it uses
the new WRAPPER syntax to generate tabs markup.

To test, apply the patch and view the OPAC search history page. With the
OpacAuthorities system preference enabled you should see two tabs:
Catalog and Authority. Confirm that each tab shows the correct
information.

Deactivate OpacAuthorities and reload the search history page. The
bibliographic search history should display without tabs.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2c6e64ba962474f5d2a109426c20256acdcd065c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d53d0f653787ad533cab12847db8c11b9faabb91)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33894: Restructuring: Use BLOCKs for biblio and authority sections
Owen Leonard [Thu, 1 Jun 2023 13:33:38 +0000 (13:33 +0000)]
Bug 33894: Restructuring: Use BLOCKs for biblio and authority sections

In order to make the conversion to the tab wrapper markup easier I'm
putting the biblio search history and authority search history sections
into blocks. This will make it easier to include or not include the
sections using template logic.

To test, apply the patch and, if necessary, perform some searches for
bibliographic and authority records. The OPAC search history page should
be unchanged, with the correct information showing under each tab and in
each section for current and previous searches.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f3def0d264d321d535ebc6cef1bcddba31dc38c3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5121269535d3b3bb963244cbe0d2ac4f7eea55ee)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 34013: Recalls awaiting pickup doesn't show count on each tab
Owen Leonard [Wed, 14 Jun 2023 17:23:40 +0000 (17:23 +0000)]
Bug 34013: Recalls awaiting pickup doesn't show count on each tab

This patch modifies recalls_waiting.pl so that it defines template
variables for 'recalls waiting' and 'recalls waiting over x days'
counts in the same way that waitingreserves.pl handles it.

To test you must have UseRecalls enabled, and some recalls data that
will allow you to see content under each tab.

Go to Circulation -> Recalls awaiting pickup and confirm that both tabs
show the correct count.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 44759b4be3aa4c3088edca77837d5d278de5cb1e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cdaa88d9c096e9fa20d3dc0919e9fb2a9f9a1554)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 34012: Use template wrapper for tabs: Recalls awaiting pickup
Owen Leonard [Wed, 14 Jun 2023 17:09:48 +0000 (17:09 +0000)]
Bug 34012: Use template wrapper for tabs: Recalls awaiting pickup

This patch updates the recalls awaiting pickup template so that it uses
the new WRAPPER directive to build tabbed navigation.

Note: this patch includes indentation changes, so check the diff
accordingly.

To test you must have UseRecalls enabled. Apply the patch and go to
Circulation -> Recalls awaiting pickup.

Both the "Recalls waiting" and "Recalls waiting over X days" tabs should
look correct and work correctly.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 309148160b34e5dbb6f2ca723d1c2aeb1400d6ba)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4e2b346b07fce75b00585b6a3fb403d496f4cebb)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33896: Check whether index is defined before string match
Matt Blenkinsop [Mon, 5 Jun 2023 13:08:47 +0000 (13:08 +0000)]
Bug 33896: Check whether index is defined before string match

This patch checks that $indexes[$i] is defined before testing whether the string matches to remove the logged warning when searching

Test plan:
1) In the intranet, search the catalog from the top search bar
2) Check plack-intranet-error.log
3) There should be a warning "[WARN] Use of uninitialized value within @indexes in string eq"
4) Apply patch
5) restart_all and then re-try the search
6) The warning should no longer appear

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e0c09d230ce46e9d085a970625408744814cbdc5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 596d63b426e2fc77dc90af1e0591a9f51031a6d0)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 31618: Fix typo in POD for C4::ImportBatch::RecordsFromMARCXMLFile
Sam Lau [Tue, 13 Jun 2023 15:00:21 +0000 (15:00 +0000)]
Bug 31618: Fix typo in POD for C4::ImportBatch::RecordsFromMARCXMLFile

To test:
1) Apply the patch
2) Visit C4::ImportBatch::RecordsFromMARCXMLFile
3) See that in the POD (mine was somewhere around line 1592) the line starting with '@PARAM1' now says '@PARAM1, String, absolute path to the MARCXML file.'
4) Sign off :)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 74bd33205193a6c4f957dccc9e540eacf507ccfc)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 68a146ab4945be9340f68e7044e0c6faf580ee5d)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33117: DBRev 22.11.07.002
Tomas Cohen Arazi [Fri, 23 Jun 2023 12:40:08 +0000 (09:40 -0300)]
Bug 33117: DBRev 22.11.07.002

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5f1c5a04faa3b4c38e3ca4d3372b3d7f612b6701)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 073744284afeb587ef4aa07a0e8aedb0018798d6)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33117: (follow-up) Rename preference
Martin Renvoize [Thu, 22 Jun 2023 11:38:04 +0000 (12:38 +0100)]
Bug 33117: (follow-up) Rename preference

As it's been requested that we keep the search defaults consistent, I
think this preference is better names DefaultPatronSearchMethod and
appear next to DefaultPatronSearchFields. This patch makes that change,
though actually applying it to the other search area's (outside of
autocomplete) has been left for another bug.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c50fab16b50850589017c4902138eee74c482caf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6ea0111ef80636e90a390bc788113a561ea581e8)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33117: Adding new PatronAutoCompleteSearchMethod system preference
Laura Escamilla [Fri, 26 May 2023 16:19:54 +0000 (16:19 +0000)]
Bug 33117: Adding new PatronAutoCompleteSearchMethod system preference

This patch adds a new system preference called "PatronAutoCompleteSearchMethod"
which allows staff to choose between "Starts with" or "Contains" when
searching for patrons.

The "Contains" option should be useful when searching for patrons that have
multiple surnames or when searching using a patron's middle name.

New Test Plan:
 0. Ensure system preference PatronAutoComplete is set to Try
 1. Create a patron that has a first name, middle name and two surnames.
    (i.e. Adela Maria, Hernandez Acosta).
 2. In patron or checkout search, enter their first name and first
    surname without submitting.
 3. Confirm that a record is found in the autocomplete results
 4. In patron or checkout search, enter their first name and second
    surname without submitting.
 5. Confirm that no record is found.
 6. Enter their middle name and first surname. Confirm that no record is
    found.
 7. Enter their middle name and second surname. Confirm that no record
    is found.
 8. Apply the patch, update database
 9. Under Administration > Global System Preferences > search for
    "PatronAutocompleteSearchMethod"
10. Choose "Contains" instead of "Starts with" for the system
    preference, reload your search page
11. Repeat steps 2-4. The patron record should appear for all search
    methods.
12. Sign off!

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7b675997b4ed5bd076ada5cedcbbc039e0fabe7b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e5e9f2c203982ceacd3b328589f327e1b0ba7b9e)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 34052: Use root relative URL for subscription-detail.pl
David Cook [Mon, 19 Jun 2023 04:28:53 +0000 (04:28 +0000)]
Bug 34052: Use root relative URL for subscription-detail.pl

This patch replaces a same directory relative URL with a root
relative URL, so that the navigation to subscription-detail.pl
works correctly after deleting a serial.

To test:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/serials/serials-home.pl
2. Click "New subscription"
3. Click "Search for a vendor"
4. Click "OK"
5. Click "Choose"
6. Click "Search for record"
7. Type "e" into "Keyword:" box
8. Click "Search"
9. Click "Choose" on top result
10. Click "Next"
11. Fill in "Serials planning" however you like, and click
"Test prediction pattern"
12. Click "Save subscription"
13. Click "Serial collection" in left nav menu
14. Click "Delete selected issues"
15. Click "Yes, delete"
16. Click the link under the "Subscription num." table column
17. Note that you're taken to the subscription detail page

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b7f89dcca3a2d0115ebc37bc34e2a5a3596105c1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ffca4b86ad9af91cd83df089318b509b34126450)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33944: Don't fetch item object unless using recalls
Nick Clemens [Wed, 7 Jun 2023 18:03:07 +0000 (18:03 +0000)]
Bug 33944: Don't fetch item object unless using recalls

To test:
1 - Check someitems out to a patron
2 - View thier checkouts
3 - Apply patch, restart_all
4 - Confirm checkouts load as before
5 - Enable recalls
6 - Recall an item checked out to this patron
7 - Confirm recall shows as expected

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4610bc64eb6d36583ec7533bc2a624241653b0ed)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9df75ef0cbd987501cdc7e731f03d508862c3afc)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33973: Restore sorting on Vue tables
Jonathan Druart [Fri, 9 Jun 2023 14:36:43 +0000 (16:36 +0200)]
Bug 33973: Restore sorting on Vue tables

Regression from the KohaTable Vue component added by bug 33066.

_dt_default_ajax expects options.columns to contain the columns.

Test plan:
Add some agreements, go the the agreement list view and confirm that you
can now sort the agreements using the header columns.

Note that the CSS is not correct yet. My understanding is that the
DataTable Vue component keep the 'sorting' class on the th which display
the grey up/down icon over the blue icon which indicate the current sort
column.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7990f3e74142ab20c813534ea615586965524415)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5799f4bed2918dd21d2d4d4606c5b2f6aa2651d9)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 32245: Fix delete news item from staff home page
Marcel de Rooy [Thu, 22 Jun 2023 13:30:10 +0000 (13:30 +0000)]
Bug 32245: Fix delete news item from staff home page

Simple fix: op was named incorrectly in URL.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a9389b60d371dc946e69782159bf1641626909ae)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c7f28fbc93fabfdc18ae7eddc87b3a1f740e858a)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 34010: Template corrections to recall pages
Owen Leonard [Wed, 14 Jun 2023 15:49:57 +0000 (15:49 +0000)]
Bug 34010: Template corrections to recall pages

This patch makes some corrections to recall pages:
- Update breadcrumbs menu to use wrapper.
- Add <div class="page-section"> where it is missing.
- Use biblio-title include to show links to bibliographic record titles.
- Correct Bootstrap button dropdown markup for consistent style
- Change some submit buttons to <button> elements for consistent style

To test you must have UseRecalls enabled. Having some sample recalls
data will help. Check the following pages to confirm that everything
looks correct:

- Circulation ->
  - Recalls queue
  - Recalls to pull
  - Overdue recalls
  - Recalls awaiting pickup
  - Old recalls
  - Existing recalls: View a bibliographic record with a recall and
    click "Recalls" in the sidebar.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ec6f8186ae39c4a23bad7af2d0feb1642b165f57)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f19eab575244d0b371cde2f1d6ff0f37d843d009)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 24517: Add missing 6th position to date-entered-on-file index
David Cook [Wed, 7 Jun 2023 03:13:24 +0000 (03:13 +0000)]
Bug 24517: Add missing 6th position to date-entered-on-file index

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Adding the biblio-zebra-indexdefs.xsl on same patch (as should
be generated with xsltproc).
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 12a986e6687424c00b0a14a627d8f694c6ef19c6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d8f339dda7eed5d68edcf00a3d5475e6a96ec26f)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 31651: Adjust tests
Tomas Cohen Arazi [Thu, 29 Jun 2023 12:36:47 +0000 (09:36 -0300)]
Bug 31651: Adjust tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c93df980683661787c3e1b3ed8f314322ce39213)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d1e538c2cb749193178b4f13be80b6d68bbe8aab)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 31651: Replaced duplicate error message
Jacob O'Mara [Tue, 29 Nov 2022 10:19:24 +0000 (10:19 +0000)]
Bug 31651: Replaced duplicate error message

The duplicated error message on ln119 has now been replaced for clarity.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d6566f41e942fe260a7553c9ff0355ff48d221ef)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4ed02e7de586fa1421e64c76d8c4a4de47953bb9)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33500: Add tests for RecordLocalUseOnReturn
Lucas Gass [Wed, 14 Jun 2023 17:15:23 +0000 (17:15 +0000)]
Bug 33500: Add tests for RecordLocalUseOnReturn

To test:
1. Turn on RecordLocalUseOnReturn
2. prove -v /kohadevbox/koha/t/db_dependent/Circulation.t
3. Tests fail.
4. Apply patch
5. prove -v /kohadevbox/koha/t/db_dependent/Circulation.t
6. Tests pass.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2238d9f09639328a5f50315852566c6e2d286473)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b07fa2af060d0a5f4382284fdc51695290d0a46d)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33993: Add order_receive to GET orders endpoints
Martin Renvoize [Tue, 13 Jun 2023 08:45:24 +0000 (09:45 +0100)]
Bug 33993: Add order_receive to GET orders endpoints

This adds order_receive to the list of permissions that allow the
endpoint to return orders.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Sharon Dugdale <Sharon.Dugdale@cumberland.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1f0cd38d56ac3215a4b00865dd4a17ae702d2952)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d89d452a9dd8a4a5f8aee0d9296941e78768013c)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 34051: Cache empty hashref for non-existent authorised values
David Cook [Mon, 19 Jun 2023 01:26:35 +0000 (01:26 +0000)]
Bug 34051: Cache empty hashref for non-existent authorised values

When fetching authorised value descriptions, we need to handle
scenarios where a value doesn't exist in the cache and doesn't
exist in the database. In this situation, we return an empty
hashref, and this patch makes us cache this empty hashref.

This is important because otherwise the function
Koha::AuthorisedValues->get_description_by_koha_field will
do a database call every time it encounters the same value that
doesn't exist in the authorised values table.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a3a0aaec102b05fc5a5b0573e1888facd22a731f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 25230f4cf91a591dcfdf5bcac00e1d085b1c4b41)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 34033: (bug 30649 follow-up) Fix update typos
Nick Clemens [Fri, 16 Jun 2023 12:15:25 +0000 (12:15 +0000)]
Bug 34033: (bug 30649 follow-up) Fix update typos

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 96794db65956051b19df8240a14816e11f967ba6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d636c81cd60623504cb265b7dd9e63b54dbc23cb)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33987: Combine multiple db updates one in BatchCommitRecords
Kyle M Hall [Mon, 12 Jun 2023 18:20:53 +0000 (14:20 -0400)]
Bug 33987: Combine multiple db updates one in BatchCommitRecords

When replacing existing records BatchCommitRecords will the table import_records will be updated three times for three different fields by three different queries. Not only is this inefficient ( especially for large batches ), it seems that this is causing the dreaded "Lock wait timeout exceeded; try restarting transaction" error on some mysql/mariadb configurations.

1) Test plan
2) Download a marc record from Koha
3) Modify the title of that same bib in Koha
4) Stage the downloaded record and overlay the existing record
5) Verify the title has reverted to the original title from the
   downloaded record!

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ab91409f7f3c18142e0694fab80effd7c0b35980)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 818ee1c312a0685719ca3f136f61a94e88195efa)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33417: Fix translation in toolbar
Matt Blenkinsop [Wed, 5 Apr 2023 14:02:39 +0000 (14:02 +0000)]
Bug 33417: Fix translation in toolbar

This commit allows the string to be translated - tested using fr-FR and a dummy string in the .po file

Test plan as above

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 62b2609e86fea4048386437d4aa856a49c8b5935)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1ba4c8b129b7bee703f8f3eaf2f027b3e235c179)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33417: Remove old components
Matt Blenkinsop [Wed, 5 Apr 2023 12:05:35 +0000 (12:05 +0000)]
Bug 33417: Remove old components

This commit deletes the old toolbar components as they are no longer
necessary

Test plan as above

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bd9255d84978ee7b3f1dc62ac53d9e320ea703e0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 11d27b0a4abd8eaad5dd0c55fc8aab97d165f96c)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33417: Add toolbar imports and options
Matt Blenkinsop [Wed, 5 Apr 2023 12:04:20 +0000 (12:04 +0000)]
Bug 33417: Add toolbar imports and options

This commit amends the required files to import the toolbar and add the
correct options

Test plan as above

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c10d6c6b0045f78baa033048956d3ae9cd29d5d0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9352f0aff1c6097d60b2854bb446740602bdcfe7)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33417: Create standard toolbar component
Matt Blenkinsop [Wed, 5 Apr 2023 12:02:22 +0000 (12:02 +0000)]
Bug 33417: Create standard toolbar component

This commit introduces a standard Toolbar component that can be used
throughout ERM

Test plan:
1) Apply patch
2) Navigate to Agreements and click the "Add agreement" button - this
   should work as normal
3) Navigate to Licenses and repeat
4) Navigate to Local packages and repeat
5) Navigate to local titles - there should be two buttons, one to add and
   one to import. These should work as normal

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 09666ecf4e2eeabfc13ddc4d0b43311e35dbe0b5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c7d3cad2860456ef0ce68ce654e29e9f82d952ae)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33897: (QA follow-up) Correct code for tab selection
Owen Leonard [Fri, 9 Jun 2023 17:19:28 +0000 (17:19 +0000)]
Bug 33897: (QA follow-up) Correct code for tab selection

This patch corrects the code for selecting tabs other than the first
tab.

To test, apply the patch and view the bibliographic detail page for a
serial record and with various settings of the opacSerialDefaultTab
system preference.

If you select "subscriptions tab" the subscriptions tab should be active
by default.

You can also enable html5media and view a record with html5media
information and no holdings. The media tab should be displayed by
default.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5308697ab8080915e6b4a415e37056ccdfb6ec59)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6e99fa4ec72d02c7dcac78bf81144d58ace97c20)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33897: Use template wrapper for tabs: OPAC bibliographic detail page
Owen Leonard [Thu, 1 Jun 2023 15:32:43 +0000 (15:32 +0000)]
Bug 33897: Use template wrapper for tabs: OPAC bibliographic detail page

This patch updates the OPAC bibliographic detail page so that it uses
the new WRAPPER syntax to generate tabs markup.

To test, apply the patch and locate a bibliographic record. View the
detail page. Verify that tabs are working, including all the options:

  - Holdings
  - Other holdings (If OpacSeparateHoldings is enabled)
  - Descriptions (MARC notes)
  - Subscriptions
  - Serial collection (UNIMARC, untested)
  - Components (If ShowComponentRecords is enabled. See Bug 11175 for
    sample record)
  - Comments
  - Editions (OPACFRBRizeEditions)
  - Html5media (If HTML5MediaEnabled is on. See Bug 8377 for sample
    records)
  - Images (If OPACLocalCoverImages is enabled)
  - NovelistSelect
  - Author identifiers (Witgh OPACAuthorIdentifiers enabled, see Bug
    29897)

Bonus points for testing these tabs for which I don't have credentials:
- Syndetics TOC
- Syndetics Excerpt
- Syndetics Reviews
- Syndetics AuthorNotes
- LibraryThing for Libraries (with LibraryThingForLibrariesTabbedView
  set to "in tabs.")

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 59c2a77ab78dfcfa57429cff1d8f6e0e994554c2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3f8a4a475653c714313ec494114845c374b53a41)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33176: Enforce bad values
Lucas Gass [Wed, 7 Jun 2023 18:40:48 +0000 (18:40 +0000)]
Bug 33176: Enforce bad values

1. Turn on RequirePaymentType
2. Create a manual invocie on a patron account
3. Go to pay it, 'Payment type:' is marked as required.
4. In the inscept the select input ( #payment_type ) with your browser's dev tools. Removed the required attribute.
5. You are able to make the payment without a payment type.
6. Apply patch and restart_all
7. Try 4-5 again. This time you should get a 500 error and the payment should not go through.
8. Try a paymnet again this time manipulate the DOM and change the value of 'CASH' to something else like 'SOMETHINGELSE'.
9. Try to submit the payment and again you will get a 500 error. The payment should not go through.
10. Turn RequirePaymentType off. Try a payment with a payment type, you shoud be successful.
11. Make sure tests will pass

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 676d263687ad666184fce6d505af6d9672412732)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6be23e725134cf2d5f20279b209b0a8aa62aaa90)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33176: Enforce RequirePaymentType with API
Lucas Gass [Thu, 13 Apr 2023 17:52:58 +0000 (17:52 +0000)]
Bug 33176: Enforce RequirePaymentType with API

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit df4285adb2f6669ad62b0e3b1eddb04f44761d16)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 68c725afeec87d4cd6bddb78323c2d5c66969901)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33176: Handle RequirePaymentType
Lucas Gass [Thu, 13 Apr 2023 17:28:24 +0000 (17:28 +0000)]
Bug 33176: Handle RequirePaymentType

Test plan:

1. Turn on RequirePaymentType
2. Create a manual invocie on a patron account
3. Go to pay it, 'Payment type:' is marked as required.
4. In the inscept the select input ( #payment_type ) with your browser's dev tools. Removed the required attribute.
5. You are able to make the payment without a payment type.
6. Apply patch and restart_all
7. Try 4-5 again. This time you should get a 500 error and the payment should not go through.
8. Turn RequirePaymentType off. Try a payment with a payment type, you shoud be successful.
9. Make sure tests will pass:

prove -v t/db_dependent/Koha/Account.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b15a15df9e2f579f984c804bdea4d2951ec75891)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 98347e1612949cffa11e750f2dfb76d7e33b8eaa)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoUpdate .mailmap
Tomas Cohen Arazi [Mon, 12 Jun 2023 14:05:19 +0000 (11:05 -0300)]
Update .mailmap

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cd5212ac2fef6fd0b9a435ebe9258ca1b13de014)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ea1ed9e2333fd256804d5ed356ba8e612c462e7c)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33806: Retain specified date when confirming item parts at checkin
Nick Clemens [Tue, 23 May 2023 12:54:34 +0000 (12:54 +0000)]
Bug 33806: Retain specified date when confirming item parts at checkin

This patch simply adds hidden inputs to the item parts confirm form
to ensure specified checkin date is retained

To test:
 1 - Find or add an item with subfield 3 - materials specified
 2 - Enable system preference CircConfirmItemParts
 3 - Go to Circulation->Checkin
 4 - Click the settings button in the input box and enter a checkin date and select the remeber check box
 5 - Check in some items, confirm date retained
 6 - Checkin the item with the materials specified
 7 - Confirm checkin
 8 - Note that checkin date is cleared
 9 - Apply patch
10 - Repeat 3-7
11 - Confirm date is retained

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9bca328d91acc6b010a44afea4403dd4d595cb98)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8ca854d4e3333d5321743c5663498f85e1fbf655)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33844: Fix is_denied_renewal
Marcel de Rooy [Fri, 26 May 2023 12:58:22 +0000 (12:58 +0000)]
Bug 33844: Fix is_denied_renewal

Going via result_set->has_column does cost actually nothing if
the object is already there.

Test plan:
Run again t/db_dependent/Koha/Item.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a215087a6af5852a76eea86246a76eb7d0741315)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 33844: Modify test to show problem
Marcel de Rooy [Fri, 26 May 2023 12:54:22 +0000 (12:54 +0000)]
Bug 33844: Modify test to show problem

Add delete key.
Without the follow-up, this triggers a delete. Test fails.
DBIx::Class::Row::delete(): Not in database at /usr/share/koha/Koha/Object.pm line 234

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2cc9fe394926a967e3b8a75d1f285fa35d221c66)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 32478: DBRev 22.11.07.001
Tomas Cohen Arazi [Wed, 7 Jun 2023 18:07:42 +0000 (15:07 -0300)]
Bug 32478: DBRev 22.11.07.001

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 233094521e02f19f32b25570031d299bde3708ae)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 32478: (QA follow-up) Keep current hashref behavior
Marcel de Rooy [Fri, 26 May 2023 09:28:28 +0000 (09:28 +0000)]
Bug 32478: (QA follow-up) Keep current hashref behavior

Prevent a crash on wrong contents for ItemsDeniedRenewal pref
as we did before.
Note: Could be a provisional measure (no band aid to repeat anywhere)
until we resolve this in preferences.pl.

Test plan:
Without this patch:
Change ItemsDeniedRenewal to 'nonsense'
Run perl -MKoha::Items -e'Koha::Items->find(X)->is_denied_renewal; print "OK\n"'
=> Replace X by a valid itemnumber
Crashes with: Can't use string ("nonsense") as a HASH ref ... No OK print.

Apply this patch
Run perl -MKoha::Items -e'Koha::Items->find(X)->is_denied_renewal; print "OK\n"'
=> Replace X by a valid itemnumber
Warns only with: Hashref expected for ItemsDeniedRenewal. You got OK.
Clear ItemsDeniedRenewal
Try again. No warning anymore.
Run t/Context.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ab1cb8a3c09c8ec8fb26cc1e2a2321eff939cc64)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 32478: (QA follow-up) Shebang and chmod for Koha/Config/SysPrefs.t
Marcel de Rooy [Fri, 26 May 2023 08:32:21 +0000 (08:32 +0000)]
Bug 32478: (QA follow-up) Shebang and chmod for Koha/Config/SysPrefs.t

Test plan:
Run t/db_dependent/Koha/Config/SysPrefs.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b4192a6525bd4680b844a2e844d709558168565d)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 32478: Fix syspref NULL values in tests
David Gustafsson [Fri, 12 May 2023 14:52:33 +0000 (16:52 +0200)]
Bug 32478: Fix syspref NULL values in tests

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 151c76eafb7e40f5c3a68ef26dd8ff065ad277fa)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
15 months agoBug 32478: (follow-up) Tidy code
Nick Clemens [Thu, 4 May 2023 18:39:50 +0000 (18:39 +0000)]
Bug 32478: (follow-up) Tidy code

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1c3223445d2de179f06486757af648f276a7cc84)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>