]> git.koha-community.org Git - koha.git/log
koha.git
15 months agoBug 32894: Fix test
Jonathan Druart [Tue, 28 Feb 2023 16:14:52 +0000 (17:14 +0100)]
Bug 32894: Fix test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 45d882de53058ebf49f9683e53bdc3751cd22e99)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 278769067c700b444711af8eb1bc11ea3fb8616d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: Koha::Biblio->biblioitem
Jonathan Druart [Tue, 28 Feb 2023 15:40:00 +0000 (16:40 +0100)]
Bug 32894: Koha::Biblio->biblioitem

Can we do better here?

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 994132a60a2e4a12eb88cc8b9d1a89f28450a7bf)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e91d18fcdde2d7c69ad9f2a8453dd5cdc736e6b4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: Koha::Item->last_returned_by
Jonathan Druart [Tue, 28 Feb 2023 15:13:56 +0000 (16:13 +0100)]
Bug 32894: Koha::Item->last_returned_by

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3545292513453b2383c406e96c3d51a3a2f5e6c5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 143c0e59c821bd08f1014bc5c61f320f28a520b3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 32894: Remove wrong caching from Koha:: methods - simple
Jonathan Druart [Tue, 28 Feb 2023 15:11:38 +0000 (16:11 +0100)]
Bug 32894: Remove wrong caching from Koha:: methods - simple

In some of our Koha:: objects we have methods that cache their result and return it in subsequent calls. However there is no invalidation of the cache if the object is modified.

For instance, in Koha/ArticleRequest.pm

sub biblio {
    my ($self) = @_;

    $self->{_biblio} ||= Koha::Biblios->find( $self->biblionumber() );

    return $self->{_biblio};
}

This pattern exists in several places.

It can lead to confusion and incorrect results, such as:

use Koha::ArticleRequests;
my $ar = Koha::ArticleRequest->new({
    borrowernumber => 42,
    biblionumber => 42,
})->store;
say $ar->biblio->biblionumber;               # Display 42, correct
$ar->set({ biblionumber => 24 })->store;
say $ar->biblio->biblionumber;               # Display 42, wrong
$ar->discard_changes;
say $ar->biblio->biblionumber;               # Display 42, wrong
$ar->delete;

We should remove those caching and rely on DBIC/DBMS caching mechanism instead.

This patch is adjusting the trivial occurrences

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 68216c541bfd9b5baf5e3fe97c0a99d193dfccce)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3347e6682477acd503c591d24670cd66cccaf38f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33904: Fix 2FA registration when library name has non-latin characters
Jonathan Druart [Tue, 6 Jun 2023 08:42:20 +0000 (10:42 +0200)]
Bug 33904: Fix 2FA registration when library name has non-latin characters

If the library name contains non-latin characters, the 2FA registration
process will fail with a JS alert coming from a 500 server-side.

The problem is that Auth::GoogleAuth is expecting an already UTF8 encoded string.
We should set the encoding correctly to make Auth::GoogleAuth deal with
the URL escaping internally correctly, then decode on our own (in the
REST API controller)

Test plan:
* Modify your logged in library name and add some non-latin characters
(eg. "my ❤ library")
* Turn on TwoFactorAuthentication
* Go to your account > More > Manage 2FA
* Click the enable button
=> Notice that you see the QR code and that both "issuer" and "key id"
entries display the library name correctly.
* Test the whole 2FA process, confirm that the library name is correctly
displayed on the app you are using.

Signed-off-by: Martin Renvoize <martin.renvoize@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 deeb5ebdbd59956f5f6cf1bfa989ef41c9af9720)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6678645740787c2e57874eabe4363edd98769d6f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
15 months agoBug 33904: Add tests
Jonathan Druart [Tue, 6 Jun 2023 08:40:03 +0000 (10:40 +0200)]
Bug 33904: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@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 dfed7f235d2e079743a74bb2791db2d4ebd63b1d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 80dec321bdfc9be130a95e55fc58298d56b55945)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33888: (bug 22375 follow-up) Add missing USE KohaDates
Jonathan Druart [Wed, 7 Jun 2023 08:33:40 +0000 (10:33 +0200)]
Bug 33888: (bug 22375 follow-up) Add missing USE KohaDates

Bug 22375 added use of KohaDates without the USE statement.

Test plan:
Make sure you have overdues and go to circ/branchoverdues.pl
Without this patch you get a 500
  Template process failed: undef error - : filter not found at /kohadevbox/koha/C4/Templates.pm line 127
With this patch applied you can see the overdue list

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 7eafb103b584dcc41b863c3920ee8ab4e94b2c06)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5f24345b676c81a6e04a9d4eab818fdce7be1655)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
16 months agoBug 34206: Fix display of vendor options in agreements and licenses forms
John Doe [Wed, 5 Jul 2023 15:56:46 +0000 (15:56 +0000)]
Bug 34206: Fix display of vendor options in agreements and licenses forms

Test plan:
1) Go to ERM licenses /cgi-bin/koha/erm/licenses
2) Click 'New license' and click the 'vendor' dropdown
3) Notice how it doesn't bring up any options
4) Apply patch and repeat test plan. Notice how now the vendor options show.
5) Repeat test plan for agreements

The test plan should be done using the 22.11.x branch

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
16 months agoUpdate release notes for 22.11.07 release v22.11.07
Pedro Amorim [Fri, 23 Jun 2023 15:18:57 +0000 (15:18 +0000)]
Update release notes for 22.11.07 release

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
16 months agoIncrement version for 22.11.07 release
Pedro Amorim [Fri, 23 Jun 2023 14:52:40 +0000 (14:52 +0000)]
Increment version for 22.11.07 release

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
16 months agoFix translations for Koha 22.11.07
Pedro Amorim [Fri, 23 Jun 2023 14:46:30 +0000 (14:46 +0000)]
Fix translations for Koha 22.11.07

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
16 months agoTranslation updates for Koha 22.11.07
Koha translators [Fri, 23 Jun 2023 12:48:20 +0000 (09:48 -0300)]
Translation updates for Koha 22.11.07

(cherry picked from commit 8e30f83f9e21611071cbe291a66bd316081c31d5)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
16 months agoBug 34006: Fix value of "Keep current" option on receive so correct fund is saved
Katrin Fischer [Fri, 16 Jun 2023 13:36:37 +0000 (13:36 +0000)]
Bug 34006: Fix value of "Keep current" option on receive so correct fund is saved

Under certain circumstances the "Keep current" option on receive allows
to receive order lines where the fund is otherwise not accessible to the user.
In 22.11 the wrong value is used for the option, so that instead of the fund id
the budget id is used, this can lead to an error 500 if there is no fund with
this id or to a wrong fund being saved.

To test:

1) Create budget and fund
* With the sample data
* Create a new budget "July 2023"
* Create a new fund "Books" under it
* Limit access to Owner and make yourself the owner

2) Create order
* Create a basket
* Create an order line with this access limited fund
* Close the basket

3) Create a staff user with limited permissions
* Edit or create another patron
* Set catalogue and acq permissions without budget_manage_all and order_manage_all (no access to the fund)
* Edit username and password

