koha.git
11 months agoUpdate release notes for 23.05.01 release v23.05.01
Fridolin Somers [Wed, 28 Jun 2023 13:25:20 +0000 (15:25 +0200)]
Update release notes for 23.05.01 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
11 months agoIncrement version for 23.05.01 release
Fridolin Somers [Mon, 26 Jun 2023 13:33:33 +0000 (15:33 +0200)]
Increment version for 23.05.01 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
11 months agoTranslation updates for Koha 23.05.01
Koha translators [Mon, 26 Jun 2023 13:10:45 +0000 (10:10 -0300)]
Translation updates for Koha 23.05.01

11 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>
11 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>
11 months agoBug 34028: Fix manual entry for two factor authentication
David Cook [Fri, 16 Jun 2023 06:04:37 +0000 (06:04 +0000)]
Bug 34028: Fix manual entry for two factor authentication

This patch changes the "Account" and "Key" display so that
you can manually enter two factor authentication details into
an authenticator app.

The details are the same as those provided by scanning the QR code.

Test plan:
0. Apply patch
1. Go to
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=TwoFactorAuthentication
2. Change setting to "Enable"
3. Go to http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=51
4. Click "More" on record toolbar and choose "Manage two-factor authentication"
5. Click "Enable two-factor authentication"
6. Scan the QR code into an authenticator app and note it creates an entry called
"Centerville: Centerville_koha"
7. Manually enter an entry into an authenticator app (like Google Authenticator)
7a. Add the "Account" as shown on the Koha screen
7b. Add the "Key" as shown on the Koha screen
8. Note that the entries added by QR code and manual entry have the same
label and both were accepted by the authenticator app

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 7c05333914e3f54d66b9de6dde82b614ea83569a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
11 months agoBug 34093: Fix paths to jQuery for OAI XSLT
Nick Clemens [Thu, 22 Jun 2023 11:02:31 +0000 (11:02 +0000)]
Bug 34093: Fix paths to jQuery for OAI XSLT

To test:
1 - Enable OAI-PMH system preference
2 - Browse to:
    http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml
3 - Click 'Metadata' button for a record
4 - Nothign happens
5 - Check the console:
    Loading failed for the <script> with source “http://localhost:8080/opac-tmpl/bootstrap/lib/jquery/jquery-migrate-3.3.2.min.js”.
    Loading failed for the <script> with source “http://localhost:8080/opac-tmpl/bootstrap/lib/jquery/jquery-3.6.0.min.js”.
    Loading failed for the <script> with source “http://localhost:8080/opac-tmpl/bootstrap/lib/bootstrap/js/bootstrap.bundle.min.js”.
6 - Apply patch
7 - Reload
8 - Console errors are gone
9 - Clicking 'Metadata' expands the record content

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 bb8db3c7f6f14cb04312c49bd9b8b7ca6b74425c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
11 months agoBug 34022: Adjust items data structure
Tomas Cohen Arazi [Thu, 22 Jun 2023 19:06:11 +0000 (16:06 -0300)]
Bug 34022: Adjust items data structure

When creating items at receiving, the generated data structure didn't
match what the code expected, so this patch adapts the code to match the
new data structure introduced by bug 8179.

Once I fixed that, I noticed that the $.ajax request payload, when it
contains an array parameter, it renames it like `param[]`. So the
finishreceive.pl controller is adjusted to this behaviour for the 'on
receiving' use case.

To test:
1. Apply this patch
2. Create a basket with 'create items on receive'
3. Create an order line
4. Close basket
5. Receive shipment
6. Enter invoice number
7. Click on Receive link in the table
8. Fill out item form, make sure all mandatory fields are set
9. Save
10. Verify that the order line is marked as 'received'
11. Verify that there item is created on the record
=> SUCCESS: Works as expected
12. Sign off :-D

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a40c512bf083a1bb48daeecd2f407b4f5586d819)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
11 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>
11 months agoBug 33885: Prevent JS crash if creator does no longer exist
Jonathan Druart [Wed, 7 Jun 2023 09:07:36 +0000 (11:07 +0200)]
Bug 33885: Prevent JS crash if creator does no longer exist