4) Receive, recreating the error
* Log in as the second user in a separate browser
* Receive shipment
* Create invoice
* Receive
* You should see the fund under the "Keep current" heading selected
* Add quantity received, save
* Fund has changed to Fund_1_2 => data loss :(

5) Receive, verify fix
* Create another order line with your privileged user and the "Books" fund
* Repeat 4)
* After receiving the fund should now remain unchanged

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
16 months agoBug 33416: Fix Searchbar_spec.ts
Tomas Cohen Arazi [Wed, 19 Apr 2023 12:19:29 +0000 (09:19 -0300)]
Bug 33416: Fix Searchbar_spec.ts

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5a39823dbcf63101519413f3a47f4ffa39758155)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit 5eec29d2dabfb7a08ed092032f8222f527cc5041)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33416: Fix Agreements.ts
Jonathan Druart [Wed, 5 Apr 2023 08:29:01 +0000 (10:29 +0200)]
Bug 33416: Fix Agreements.ts

<failure message="Timed out retrying after 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it." type="AssertionError"><![CDATA[AssertionError: Timed out retrying a
fter 10000ms: Expected to find element: `#agreements_list table tbody tr:first`, but never found it.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 216702802567adf67b0768beb6b43ad6b2c62bd8)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit e1fbe67683ab873c0832f2b8fe8cc168be85e05d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33902: Move modal inside HTML body
Lucas Gass [Mon, 5 Jun 2023 23:00:43 +0000 (23:00 +0000)]
Bug 33902: Move modal inside HTML body

To test:
-Go Administration > Libraries and add a URL for a branch.
-Also add some OPAC info: ( via HTML Customizations )
-Now find a record belonging to that branch and bring up the OPAC detail page.
-In the holdings table there should be a link under the 'Current library' column.
-Clicking it should bring up a modal.
-Make sure the modal pops up correctly, can be dismissed, and the 'Visit web site' link works.

Nothing about the appearance or behavior of the page should change.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e1be2791b807948c85ae48e471594a7c68709e84)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33934: Add more detail to 'No encryption_key in koha-conf.xml'
Jonathan Druart [Wed, 7 Jun 2023 07:30:15 +0000 (09:30 +0200)]
Bug 33934: Add more detail to 'No encryption_key in koha-conf.xml'

If encryption_key is not set in $KOHA_CONF we are raising an exception.

This key was only needed for a couple of feature, but now we are using Koha::Encryption from the update DB process, and so the upgrade fails with no more info than 'No encryption_key in koha-conf.xml'.

We need to provide more detail in this error.

Additionally we reject "__ENCRYPTION_KEY__", in case people will simple
copy/paste that

Test plan:
Apply the patch
Edit $KOHA_CONf, remove the encryption_key entry (or blank)
restart_all
Go to the about page and enable 2FA
=> warning on the about page, and 500 server-side are displaying more
info about how to generate the missing entry
Edit $KOHA_CONF and set the value to __ENCRYPTION_KEY__
restart_all
=> Same messages
Edit $KOHA_CONF and set a correct value
restart_all
=> No error, everything is working correctly

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 d7288411f00e3afd2a0284193ce7742545d88266)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33935: (bug 26403 follow-up) Remove occurrences to deleted files
Jonathan Druart [Wed, 7 Jun 2023 09:16:15 +0000 (11:16 +0200)]
Bug 33935: (bug 26403 follow-up) Remove occurrences to deleted files

account_credit_types.sql and account_debit_types.sql have been moved to yml files but there are still references to them in C4::Installer.

If you select the files during the installer process it will explode with

Test plan:
DROP database koha_kohadev
CREATE database koha_kohadev
restart_all
then install Koha using the UI
Select all the sample data files

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 633cb15a632cded54ccbd7e385a281ceed3d68cc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33524: Use template wrapper for tabs: Authority editor
Owen Leonard [Fri, 26 May 2023 13:45:56 +0000 (13:45 +0000)]
Bug 33524: Use template wrapper for tabs: Authority editor

This patch updates the authority editor template to replace tab markup
with the use of WRAPPERs. Some CSS and JS has been modified in order to
make the custom style and behavior of the tabs on this page work
correctly with standard Bootstrap tab markup.

To test, apply the patch and go to Authorities -> New authority.

- Confirm that the tabs look correct, with the same style they had
  before the template change.
- The first tab ("0") should be selected by default.
- Confirm that tab-switching works correctly: The tab color should
  change and the list of numbered tags in the menu just below should
  change to match the section.
  - Confirm that these tag number links still work correctly to jump you
    down the page to the corresponding tag.
- Without filling in any mandatory fields, click the "Save" button.
  - You should get an error message about missing mandatory fields.
    - Clicking the "Go to field" link should take you to the correct tab
      and the correct tag.
- Append a hash to the URL to pre-select a tab other than the first one,
  e.g. "/cgi-bin/koha/authorities/authorities.pl?authtypecode=PERSO_NAME#tab5XX_panel"
  The correct tab should be selected upon page load.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ff22a2006b0eb04950acd83439b2d7bc15890389)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32060: Use selectrow_array
Jonathan Druart [Tue, 16 May 2023 14:36:26 +0000 (16:36 +0200)]
Bug 32060: Use selectrow_array

Trivial ergonomic patch, use selectrow_array, no need to prepare the
query

+ perltidy the sub

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit afe24bce2372a748c1960c8e383232f348278a0e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32060: Improve performance of columns_to_str
David Gustafsson [Tue, 1 Nov 2022 14:30:01 +0000 (15:30 +0100)]
Bug 32060: Improve performance of columns_to_str

To test:
1) Ensure the following tests pass
  t/db_dependent/Koha/Item.t
  t/db_dependent/Koha/Bibio.t
2) Go to a biblio (preferably as serial) with many items and
   click "New" -> "New item" and note down the response time.
3) Apply the patch
4) Ensure tests in 1) still pass
5) Repeat step 2), the response time should be substantially
   improved

Sponsored-by: Gothenburg University Library
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 850f6f403ba07d6c963a11f52d774b7a94df4802)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 21983: DBIC schema
Tomas Cohen Arazi [Mon, 5 Jun 2023 16:52:52 +0000 (13:52 -0300)]
Bug 21983: DBIC schema

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f6a7d96e1ef0aeb930304de07f686998d0562b6d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32932: Fix resource_id param for EHoldingsLocalResourcesShow
Jonathan Druart [Fri, 9 Jun 2023 07:37:39 +0000 (09:37 +0200)]
Bug 32932: Fix resource_id param for EHoldingsLocalResourcesShow

Caught by cypress tests  "ReferenceError: resource_id is not defined" in "Show title".

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3a6d369fe687c945cc80748377b19fcdb9c22163)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32932: Update router to use object references - agreements
Matt Blenkinsop [Tue, 21 Mar 2023 19:14:45 +0000 (16:14 -0300)]
Bug 32932: Update router to use object references - agreements

This patch updates the Vue files for ERM to use router object links rather than urls - this will make it much simpler to maintain the router if urls need to be updated. This first patch only updates the files in the agreements section of ERM as a first step to introduce the topic for discussion.

Test plan:
1) Apply patch
2) Navigate to the Agreements section of ERM and click on different navigation links/buttons
3) The links/buttons should all work as normal
4) Review the code to see that the component files now refer back to the router using objects rather than url strings

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a53351b4a0e2b32d589fea3f74b350f5100a2e72)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32464: (follow-up) fix t/db_dependent/Koha/Item.t
Fridolin Somers [Thu, 15 Dec 2022 09:08:40 +0000 (23:08 -1000)]
Bug 32464: (follow-up) fix t/db_dependent/Koha/Item.t

Remove useless unit tests with mss arg

Test with :
prove t/db_dependent/Koha/Filter/EmbedItems.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 911702014310c704974dc38ff27a5a23e15ca5a4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 32464: Koha::Item->as_marc_field obsolete option mss
Fridolin Somers [Tue, 13 Dec 2022 21:24:54 +0000 (11:24 -1000)]
Bug 32464: Koha::Item->as_marc_field obsolete option mss

Since Bug 28445 the method Koha::Item->as_marc_field has the option mss not anymore.

This patch removes this in Koha::Filter::MARC::EmbedItems.

Test with :
prove t/db_dependent/Koha/Filter/EmbedItems.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8dfecfb17627881407e5cf9262545d2c6a77d62f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33892: Use template wrapper for tabs: OPAC authority detail
Owen Leonard [Mon, 5 Jun 2023 13:06:39 +0000 (13:06 +0000)]
Bug 33892: Use template wrapper for tabs: OPAC authority detail

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

To test, apply the patch and locate an authority record in the OPAC
which has notes fields.

When viewing the details for that record the notes should appear in a
single "Notes" tab.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit afd30b8f4d11c36c86f26a8d5849c7990297f265)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 21983: DBRev 22.11.00.005
Tomas Cohen Arazi [Tue, 6 Jun 2023 18:26:52 +0000 (15:26 -0300)]
Bug 21983: DBRev 22.11.00.005

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aa3218855316923f10da873528dd300b58ed0e3a)

16 months agoBug 21983: (QA follow-up) Skip deleted_biblio_id from the API object
Tomas Cohen Arazi [Tue, 6 Jun 2023 18:24:36 +0000 (15:24 -0300)]
Bug 21983: (QA follow-up) Skip deleted_biblio_id from the API object

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 88249d602cdc0f0c642edb61bed848cfac471c19)

16 months agoBug 21983: Make DelBiblio update linked ILL requests
Tomas Cohen Arazi [Mon, 5 Jun 2023 16:54:40 +0000 (13:54 -0300)]
Bug 21983: Make DelBiblio update linked ILL requests

This patch makes DelBiblio update the biblio linked ILL requests so the
value in biblio_id is moved to the deleted_biblio_id.

The change is covered by tests.

To test:
1. Apply this patchset
2. Run:
   $ ktd --shell
  k$ updatedatabase
  k$ qa --run-tests
=> SUCCESS: Tests pass! All green/good
3. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c0cf01b8a220c5ecfd102effeec00179226df397)

16 months agoBug 21983: Add Koha::Biblio->ill_requests
Tomas Cohen Arazi [Mon, 5 Jun 2023 16:53:18 +0000 (13:53 -0300)]
Bug 21983: Add Koha::Biblio->ill_requests

This patch adds a new method, used for retrieving the linked ill
requests for a biblio.

To test:
1. Apply this patch and run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a9759b3b0e1b9f4812f994012c109d99f9a9aa89)

16 months agoBug 21983: DB update
Tomas Cohen Arazi [Mon, 5 Jun 2023 16:50:00 +0000 (13:50 -0300)]
Bug 21983: DB update

This patch:
- Adds a illrequests.deleted_biblio_id column
- Adjusts existing db_rev so people upgrading have the biblio_id value
  moved to the also created column, before attempting to add the FK
  constraint on the biblios table.
- Adds a new db_rev for those who unfortunately already updated, it
  should be idempotent.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f1346c20257038e523be0405e9d84fe762d502db)

16 months agoBug 33786: ILL requests table id
Pedro Amorim [Tue, 30 May 2023 09:20:20 +0000 (09:20 +0000)]
Bug 33786: ILL requests table id

Make sure requests table is unique when visiting patron ILL
history so the table state is not shared unintentionally

Reproduce:
1) Have a borrower with >20 ILL requests in their history
2) Visit cgi-bin/koha/members/ill-requests.pl?borrowernumber=<borrowernumber>
3) On the table, click page 2
4) Visit a different borrower with <20 ILL requests
5) Verify that no requests are shown, this is because the table is using page 2 from step 3)
6) Go back to original borrower, click table page 1
7) Now go back to 2nd borrower, verify is now showing page 1 correctly

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4d2df9876d389f4ac939d5fec27b877bbe00cf45)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33813: Masthead lists button requires an aria-label
Matt Blenkinsop [Tue, 23 May 2023 16:24:30 +0000 (16:24 +0000)]
Bug 33813: Masthead lists button requires an aria-label

This patch adds an aria-label to the Lists button in the masthead. It is currently not descriptive enough and doesn't identify what is displayed when clicking the button.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7129b772b559c50311bccfa3b9f0402ec1ce1100)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33873: Improve check for inexistant biblio object
Pedro Amorim [Wed, 31 May 2023 14:10:35 +0000 (14:10 +0000)]
Bug 33873: Improve check for inexistant biblio object

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0630b79e4a740dac0992114d40442af0be5b57ce)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33882: Add spans in dateofbirth column on member.tt
Lucas Gass [Thu, 1 Jun 2023 20:03:53 +0000 (20:03 +0000)]
Bug 33882: Add spans in dateofbirth column on member.tt

To test:
1 Apply patch
2 Do a patron search that will return multiple patrons.
3 Look at the date of birth column and notice the text is now wrapped in a class called 'dateofbirth'
4. Notice that the age hint is wrapped in a class called 'agehint'.
5. Add '.agehint { display: none }' to intranetusercss.
6. Now notice the date of birth still displays but no age information.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5cb185b71be95cc312686701ce8bd719a4b30b13)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33883: "Make sure to copy your API secret" message overlaps text
Owen Leonard [Fri, 2 Jun 2023 14:00:34 +0000 (14:00 +0000)]
Bug 33883: "Make sure to copy your API secret" message overlaps text

This patch updates the markup on the patron API keys page so that it
uses standard classes for dialogs and page sections.

To test you must have RESTOAuth2ClientCredentials enabled.

- Apply the patch and locate a patron record.
- From their checkout or detail page, choose More -> Manage API keys
- Click "Generate a new client id/secret pair"
- Enter a description and click Save.
- You should see a message in a standard message-style dialog, "Make
  sure to copy your API secret now. You won’t be able to see it again!"
- The API key information should be displayed in a .page-section div.
- The table of existing keys should be displayed in a .page-section div.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7c652ce764b8e17dde8ce2f06099560c05e88374)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33891: Use template wrapper for tabs: OPAC advanced search
Owen Leonard [Wed, 31 May 2023 17:51:46 +0000 (17:51 +0000)]
Bug 33891: Use template wrapper for tabs: OPAC advanced search

This patch adds the tab WRAPPER markup to the OPAC, adapted for the
Bootstrap version used by the OPAC (4.5.0). The advanced search page is
updated to use the wrapper construction.

Unrelated markup fix: an empty size attribute is removed from an
<input>.