JS error in the console was
  Uncaught TypeError: row.creator is null

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 30d2ffd2953434eec112a403a0297e285fa4a76d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
11 months agoBug 33885: Make Koha::Acq::Order->creator return undef if no creator
Jonathan Druart [Wed, 7 Jun 2023 09:05:18 +0000 (11:05 +0200)]
Bug 33885: Make Koha::Acq::Order->creator return undef if no creator

If the account of the creator of an order has been deleted we should
return undef here, instead of crashing with
GET /api/v1/acquisitions/orders: unhandled exception (Mojo::Exception)<<DBIC result _type  isn't of the _type Borrower at /kohadevbox/koha/Koha/Objects.pm line 445.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1c3a35418ea3defb50debbab4fd334bee4eb5229)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
11 months agoBug 33966: (bug 23824 follow-up) Fix submit buttons for translated templates
Jonathan Druart [Fri, 9 Jun 2023 13:35:41 +0000 (15:35 +0200)]
Bug 33966: (bug 23824 follow-up) Fix submit buttons for translated templates

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Andrii Nugged <nugged@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a8c6c134d8e7322d935af8e95231f942f55c0342)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
12 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>
12 months agoBug 33725: (follow-up) Add ccode to grouping logic
Lucas Gass [Wed, 31 May 2023 21:39:14 +0000 (21:39 +0000)]
Bug 33725: (follow-up) Add ccode to grouping logic

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33725: Add collection to search results
Lucas Gass [Fri, 12 May 2023 17:54:26 +0000 (17:54 +0000)]
Bug 33725: Add collection to search results

To test:
1. Apply patch and restart services
2. Do a catalog search that will return available, onloan, and notforloan items. (withdrawn,lost,damaged)
3. Notice that the location column should now also include the collection description underneath the shelving location.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 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>
12 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>
12 months agoBug 32478: DBRev 23.05.00.003
Tomas Cohen Arazi [Wed, 7 Jun 2023 18:07:42 +0000 (15:07 -0300)]
Bug 32478: DBRev 23.05.00.003

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 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>
12 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>
12 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>
12 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>
12 months agoBug 32478: (follow-up) UpdateItemLocationOnCheckin no longer needs flattening
Nick Clemens [Thu, 4 May 2023 18:37:53 +0000 (18:37 +0000)]
Bug 32478: (follow-up) UpdateItemLocationOnCheckin no longer needs flattening

This patch removes a line flattening the arrays generated by get_yaml_pref_hash
as it is no longer necessary

Conditionals are adjusted to avoid warnings in tests

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>
12 months agoBug 32478: Fix handling of undef values in ItemsDeniedRenewal
David Gustafsson [Thu, 4 May 2023 15:51:44 +0000 (17:51 +0200)]
Bug 32478: Fix handling of undef values in ItemsDeniedRenewal

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>
12 months agoBug 32478: Remove Koha::Config::SysPref->find since bypasses cache
David Gustafsson [Thu, 29 Sep 2022 15:18:40 +0000 (17:18 +0200)]
Bug 32478: Remove Koha::Config::SysPref->find since bypasses cache

get_yaml_pref_hash also allows invalid YAML and only parses a limited
subset so remove this method to avoid future issues.

To test):

Since tests already exists for C4::Context->yaml_preference and this
is a trivial change, do we really need a test plan for this?

Sponsored-by: Gothenburg University Library
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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 months agoBug 33343: Catch more cases and correctly use new-password hint
Martin Renvoize [Mon, 22 May 2023 14:54:14 +0000 (15:54 +0100)]
Bug 33343: Catch more cases and correctly use new-password hint

I believe where we're allowing a user to set a new password instead of
using autocomplete="off" we should be hinting to the brownser that it's
a new password box with autocompelte="new-password".

I also correct a couple of missing instances.. Honestly, I'm not sure
how much this helps these days as most browsers offer to save passwords
regardless.

See: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33343: Make use of the 'autocomplete=off' attribute on password fields
Hammat Wele [Mon, 3 Apr 2023 21:04:28 +0000 (21:04 +0000)]
Bug 33343: Make use of the 'autocomplete=off' attribute on password fields

This patch adds 'autocomplete=off' to all password type fields in the OPAC

To test:
1. Apply the patch
2. Visit http://master/cgi-bin/koha/opac-main.pl
3. Inspect the page
    --> Confirm html shows autocomplete off on the password field
4. Click on Log in (without filling any field)
5. Repeat step 3
    --> Confirm html shows autocomplete off on the password field
6. Set 'PatronSelfRegistration' system preference to 'Allow' and PatronSelfRegistrationDefaultCategory to 'Board'
7. Visit http://master/cgi-bin/koha/opac-memberentry.pl
9. Repeat step 3
    --> Confirm html shows autocomplete off on the password field
10. Connect to the OPAC
11. Click on Change password
11. Repeat step 3
    --> Confirm html shows autocomplete off on the password field
12. Set 'EnableExpiredPasswordReset' system preference to 'Enable'
13. Visit http://master/cgi-bin/koha/opac-reset-password.pl
14. Repeat step 3
    --> Confirm html shows autocomplete off on the password field

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 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>
12 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>
12 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>
12 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>
12 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>
12 months agoBug 21983: DBRev 23.05.00.002
Tomas Cohen Arazi [Tue, 6 Jun 2023 18:26:52 +0000 (15:26 -0300)]
Bug 21983: DBRev 23.05.00.002

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 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>
12 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>
12 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>
12 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>
12 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>
12 months agoBug 33236: (follow-up) Add use statements
Nick Clemens [Tue, 2 May 2023 10:58:27 +0000 (10:58 +0000)]
Bug 33236: (follow-up) Add use statements

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33236: (follow-up) Remove export of NewSuggestion
Nick Clemens [Fri, 14 Apr 2023 13:43:17 +0000 (13:43 +0000)]
Bug 33236: (follow-up) Remove export of NewSuggestion

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33236: (follow-up) Handle new suggestion in ReNewSubscription
Nick Clemens [Fri, 14 Apr 2023 13:42:03 +0000 (13:42 +0000)]
Bug 33236: (follow-up) Handle new suggestion in ReNewSubscription

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33236: Move NewSuggestion to Koha::Suggestion->store
Nick Clemens [Wed, 15 Mar 2023 15:27:11 +0000 (15:27 +0000)]
Bug 33236: Move NewSuggestion to Koha::Suggestion->store

The NewSuggestion routine saved the suggestion to the DB
and returned the id

This patch moves the code to Koha::Suggestion->store and
handles emailing upon creation, this adds that functionality to
suggestions added via api

To test:
1 - Apply patch
2 - Test adding a suggestion on the opac and staff client
3 - Confirm the suggestions are added correctly

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 months agoBug 33697: DBRev 23.05.00.001
Tomas Cohen Arazi [Mon, 5 Jun 2023 18:22:15 +0000 (15:22 -0300)]
Bug 33697: DBRev 23.05.00.001

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 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>
12 months agoBug 33789: Update POD
Tomas Cohen Arazi [Mon, 5 Jun 2023 18:18:04 +0000 (15:18 -0300)]
Bug 33789: Update POD

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 229b6b58efdac2972e9739dbe6959649c89d3bac)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33789: Add unit test
Lucas Gass [Wed, 24 May 2023 18:38:42 +0000 (18:38 +0000)]
Bug 33789: Add unit test

JD amended patch: Remove biblionumber => 144

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 143e0fe8aca35c15e8a37c18807f54fdf570b06d)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33789: Return issue info. when adding a credit
Lucas Gass [Fri, 19 May 2023 22:09:16 +0000 (22:09 +0000)]
Bug 33789: Return issue info. when adding a credit