To test, apply the patch and view the the advanced search page in the
OPAC. The tabs for item type, shelving location, and collection should
all look correct and work correctly.

In the staff interface, go to Administration -> System preferences ->
OpacAdvancedSearchTypes and try various configurations, confirming each
time that the OPAC page adjustes correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b754eb5b5a616fa54e721ac71c8049f0f00a52e8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33803: Remove comment about tab width
Jonathan Druart [Tue, 23 May 2023 08:58:55 +0000 (10:58 +0200)]
Bug 33803: Remove comment about tab width

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 37cb3391d23587bff0719e2171ac3164c2bd4bc4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33525: Use template wrapper for tabs: Basic MARC editor
Owen Leonard [Tue, 23 May 2023 16:45:10 +0000 (16:45 +0000)]
Bug 33525: Use template wrapper for tabs: Basic MARC editor

This patch updates the basic MARC editor template to replace tab markup
with the use of WRAPPERs. Some CSS and JS has been modified in order to
make the custom style and behavior of the tabs on this page work
correctly with standard Bootstrap tab markup.

To test, apply the patch and go to Cataloging -> New record.

- Confirm that the tabs look correct, with the same style they had
  before the template change.
- The first tab ("0") should be selected by default.
- Confirm that tab-switching works correctly: The tab color should
  change and the list of numbered tags in the menu just below should
  change to match the section.
  - Confirm that these tag number links still work correctly to jump you
    down the page to the corresponding tag.
- Without filling in any mandatory fields, click the "Save" button.
  - You should get an error message about missing mandatory fields.
    - Clicking the "Go to field" link should take you to the correct tab
      and the correct tag.
- Append a hash to the URL to pre-select a tab other than the first one,
  e.g. "/cgi-bin/koha/cataloguing/addbiblio.pl#tab5XX_panel" The correct
  tab should be selected upon page load.

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 437cadafd8a545132a1db2518623a1eb0360ad09)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33697: DBRev 22.06.00.004
Tomas Cohen Arazi [Mon, 5 Jun 2023 18:22:15 +0000 (15:22 -0300)]
Bug 33697: DBRev 22.06.00.004

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d196b9b6199d43b05393802dc5aa8cc1e34453e0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33697: Remove RecordedBooks (rbdigital) integration
Jonathan Druart [Tue, 16 May 2023 08:18:13 +0000 (10:18 +0200)]
Bug 33697: Remove RecordedBooks (rbdigital) integration

RecordedBooks search API integration is now obsolete following
rbdigital's incorporation into OverDrive. Associated code should be
removed.

https://company.overdrive.com/2020/06/23/overdrive-to-acquire-rbdigital-from-rbmedia/

Test plan:
use git grep extensively and confirm that this patch removes all
occurrences of this feature.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8b9355088ad6e5238921ef554af44ffeb7677364)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 33fdf290bbf58ce26756b2218bfccce10049870c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33779: Terminology: biblio record
Owen Leonard [Thu, 25 May 2023 13:48:34 +0000 (13:48 +0000)]
Bug 33779: Terminology: biblio record

This patch corrects a string in the staff interface's ILL requests
template. "This item cannot be issued as it has no biblio record
associated with it" is updated to read "This item cannot be checked out
as it has no bibliographic record associated with it."

I don't know how to trigger the error message in the interface, but the
change is simple enough that it could be verified by examining the
patch.

Signed-off-by: Lucas Gass <lucas@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 05af370ec1ad367e30bd5b9c879d7b16e6a26846)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33411: (follow-up) Set debit type for mocked fines
Nick Clemens [Thu, 1 Jun 2023 18:20:14 +0000 (18:20 +0000)]
Bug 33411: (follow-up) Set debit type for mocked fines

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 56715cbb28b5412c83fe3bed993be4ab0451750a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33411: Don't count related guarantees fees against NoIssuesChargeGuarantees
Nick Clemens [Fri, 7 Apr 2023 18:50:25 +0000 (18:50 +0000)]
Bug 33411: Don't count related guarantees fees against NoIssuesChargeGuarantees

To test:
 1 - Find an adult patron in Koha
 2 - Add two guarantees
 3 - Add $1 fine to parent, $5 fine to each guarantee
 4 - Set no issues charge guarantees to 9
 5 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE
 6 - Note the 64 message starts with Y's that mean patron is blocked
 7 - Repeat with each child barcode
 8 - They are blocked?
 9 - Apply patch, restart all (restart_all will restart SIP)
10 - Try again
11 - Parent blocked, children should not be

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 afec5139ff095a92c6ffb626e1a1a773328ac398)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33411: Unit test update
Nick Clemens [Fri, 7 Apr 2023 18:49:41 +0000 (18:49 +0000)]
Bug 33411: Unit test update

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 638d79036c642eb349711764fb2486021606fee4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33247: (QA follow-up) Remove pending deletion from results array
Marcel de Rooy [Fri, 2 Jun 2023 08:17:45 +0000 (08:17 +0000)]
Bug 33247: (QA follow-up) Remove pending deletion from results array

Both Elastic and Zebra search_auth_compat return a hash key
authid for a result.

Test plan:
Remove an authority that should be in your results list.
Note that it is no longer marked as pending, but just not displayed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1f0574dd912a97f588d4e8523319f721093bdb42)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33247: Flag the authority pending deletion in the result list
Jonathan Druart [Thu, 11 May 2023 11:48:50 +0000 (13:48 +0200)]
Bug 33247: Flag the authority pending deletion in the result list

When an authority is removed from the result list it is not removed from
the search engine yet.
This patch suggests to add a note in the summary column to tell the user
that the deletion is pending.

Test plan:
1 - Go to authorities home and perform a search;
2 - Delete any authority;
3 - After the confirmation, the page is refreshed but still contains the
deleted authority, with a red note explaining that the deletion is
pending.

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 61de402012ff05ee0eadfe571c6354afc858669f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33748: Fix UI issue when importing records from a staged MARC file
Lucas Gass [Thu, 25 May 2023 22:04:08 +0000 (22:04 +0000)]
Bug 33748: Fix UI issue when importing records from a staged MARC file

This patch attempts to fix a UI issue on addorderiso2709.tt. It removes the <td> which contains the actoin buttons MARC, Card, and Add Order and adds them to the title line. This is so there is more space for the fieldsets.

1. Apply patch
2. Set  MarcItemFieldsToOrder like this:

    homebranch: 975$a
    holdingbranch: 975$b
    itype: 975$y
    nonpublic_note: 975$x
    public_note: 975$z
    loc: 975$c
    ccode: 975$8
    notforloan: 975$7
    quantity: 975$q
    price: 975$g
    replacementprice: 975$v
    uri: 975$u

3. Stage a MARC file where the bibs have items attached
4. From acquisitions create a new basket and add 'From a staged file'.
5. Add the staged files to a basket.
6. Make sure the display looks correct.
7. Expand the data by clicking on the checkbox on the left hand side, or by clicking 'Select all'.
8. Make sure the display looks correct.
9. Tab over to 'Item informtion' and make sure that display looks correct.
10. Shrink the screen size down to less that 992px, ensuring the display remains correct.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 06ba1ce7bfffd2f18da0d8a03edf0afb103220ae)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33859: Use the phrase 'Identity providers' instead of 'Authentication providers'
Owen Leonard [Tue, 30 May 2023 10:51:16 +0000 (10:51 +0000)]
Bug 33859: Use the phrase 'Identity providers' instead of 'Authentication providers'