To test:
1. Make sure MarkLostItemsAsReturned is set so a lost item will stay on a patrons account after being marked as lost.
2. Check an item out to a patron, make sure it has a replacementprice
3. Mark the item as lost.
4. Now check the item in.
5. Go to the patrons account -> transaction tab. You should see 2 accountlines related to the item.
6. For the account type 'Lost item' you will see issue infomation ( check out date, due date, checkouted out from, etc )
7. For the account type 'Lost item fee refund' there is no issue information.
8. Apply patch
9. Try 2 - 6 again. This time the 'Lost item fee refund' should include issue information.

Signed-off-by: Laura Escamilla <laura.escamilla@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 14e4a3b5c7aabf816a6c21a0c318d6c4e3b1939a)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 months agoAmend release team
Tomas Cohen Arazi [Thu, 1 Jun 2023 00:09:06 +0000 (21:09 -0300)]
Amend release team

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoKoha 23.05.00 is here! v23.05.00
Tomas Cohen Arazi [Wed, 31 May 2023 14:30:05 +0000 (11:30 -0300)]
Koha 23.05.00 is here!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoTranslation fixes
Tomas Cohen Arazi [Wed, 31 May 2023 15:06:29 +0000 (12:06 -0300)]
Translation fixes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoTranslation updates for Koha 23.05.00
Koha translators [Wed, 31 May 2023 12:15:03 +0000 (09:15 -0300)]
Translation updates for Koha 23.05.00

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoAdd release notes for 23.05.00
Tomas Cohen Arazi [Wed, 31 May 2023 14:27:30 +0000 (11:27 -0300)]
Add release notes for 23.05.00

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months ago23.05.00: Fix db_revs
Tomas Cohen Arazi [Wed, 31 May 2023 13:05:23 +0000 (10:05 -0300)]
23.05.00: Fix db_revs

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months ago23.05.00: Update kohastructure.sql
Tomas Cohen Arazi [Wed, 31 May 2023 13:04:12 +0000 (10:04 -0300)]
23.05.00: Update kohastructure.sql

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 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>
12 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>
12 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>
12 months agoBug 33864: Trigger the 'change' event when setting quantity
Tomas Cohen Arazi [Tue, 30 May 2023 19:13:00 +0000 (16:13 -0300)]
Bug 33864: Trigger the 'change' event when setting quantity

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
12 months agoBug 33864: Restore inputmode="numeric" (bug 28283)
Tomas Cohen Arazi [Tue, 30 May 2023 16:58:16 +0000 (13:58 -0300)]
Bug 33864: Restore inputmode="numeric" (bug 28283)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
12 months agoBug 33864: Better handling of confirmation button
Tomas Cohen Arazi [Tue, 30 May 2023 15:07:39 +0000 (12:07 -0300)]
Bug 33864: Better handling of confirmation button

This patch corrects the behavior of the 'Confirm' button on the three
possible scenarios regarding item creation.

Ordering:
- 'Confirm' disabled, only gets enabled if quantity > 0

Receiving:
- Quantity gets locked (only changeable when creating items)
- 'Confirm' disabled, only gets enabled if quantity > 0

Cataloguing:
- It now defaults to 1
- 'Confirm' enabled by default (because of 1) if quantity is set to 0,
  it gets disabled.

To test:
1. Verify the described behavior with the sample orders for the previous
   patch.
=> SUCCESS: It does the job!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
12 months agoBug 33864: Set default date in all acqcreateitem scenarios
Tomas Cohen Arazi [Tue, 30 May 2023 13:26:55 +0000 (10:26 -0300)]
Bug 33864: Set default date in all acqcreateitem scenarios

On b0aab2aeef9a025d3907d0b723b5ea71eaf94542 the flatpickr default to
'today' was restored, but only for acqcreateitem='ordering'. This patch
moves the initialization to a different stop for broader reach.

To test:
1. Have 3 baskets on with each setting:
   - create_item = 'cateloguing'
   - create_item = 'ordering'
   - create_item = 'receiving'