This patch updates instances in the code and templates where the term
"Authentication providers" is used, replacing it with the preferred
"Identity provider."

Most of the instances of this change are in module or API documentation,
but you can see a couple of the changes in the interface:

- Administration -> Identity providers:
  - The sidebar menu should show "Identity providers" instead of
    "Authentication providers."
- Patrons -> Patron details -> More -> Set permissions
  - Under " Manage Koha system settings (Administration panel)" you
    should see "Manage identity providers (manage_identity_providers)"

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d634c1971fba572959fbef6ca9392767e3506a62)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33875: Fix missing closing tag a in API key management page
Fridolin Somers [Wed, 31 May 2023 20:58:45 +0000 (10:58 -1000)]
Bug 33875: Fix missing closing tag a in API key management page

In API key management page, anchor closing tag is missing in message "No keys defined for the current patron".

This patch fixes that.
Also changes display with link on a new line.
Translatable text is on purpose surrounded by span or div.

Test plan :
1) Enable system preference  RESTOAuth2ClientCredentials
2) Go to a patron page
3) Click More > Manage API Keys
4) Look at page source HTML code
=> Check code is OK

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 88920fe564ab0157a71cf7fedf79693d42959cce)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33865: (bug 27421 follow-up) Remove leftover
Jonathan Druart [Thu, 1 Jun 2023 06:29:53 +0000 (08:29 +0200)]
Bug 33865: (bug 27421 follow-up) Remove leftover

Bug 27421 replaced the progress bar with job_progress.inc.
The code related to the old progress bar has not been removed however.

Moreover there was a JS error in the console:
"Uncaught ReferenceError: submitBackgroundJob is not defined"

Test plan:
Stage a MARC record for import
Import it
Revert the import
All should work correctly, without JS error in the console and with the
progress bar displayed nicely during the staging step.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ff324be0c4b72241ec86da345b25e12166f51984)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33877: Add missing team members
Tomas Cohen Arazi [Thu, 1 Jun 2023 14:47:04 +0000 (11:47 -0300)]
Bug 33877: Add missing team members

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0b55e3ceefde1595a1805d0fc5e1476b8f36babe)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months agoBug 33877: Fix some entries in teams.yaml
Marcel de Rooy [Thu, 1 Jun 2023 08:27:35 +0000 (08:27 +0000)]
Bug 33877: Fix some entries in teams.yaml

Trivial edit.

Remove versions from the name of the packaging manager.
As also commented on BZ:
The script only expects to find a name here, not a version too.
See also maintainer role and how versions are handled there.
In this case I dont think it is really needed to still add that
distinction when we had two packaging managers in the past.

Test plan:
Look again at about.pl, Koha team, Koha development team.
Look at Mason James.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aef13eaf3fce66a7f6ea7a06ae3c1344533889a4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months ago23.05.00: Update history.txt
Tomas Cohen Arazi [Wed, 31 May 2023 11:50:56 +0000 (08:50 -0300)]
23.05.00: Update history.txt

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1539ef22bed84f46f6cebabd16b07f7cf71675b7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months ago23.05.00: Update contributors.yaml
Tomas Cohen Arazi [Wed, 31 May 2023 11:50:15 +0000 (08:50 -0300)]
23.05.00: Update contributors.yaml

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0da4eef6f6987a9b3c71b16a9deaf139cd4522b5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
16 months ago23.05.00: Update .mailmap
Tomas Cohen Arazi [Wed, 31 May 2023 19:03:04 +0000 (16:03 -0300)]
23.05.00: Update .mailmap

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9a9b00907e0d270798aad5dcd0bfacf27dca5a6a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33761: (RMaint follow-up) Remove errant test from bug 31557 added by git)
Matt Blenkinsop [Fri, 9 Jun 2023 11:09:42 +0000 (11:09 +0000)]
Bug 33761: (RMaint follow-up) Remove errant test from bug 31557 added by git)

A test from bug 31557 was introduced by git when cherry-picking 33761. As bug 31557 was not backported, this caused t/db_dependent/HoldsQueue.t to fail.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 22440: (QA follow-up) Fix wrong check in db_rev
Tomas Cohen Arazi [Thu, 1 Jun 2023 14:35:15 +0000 (11:35 -0300)]
Bug 22440: (QA follow-up) Fix wrong check in db_rev

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a1924bb31d6106037c1e8dec2ea4b39f86235960)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33838: Don't reset the renewal count
Kyle M Hall [Thu, 25 May 2023 16:57:24 +0000 (12:57 -0400)]
Bug 33838: Don't reset the renewal count

I cannot find any justification for this line existing.
MarkIssueReturned does not do this.

Resetting item's renewal count was introduced in bug 5877 with no explanation.

Test Plan:
1) Check out item 3999900000001 to a patron
2) Upload the KOC file attached to this bug report
3) Navigate the Pending Offline Circ actions, see your return is listed
4) Click the checkbox to select your return
5) Click Process once. Nothing appears to happen
6) In a new tab, pull up the bib for item 3999900000001, see that it has been checked in
7) Back on your Offline Circ tab, click Process a second time
8) Koha tells you the item is not checked out
9) Apply this patch, restart all the things!
10) Repeat steps 1-4, everything should now work!

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: this line was introduced by bug 30275, by mistake. The
renewals_count attribute belongs to the `issues` table, and I agree it
shouldn't be set to 0 at all as it will (with no reason) make us loose
the value!
Tests pass with and without this change, so this isn't even tested.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9c565eff1357c2fdf900f006a17fa62fd4f2f9ee)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33788: Limit the number of old issues rows returned
Nick Clemens [Fri, 26 May 2023 14:44:05 +0000 (14:44 +0000)]
Bug 33788: Limit the number of old issues rows returned

This patch updates the parameter from 'limit' to 'rows'

To test:
1 - Checkout an item to 5 different people
2 - View item details on items tab of record
3 - Note you see last borrower, and three previous borrowers
4 - Apply patch, restart all
5 - Refresh page
6 - You shoulw now only see last borrower and 2 previous borrowers

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7ec849f39366e82e8813ee3ca897f3bb97ab9e39)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33821: Allow direct input of dates on the OPAC
Lucas Gass [Wed, 24 May 2023 15:13:12 +0000 (15:13 +0000)]
Bug 33821: Allow direct input of dates on the OPAC

To test:
1. Apply patch
2. Go to OPAC self registration and try to manually enter the date for date of birth.
3. You can do so sucessfully

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bfd31debb52197e9ab1ad667d4782088647d67dd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33854: Fix typo in ImportBatchProfiles controller
Tomas Cohen Arazi [Mon, 29 May 2023 13:59:53 +0000 (10:59 -0300)]
Bug 33854: Fix typo in ImportBatchProfiles controller

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c84f06ec625a6d11caeb01a27cf8f61ff7430140)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33829: Fix add patron to patron list if PatronAutoComplete is off
Jonathan Druart [Thu, 25 May 2023 13:07:25 +0000 (15:07 +0200)]
Bug 33829: Fix add patron to patron list if PatronAutoComplete is off