2. Close those baskets
3. Go to 'Receive shipments'
4. Choose things from the 3 baskets and then 'Receive selected'
5. Navigate through the different orders
=> FAIL: Only the one that has items created on ordering has the date
filled by default
6. Apply this patch
7. Reload the page
8. Repeat 5
=> SUCCESS: Dates are pre-filled!
9. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
12 months agoBug 33783: Only use ecost if unitprice has not been set on ordering
Tomas Cohen Arazi [Tue, 30 May 2023 17:23:59 +0000 (14:23 -0300)]
Bug 33783: Only use ecost if unitprice has not been set on ordering

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
12 months agoBug 33783: Make sure the value is populated on load time
Tomas Cohen Arazi [Mon, 29 May 2023 19:14:56 +0000 (16:14 -0300)]
Bug 33783: Make sure the value is populated on load time

The original patch makes the form set the right values in the order row
(before storing it) but misses to load the right value on page load,
which is still a regression. This patch solves that.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
12 months agoBug 33783: (bug 8179 follow-up) Populate actual cost with ecost during receiving...
Nick Clemens [Fri, 26 May 2023 12:50:41 +0000 (12:50 +0000)]
Bug 33783: (bug 8179 follow-up) Populate actual cost with ecost during receiving if not set

This restores behavior prior to 8179 to use the estimated cost when receiving if the
actual cost is not set.

We set the unitprice in the table row so that it will be used when editing and will be saved even if not adjusted

To test:
1 - Add some orders to a basket, do not set actual cost field
2 - Close basket, receive orders
3 - Note actual cost field is blank
4 - Cancel receipt
5 - Apply patch
6 - Receive again
7 - Note actual cost is populated
8 - Complete receipt and confirm actual cost correctly saved

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
12 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>
12 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>
12 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>
12 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>
12 months agoBug 33702: (QA follow-up) Do not crash on borrowernumber
Marcel de Rooy [Fri, 12 May 2023 06:56:07 +0000 (06:56 +0000)]
Bug 33702: (QA follow-up) Do not crash on borrowernumber

Resolve:
Can't call method "borrowernumber" on an undefined value at /usr/share/koha/opac/opac-illrequests.pl line 66

Test plan:
Put an unexisting illrequest_id in the URL parameter.
You should see a 404, not a crash.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33702: Prevent ILL requests to be modified by somebody else
Jonathan Druart [Wed, 10 May 2023 05:37:57 +0000 (07:37 +0200)]
Bug 33702: Prevent ILL requests to be modified by somebody else

Same as previous patch, but for 'update' and 'cancreq'.
We remove the redirect, but here we only want to focus on the security
fix.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Confirmed. Without this patch a patron can modify and cancel any ILL
request in the OPAC. With this patch the patron is redirected to the
404 page if modification or cancellation is attempted.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 months agoBug 33702: Patrons should only see their own ILLs in the OPAC
Magnus Enger [Tue, 9 May 2023 13:37:51 +0000 (15:37 +0200)]
Bug 33702: Patrons should only see their own ILLs in the OPAC

To reproduce:
- Enable the ILL module
- Install the FreeForm backend as described here:
  https://wiki.koha-community.org/wiki/ILL_backends
- Go to the ILL module and add two different ILL requests by
  clicking on "New ILL request" and entering the necessary details.
- Make sure you connect the two requests to two *different* patrons
  in the field marked "Card number, username or surname"
- Make the two titles different, and make a not of which title is
  connected to which patron
- Log in as one of the two patrons who now have an ILL request each,
  in the OPAC
- Go to the "Interlibrary loan requests" tab
- Click on "View" for the request connected to this patron. The URL
  will look like something like this:
  http://<opac>/cgi-bin/koha/opac-illrequests.pl?method=view&illrequest_id=2
- Now change the number at the end to correspond to the the ILL request
  connected to the *other* patron
- Verify you can see the details of an ILL request conncted to another
  patron than the patron you are logged in as

To test:
- Apply the patch
- Restart all the things if you are testing with ktd
- Reload the detail view of the ILL request that belongs to the patron
  you are not logged in as
- Verify you are redirect to the 404 page and can not see the details
  of the request that belongs to the patron you are not logged in as

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>
12 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>
12 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>