When adding patrons to a patron list we get a JS error about undefined
variables. We can easily fix this problem by defining them even if the
pref is not set.

We are enabling the auto complete even if PatronAutoComplete if off.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 493819b92b8ecbe917b70cf564e7a0bdbbec9f89)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33823: Add spacing to action labels
Pedro Amorim [Wed, 24 May 2023 15:53:43 +0000 (15:53 +0000)]
Bug 33823: Add spacing to action labels

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a69551e32e50376b58852fec7e89deef3c07d55b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33815: Do not explode if logged in user modify their own userid
Jonathan Druart [Wed, 24 May 2023 07:29:30 +0000 (09:29 +0200)]
Bug 33815: Do not explode if logged in user modify their own userid

If the logged in librarian modifies their own userid they will get the
following error when submitting the form:
Can't call method "password_expired" on an undefined value at /kohadevbox/koha/C4/Auth.pm line 1780

We could handle this situation and flag the session as expired. Better
would be to deal with this specific user case and update the cookie (?)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5da81cde99983768f627417c6c267d51cc0d908d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33815: Regression tests
Tomas Cohen Arazi [Wed, 24 May 2023 14:52:50 +0000 (11:52 -0300)]
Bug 33815: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6cd6c7833ea08c216c5b5531ee7cb2ab5f39aaa3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33834: Fix random failure on api/v1/ill_requests.t
Tomas Cohen Arazi [Thu, 25 May 2023 13:15:08 +0000 (10:15 -0300)]
Bug 33834: Fix random failure on api/v1/ill_requests.t

This patch makes the GET request results more deterministic so we avoid
random failures. It does so by adding a fixed value to each ILL request
and then sorting by it.

To test:
1. Run:
   $ DB_IMAGE=mysqli:8.0 ktd up -d
   # wait until it finished:
   $ ktd --logs
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/ill_requests.t
  (repeat a few times)
=> FAIL: It sometimes fails
3. Apply this patch
4. Repeat 2
=> SUCCESS: It doesn't fail
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1a8903ae850ca268c730e19c1b575e3be942ee2b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33362: Allow return claims to be resolved even if the issue has since been delete...
Kyle M Hall [Thu, 11 May 2023 14:43:39 +0000 (14:43 +0000)]
Bug 33362: Allow return claims to be resolved even if the issue has since been delete from the database

Test Plan:
1) Check out an item
2) Claim return on it, moving it to the old_issues table
3) Delete the old_issue via koha-mysql or Use cleanup_database.pl
4) Attempt to resolve the claim
5) Note the error
6) Apply this patch set
7) Restart all the things!
8) Attempt to resolve the claim
9) No errors!

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 816bbbe77f47688ee79f6664e60cc72ce5d7dd4a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 26611: Make authority record matching use required match checks
Aleisha Amohia [Tue, 23 May 2023 03:32:59 +0000 (03:32 +0000)]
Bug 26611: Make authority record matching use required match checks

This patch fixes record matching for authorities to correctly apply required match checks.

To test:

1) Create a record matching rule:

Threshold: 100
Record type: Authority record

Match point 1
Search index: subject-topical
Score: 100
Tag: 150
Subfields: a

Match check 1
Both source and target record check fields:
Tag: 040
Subfields: a

This rule says we want to match on the topical term heading, then confirm the match with 040$a.

2) Create two topical term authority records

Authority 1:
150$a: Test
040$a: A

Authority 2:
150$a: Test
040$a: B

3) Export authority 2 and save

4) Go to Cataloging -> Stage records for import

5) Upload your downloaded authority 2 file. Change the record type to Authority. Choose your new record matching rule.

6) Stage for import.

7) Confirm that with the record matching rule applied, both authorities 1 and 2 show as possible matches, even though only authority 2 has a matching 040$a.

8) Apply the patch and restart services

9) Change the matching rule to "Do not look for matching records" and apply. This is to essentially refresh the page.

10) Change the matching rule to your new matching rule and apply. Confirm only the matching authority 2 shows and is selected.

Sponsored-by: Waikato Institute of Technology
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 33856898fd2f1cd757aeafe3c165300928f9da61)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33792: reserves_stats: Undo homebranch and holdingbranch preselect
Marcel de Rooy [Mon, 22 May 2023 12:35:02 +0000 (12:35 +0000)]
Bug 33792: reserves_stats: Undo homebranch and holdingbranch preselect

This preselect cuts off all next available holds that are in reserves,
as well as holds filled by checkout without confirm (see 33791).

Test plan:
Go to reporting. Click Hold statistics.
Verify that Holding library and Home library are not selected.
Test that you can still filter by one of those.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@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 e22b3f06668a181874de2049297e0390d2280cd0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33663: Pass 'suggestion' to the OPAC templates only
Jonathan Druart [Wed, 10 May 2023 08:54:39 +0000 (10:54 +0200)]
Bug 33663: Pass 'suggestion' to the OPAC templates only

We don't need it for the staff interface. The previous patch is removing
the only occurrence using it.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 63bc731fd409e52b505c684fa5ba5f849128aa36)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33663: Don't hide Suggestions link in side navigation when suggestion preference...
Jonathan Druart [Wed, 10 May 2023 08:53:38 +0000 (10:53 +0200)]
Bug 33663: Don't hide Suggestions link in side navigation when suggestion preference is disabled

We don't want to depend on the pref for the staff interface.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9b5c92035f429e23d3a899e920e04dccfc309492)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33762: Fix page-section in ILL
Pedro Amorim [Thu, 18 May 2023 11:36:46 +0000 (11:36 +0000)]
Bug 33762: Fix page-section in ILL

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 75b6d4c1f1605578a4f1d1b7694d8595fea89c3d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33791: (QA follow-up) Stick to 'item_id' for the parameter name
Tomas Cohen Arazi [Mon, 22 May 2023 14:47:41 +0000 (11:47 -0300)]
Bug 33791: (QA follow-up) Stick to 'item_id' for the parameter name

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d0195cef6cfdc6d3d2acf7ba06cdd0a5cfaddbb9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33791: Pass itemnumber to $hold->fill
Marcel de Rooy [Mon, 22 May 2023 11:14:25 +0000 (11:14 +0000)]
Bug 33791: Pass itemnumber to $hold->fill

Test plan:

Without this patch:
Place next available level on some book for patron A.
Checkout this book directly to patron A.
Check old_reserves table for this reserve; does not have itemnumber.

With this patch:
Do the same.
In old_reserves the itemnumber should be saved.
Run again t/db_dependent/Koha/Hold.t. Should pass.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bd5c5eaa38f75297efde5a096d30ad65eff9a658)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33791: Add unit test
Marcel de Rooy [Mon, 22 May 2023 11:35:46 +0000 (11:35 +0000)]
Bug 33791: Add unit test

Test plan:
Run t/db_dependent/Koha/Hold.t
NOTE: This test should fail without following patch, but pass with it.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 306439b4c6f4d90bc8d46e6f76aac2f5b9f11cd8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33787: Fix for regression caused by bug 32450
Martin Renvoize [Fri, 19 May 2023 16:05:10 +0000 (17:05 +0100)]
Bug 33787: Fix for regression caused by bug 32450

This patch fixes the regression cashed by bug 32450 where we
accidentally introduced the option to archive system debit types.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@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 7b315a31b45c98770a8f14636252a83a67a8e545)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 31585: Fix 'acquisition order' and 'acquisition claim'
Pedro Amorim [Thu, 18 May 2023 10:27:30 +0000 (10:27 +0000)]
Bug 31585: Fix 'acquisition order' and 'acquisition claim'

Added 'ACQUISITION CLAIM' and 'ACQUISITION ORDER' to the log viewer form.
Please test this well (making sure there are log entries of these types and they show properly upon searching for them)

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 6cff39ab2ba8105d3f65c6c1eec5626f8f66c4e0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33371: Add [Install] section to koha-common.service
Mason James [Thu, 1 Jun 2023 12:49:27 +0000 (00:49 +1200)]
Bug 33371: Add [Install] section to koha-common.service

to test:

 1/ install pkg, reboot, note service is not 'active'

 2/ add patch, build package

 3/ install pkg, reboot, note service is 'active' :)

  root@deb11:/etc# systemctl status koha-common
  * koha-common.service - Start required services for each Koha instance
     Loaded: loaded (/etc/init.d/koha-common; enabled; vendor preset: enabled) <<<<
     Active: active (exited) since Thu 2023-06-01 12:45:08 UTC; 13min ago
      Tasks: 0 (limit: 2244)
     Memory: 0B
        CPU: 0
     CGroup: /system.slice/koha-common.service
  Jun 01 12:45:08 deb11 systemd[1]: Starting Start required services for each Koha instance...

Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bc72184de5d000f1fdc667f6a576a4ce584f450e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33371: Add 'koha-common.service' systemd service
Mason James [Thu, 30 Mar 2023 14:32:10 +0000 (03:32 +1300)]
Bug 33371: Add 'koha-common.service' systemd service

to test

- install current package
- note following $message on install
 'Failed to enable unit: Unit /run/systemd/generator.late/koha-common.service is transient or generated.'

- apply patch, build package, install new package
- note $message is gone! :)

- test koha-common.service
   # systemctl start  koha-common
   # systemctl status koha-common | grep running
     Active: active (running) since Sun 2023-04-02 00:27:31 NZDT <<<

   # systemctl stop  koha-common

   # systemctl status koha-common | grep dead
     Active: inactive (dead) since Sun 2023-04-02 00:25:34 NZDT <<<

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4d1d18cd2a145df7fd1e0f8a690da0b3a03ec38c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33767: Fix incorrect heading in page-numbers.inc
Matt Blenkinsop [Thu, 18 May 2023 13:55:02 +0000 (13:55 +0000)]
Bug 33767: Fix incorrect heading in page-numbers.inc

This patch replaces an h6 with a span to avoid a jump from h2 to h6.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e9fe95b8f4b71765cb240151cc63da3f30ceee2f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33675: Add CSRF protection to OAuth/OIDC authentication
Tomas Cohen Arazi [Wed, 10 May 2023 13:45:23 +0000 (10:45 -0300)]
Bug 33675: Add CSRF protection to OAuth/OIDC authentication

This patch makes the OAuth/OIDC client pass a `state` parameter with a
CSRF protection token, to be validated back when the flow returns to
Koha.

Ideally, the Mojolicious::Plugin::OAuth2 library should deal with this
implicitly, probably making use of JWT. But as of now, this is the best
way to implement it.

To test:
1. Have a working SSO solution (ktd --sso)
2. Click to login using SSO
=> SUCCESS: Notice a 'state' parameter on the URL, looks like a random
thing
3. When you login, no error is reported

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d191f21e5760994575c6954dba88544f06afe4e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33777: Fix Auth_with_shibboleth.t
Marcel de Rooy [Fri, 19 May 2023 06:20:19 +0000 (06:20 +0000)]
Bug 33777: Fix Auth_with_shibboleth.t

We need to 'mock' the new pref EmailFieldPrecedence

Test plan:
Run t/Auth_with_shibboleth.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 f436bc639c9a1eeb1e14eeb38f3ffabc7bdd32f9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33708: Allow anonymous access to OAuth endpoints
David Cook [Wed, 10 May 2023 02:43:44 +0000 (02:43 +0000)]
Bug 33708: Allow anonymous access to OAuth endpoints

Users needs anonymous access to OAuth endpoints so that they can
login, and then use authenticated access for other endpoints.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 05190ed1d99e3cca7cbd766a9f41e106f25d26a3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33708: Provide non-public endpoint for OAuth/OIDC for staff interface
David Cook [Wed, 10 May 2023 01:35:56 +0000 (01:35 +0000)]
Bug 33708: Provide non-public endpoint for OAuth/OIDC for staff interface

This change fixes the definition for the non-public endpoint for the OAuth/OIDC
implementation.

It also uses the non-public endpoint for the staff interface UI.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aae996e6bf1a981c1ab5700021593dac777f63ba)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33708: Make staff interface login not require public API (OAuth/OIDC)
Tomas Cohen Arazi [Tue, 9 May 2023 21:03:50 +0000 (18:03 -0300)]
Bug 33708: Make staff interface login not require public API (OAuth/OIDC)

This patch makes the URL for staff login not point to the `/public`
namespace. The behavior is not changed for the protocol, but as
`/public` requires several settings to be available, it effectively
requires to enable the OPAC, the public API, etc. This patch
diferentiates both to solve the problem.

I've tested following the Wiki instructions to set keycloak [1] using
the *--sso* switch for `ktd` as well [2].

It is important to set the following URLs as allowed redirect in order
to replicate the issue and verify the fix:

http://localhost:8080/api/v1/public/oauth/login/test/opac
http://localhost:8081/api/v1/oauth/login/test/staff

To test:
1. Login into the staff interface using the SSO link:
=> FAIL: Results in a 'Bad redirect URL' error
2. Apply this patch and repeat 1
=> SUCCESS: You get a permission denied error or you just login,
depending on your setup.

[1] https://wiki.koha-community.org/wiki/Testing_SSO
[2] ktd --sso up -d

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit dd512db60b21080a1c1cfeae2a3891edd69fd95e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33138: Don't copy tag 147 to authority MARC frameworks
Phil Ringnalda [Sun, 5 Mar 2023 03:26:22 +0000 (19:26 -0800)]
Bug 33138: Don't copy tag 147 to authority MARC frameworks

We shouldn't be including tag 147 in every authority MARC framework we
install, since like all 1xx authority tags there should only be
one per record. It only belongs in a NAME_EVENT framework, which we
don't install.

Test plan:

1. Apply patch, kd && ku or however you like to restart
2. Administration - Authority types - Actions button for Default
   - MARC structure
3. In the search box below the text "Select an authority framework"
   enter 147 and click OK
4. Once you see that it exists in Default, switch the dropdown to
   each of the other frameworks and verify it doesn't appear in
   any.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 409891ed508972e06b868ca55cbe0bcddb3e3380)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32959: Don't store results of autobarcode in item editor templates
Kyle Hall [Tue, 14 Feb 2023 13:51:13 +0000 (08:51 -0500)]
Bug 32959: Don't store results of autobarcode in item editor templates

Test Plan:
1) Enable autobarcode
2) Create a new item template, leave the barcode field blank
3) Apply that item template
4) Note the template prefills the barcode field
5) Delete that item template
6) Apply this patch
7) Restart all the things!
8) Repeat steps 2-4
9) Note the barcode field remains empty!

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.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 47b2b4f15a9f2355ddbb205afd6649eccd04334d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 29993: Show Syndetics covers when using shelfbrowser controls
Lucas Gass [Mon, 17 Apr 2023 17:41:02 +0000 (17:41 +0000)]
Bug 29993: Show Syndetics covers when using shelfbrowser controls

1. Have items that include itemcallnumber.
2. Enable OPACShelfBrowser.
3. Enable SyndeticsCoverImages and SyndeticsEnabled.
4. Go the an OPAC detail page and open the shelf browser.
5. Use the Next/Previous buttons.
6. Notice that no Syndetics images populate after using Next/Previous buttons.
7. Apply patch and try again, cover images for Syndetics should be generating.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 219ad1d5d36ee2164d4c4ecfc4ed869fa59ed19e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33010: Do not filter checkins with logged in patrons branch in printslip.pl
Emmi Takkinen [Mon, 20 Feb 2023 08:26:29 +0000 (10:26 +0200)]
Bug 33010: Do not filter checkins with logged in patrons branch in printslip.pl

If one tries to print checkin slip for checkins that
have been checked out from different branch, list
of checkins is empty. One has to change their branch
as checkout library to be able to print checkins.

This happens because we filter (or rather search) patrons
old checkouts with logged in patrons branch. This patch
removes this search so that checkout are filtered using
just filter_by_todays_checkins.

To test:
1. Checkout items for patron from branch A.
2. Switch to branch B and checkin items.
3. Print checkin slip.
=> Checkins list is empty.
4. Switch back to branch A.
5. Print checkin slip again.
=> Checkins are printed.
6. Apply this patch, restart services if needed.
7. Switch back to branch B and print checkin slip.
=> Checkins should now print.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b5f8c526577714e964b7a081b30b0b482f7f3cc5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33713: Make batch operations from report results open in new tab
Lucas Gass [Fri, 12 May 2023 18:06:57 +0000 (18:06 +0000)]
Bug 33713: Make batch operations from report results open in new tab

To test:
1. Have some reports that can do the following batch operations:
    -Batch patron mod
    -Batch item deletion
    -Batch add to list
    -Batch item mod
    -Batch record delection
    -Batch record mod

2. Run the report ann click 'Batch operations with X visible records', make sure each batch op opens in a new tab.

These two simple reports should allow you to test each of the batch cases:

select * from items limit 1
select * from borrowers limit 1

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a40bd8d05d5d0dc5e789788808f05ce1697e6226)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33721: Fix display of shipping cost/fund on invoice summary page
Katrin Fischer [Sun, 14 May 2023 11:19:07 +0000 (11:19 +0000)]
Bug 33721: Fix display of shipping cost/fund on invoice summary page

When viewing an invoice, the elements in the 'Fund' line were out of order:
'Fund:' label, followed by 'Show inactive:' label, then the fund drop-down and then the show inactive checkbox.

The order should be:
'Fund:' label, fund drop-down, 'Show inactive:' label, show inactive checkbox.

This copies the markup that is used when you click on "Receive shipment".
It also changes 'Fund' to 'Shipping fund' to bring the forms even more in line.

To recreate:
1. In acquisitions, create an order and close the basket
2. Click 'Receive shipment' and receive the order
3. Click 'Finish receiving'
   --> The Fund line in invoice.tt is out of order
4. Apply patch
5. Verify the order is now fixed

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d56b959fea1b2c267e73248e11953f7c7c2e04cf)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33421: Fix filtering suggestions by status
Jonathan Druart [Wed, 10 May 2023 10:19:13 +0000 (12:19 +0200)]
Bug 33421: Fix filtering suggestions by status

If the display is by status and a specific status is selected in the
filter, the filter won't have any effects.

Test plan:
Create several suggestions, with different status, for different
libraries.
Use the "display by status" view and filter on a given status
=> Result must be relevant

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ec0ebda77db48e0fbe190df9a3d1969604bc229c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33686: Correction of existing terms related to 'Script of title'
Thibaud Guillot [Wed, 10 May 2023 08:13:57 +0000 (10:13 +0200)]
Bug 33686: Correction of existing terms related to 'Script of title'

According to https://cdn.ifla.org/wp-content/uploads/U_B_100_update2022_online_final.pdf

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 e40bc40c6f64ae6d1f8d9faa9562bef86ec78c80)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33686: Update plugin unimarc_field_100.pl with 2022 values
Thibaud Guillot [Wed, 10 May 2023 07:32:44 +0000 (09:32 +0200)]
Bug 33686: Update plugin unimarc_field_100.pl with 2022 values

According to https://cdn.ifla.org/wp-content/uploads/U_B_100_update2022_online_final.pdf

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 cd7ddd63253cfac1700e7b10d25c6b1b87b03062)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33761: Alter query to remove items with active transfers from available list
Nick Clemens [Thu, 18 May 2023 11:09:18 +0000 (11:09 +0000)]
Bug 33761: Alter query to remove items with active transfers from available list

Current code removes all items without an active transfer, and any with completed transfers.

This patch moves the conditionals for transfers into the join, then adds a new
condition to remove items with active transfers.

To test:
1 - Apply unit test patch only
2 - prove -v t/db_dependent/HoldsQueue.t
3 - It fails
4 - Apply second patch
5 - prove -v t/db_dependent/HoldsQueue.t
6 - Success!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d95312328dc83aa98728ac77ef55104ea820adfd)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33761: Unit test
Nick Clemens [Mon, 15 Aug 2022 13:34:02 +0000 (13:34 +0000)]
Bug 33761: Unit test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 67e9356deab73d52fd5b3256b8bbbcd92ec61a34)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33624: Hide the "list" tab if authority is selected
Jonathan Druart [Thu, 11 May 2023 12:35:23 +0000 (14:35 +0200)]
Bug 33624: Hide the "list" tab if authority is selected

The "Select a list of records" should only be available for biblio
records. But if the page is accessed using the back button of the
browser it will be displayed for authorities as well.

Test plan:
- Make sure you have at least one template for MARC Modification
- Also make sure you have at least one list of biblio records
- navigate to Cataloging -> Batch record modification
- Check the "Authorities" radio button
- Select your template and continue
- No records were modified -> use your browser's Back button to go back one page
- The "Authorities" radio button should still be selected
=> Without this patch you see the tab "Select a list of records"
=> With this patch applied it's hidden when the page is loaded

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c87b1bba1b4cbf38aa47f77383c777e73e0a1ac0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 33735: Misspelling in SMS provier
Owen Leonard [Mon, 15 May 2023 17:38:50 +0000 (17:38 +0000)]
Bug 33735: Misspelling in SMS provier

Correct spelling error: "provier" -> "provider"

This change is a one-character edit, I think visual inspection of the
patch is sufficient testing.

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 4ad0e757d8203bdeaaa8a6b084b8e2d7c9bf4efb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>