]> git.koha-community.org Git - koha.git/log
koha.git
4 months agoBug 36575: Adjust checkpw_internal to return patron
Nick Clemens [Wed, 24 Apr 2024 15:06:22 +0000 (15:06 +0000)]
Bug 36575: Adjust checkpw_internal to return patron

This patch refactors checkpw_internal to remove the SQL code, use patron ojbects, and return the
patron that correctly matches the userid/caerdnumber when auth is successful

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 months agoBug 36575: (bug 34893 follow-up) Return patron when autocreating in Shibboleth
Nick Clemens [Wed, 24 Apr 2024 14:25:40 +0000 (14:25 +0000)]
Bug 36575: (bug 34893 follow-up) Return patron when autocreating in Shibboleth

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 months agoBug 36575: (bug 34893 follow-up) Return patron from LDAP
Nick Clemens [Wed, 24 Apr 2024 14:23:51 +0000 (14:23 +0000)]
Bug 36575: (bug 34893 follow-up) Return patron from LDAP

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 months agoBug 36575: (QA follow-up)
Martin Renvoize [Thu, 11 Apr 2024 10:18:30 +0000 (12:18 +0200)]
Bug 36575: (QA follow-up)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 months agoBug 36575: Return correct patron when there is a shared userid / cardnumber
Nick Clemens [Thu, 11 Apr 2024 09:39:03 +0000 (09:39 +0000)]
Bug 36575: Return correct patron when there is a shared userid / cardnumber

This patch moves some patron fetching code in C4/Auth to use to patron returned from the validation
methods and only try to fetch the patron (to check if locked, update attempts, etc) if we didn't authenticate

To test:
1 - Set a user to have userid = BANANA password = Password1
2 - Set a user to have cardnumber = BANANA password = Password2
3 - Hit the patron authentication API:
    http://localhost:8080/api/v1/auth/password/validation
    with data:
    { "identifier": "BANANA", "password":"Password1" }
    and:
    { "identifier": "BANANA", "password":"Password2" }
4 - Note you receive the same response for both
5 - Apply patch, restart all
6 - Repeat the API and confirm you get the correct patron for the password submitted

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 months agoBug 36575: Unit tests for checkpw_shib
Tomas Cohen Arazi [Thu, 30 May 2024 16:15:09 +0000 (16:15 +0000)]
Bug 36575: Unit tests for checkpw_shib

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 months agoBug 36575: Unit tests for checkpw_ldap
Tomas Cohen Arazi [Thu, 30 May 2024 14:51:11 +0000 (14:51 +0000)]
Bug 36575: Unit tests for checkpw_ldap

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
4 months agoBug 36367: Fix test t/db_dependent/Auth.t
Julian Maurice [Thu, 18 Apr 2024 14:38:03 +0000 (16:38 +0200)]
Bug 36367: Fix test t/db_dependent/Auth.t

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36367: Fix test t/Token.t
Julian Maurice [Thu, 18 Apr 2024 14:26:44 +0000 (16:26 +0200)]
Bug 36367: Fix test t/Token.t

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36367: Remove call to non-existent subroutine new_userenv
Julian Maurice [Thu, 18 Apr 2024 14:20:53 +0000 (16:20 +0200)]
Bug 36367: Remove call to non-existent subroutine new_userenv

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36367: Fix BackgroundJob.t
Jonathan Druart [Wed, 20 Mar 2024 08:12:54 +0000 (09:12 +0100)]
Bug 36367: Fix BackgroundJob.t

This test is useless it seems, it is not testing background jobs
behaviour.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36367: Remove obsolete tests
Jonathan Druart [Wed, 20 Mar 2024 07:51:45 +0000 (08:51 +0100)]
Bug 36367: Remove obsolete tests

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36367: Set to undef when unsetting
Jonathan Druart [Wed, 20 Mar 2024 07:51:06 +0000 (08:51 +0100)]
Bug 36367: Set to undef when unsetting

We usually test if C4::Context->userenv, so we need to undef when
unsetting, not {} (evaluated true)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36367: Remove schema_stack
Jonathan Druart [Fri, 8 Mar 2024 13:33:29 +0000 (14:33 +0100)]
Bug 36367: Remove schema_stack

Same pattern in Koha::Database

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36367: Remove dbh_stack
Jonathan Druart [Mon, 11 Mar 2024 14:12:09 +0000 (15:12 +0100)]
Bug 36367: Remove dbh_stack

Same pattern, remove dbh stack

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36367: Remove context stack
Jonathan Druart [Mon, 11 Mar 2024 13:45:40 +0000 (14:45 +0100)]
Bug 36367: Remove context stack

We are not using it and it's confusing, let's remove the context stack.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36367: Remove _new_userenv
Jonathan Druart [Mon, 11 Mar 2024 13:30:25 +0000 (14:30 +0100)]
Bug 36367: Remove _new_userenv

TODO - better review C4::Auth's changes. Are all the removal of
_new_userenv correct/enough?

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36367: Remove flush_schema_cached
Jonathan Druart [Fri, 8 Mar 2024 13:29:33 +0000 (14:29 +0100)]
Bug 36367: Remove flush_schema_cached

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36367: Remove get_schema_cached
Jonathan Druart [Fri, 8 Mar 2024 13:29:09 +0000 (14:29 +0100)]
Bug 36367: Remove get_schema_cached

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36459: Do not duplicate duedatespec IDs
Lucas Gass [Wed, 12 Jun 2024 19:40:03 +0000 (19:40 +0000)]
Bug 36459: Do not duplicate duedatespec IDs

To test;
1. Go to circ/circulation.pl and check an item out to a patron.
2. Backdate it to sometime in the past using the "Specify due date
   (MM/DD/YYYY) : " input
3. A modal appears to "Please confirm checkout". The date is no longer
   populated in that field.
4. You must add the date again here.
5. APPLY PATCH
6. Try again and this time the confimration date should be set
   correctly.
7. Follow the test plan from Bug 18885 to make sure on site checkouts
   still work correctly.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 30623: (RM follow-up) Terminology: settings -> permissions
Martin Renvoize [Fri, 14 Jun 2024 10:13:08 +0000 (11:13 +0100)]
Bug 30623: (RM follow-up) Terminology: settings -> permissions

We're copying permissions not settings here, so it makes sense to make
that clear in the wording.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 35568: Supress exception
Kyle M Hall [Wed, 22 May 2024 11:05:08 +0000 (07:05 -0400)]
Bug 35568: Supress exception

4 months agoBug 36926: Move syspref PlaceHoldsOnOrdersFromSuggestions
Sam Lau [Tue, 4 Jun 2024 20:36:46 +0000 (20:36 +0000)]
Bug 36926: Move syspref PlaceHoldsOnOrdersFromSuggestions

This patch moves the 'PlaceHoldsOnOrdersFromSuggestions' system preferences
from the Acquisitions->Printing section to the Circulation->Holds Policy section.

To test:
1) Go to Admin->System Preferences and search for 'PlaceHoldsOnOrdersFromSuggestions'
2) Note that it is located in the Acquisitions prefs, under the Printing subheading
3) Apply patch
4) search for the preferences again
5) Note that it is now located in the Circulation preferences under the Holds Policy subheading

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36330: DBRev 24.06.00.007
Martin Renvoize [Thu, 13 Jun 2024 13:30:25 +0000 (14:30 +0100)]
Bug 36330: DBRev 24.06.00.007

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36330: Follow up, change comments in the DB
Magnus Enger [Thu, 6 Jun 2024 13:12:29 +0000 (15:12 +0200)]
Bug 36330: Follow up, change comments in the DB

This patch updates the comments of course_items.location and
course_items.enabled to say "reserve" instead of "reseve".

To test in ktd:
- sudo koha-mysql kohadev
- Run: "SHOW CREATE TABLE course_items;"
- Verify the comments of "location" and "enabled" contains
  "reseve" instead of "reserve"
- Make a note of the definitions of these two columns
- Run the atomicupdate: "sudo koha-upgrade-schema kohadev"
- Log into the database again and run the same command as above
- Verify the comments now say "reserve" instead of "reseve"
- Make sure the column definitions are otherwise identical to
  the ones you saw before the upgrade. Only the spelling of
  "reserve" in the comment should be changed.

Signed-off-by: David Nind <david@davidnind.com>
Removed unnecessary line of debug output. 2024-06-10 Magnus Enger

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36330: Change 'reseve' to 'reserve'
Alex Buckley [Thu, 21 Mar 2024 23:49:09 +0000 (23:49 +0000)]
Bug 36330: Change 'reseve' to 'reserve'

Test plan:
1. git grep 'reseve'. Notice there are instances of 'reseve'
2. Apply patch
3. Repeat step 1, there should be no instances of 'reseve'

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 35294: Fix typos in catalogue code comments
Brendan Lawlor [Thu, 6 Jun 2024 13:14:43 +0000 (13:14 +0000)]
Bug 35294: Fix typos in catalogue code comments

Test plan:
1. git grep -n -E 'barocode|preproccess' to find the files and line # of typos
2. Apply the patch
3. git grep -E 'barocode|proccess'
4. See no results

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 25520: Fix the SMS number input hint on the OPAC messaging page
David Nind [Tue, 4 Jun 2024 01:57:37 +0000 (01:57 +0000)]
Bug 25520: Fix the SMS number input hint on the OPAC messaging page

This makes the hint when entering an SMS number on the OPAC messaging
settings page the same as the staff interface hint: "Please enter
numbers only. Prefix the number with + or 00 if including the country
code." For some countries using either +XX or 00XX are accepted,
for example: +49 or 0049.

Test plan:
1. Set the SMSSendDriver system preference to Email
2. View the current hint for entering an SMS number in the staff
   interface:
   2.1 Go to Patrons > + New patron > Patron.
   2.2 Scroll down to the 'Patron messaging preferences' section at the
       end of the page.
   2.3 Note that the hint is "Please enter numbers only. Prefix the
       number with + or 00 if including the country code.".
3. View the current hint for entering an SMS number in the OPAC:
   3.1 Go to the OPAC > Your account (log in if required).
   3.2 Select the 'Messaging' tab/section.
   3.3 Note that the hint is "Please enter numbers only. Prefix the
       number with + if including the country code.".
   3.4 The difference: "..or 00.." is missing.
4. Apply the patch.
5. Refresh the OPAC messaging page.
6. The hint text for the OPAC is now the same as the staff interface.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36922: Patron attributes - update hint text for "Is a date"
David Nind [Fri, 31 May 2024 21:19:57 +0000 (21:19 +0000)]
Bug 36922: Patron attributes - update hint text for "Is a date"

The date field for patron attributes is now repeatable (enhancement made
in Koha 24.05 with bug 32610). This updates the hint text to reflect
the change.

Test plan:
1. Go to add a patron attribute (Administration > Patrons and
   circulation > Patron attribute types > + New patron attribute type )
2. Note that the hint for the "Is a date" field says "...Date attributes
   cannot be repeatable or linked to an authorised value category.".
3. Apply the patch.
4. Reload the page.
5. Note that the hint now says "...Date attributes are repeatable,
   but cannot be linked to an authorised value category."
6. Sign off D:

PA amended: 'are repeatable' -> 'can be repeatable'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36338: Update onboarding error message when creating the Koha administrator patron
David Nind [Thu, 16 May 2024 03:59:42 +0000 (03:59 +0000)]
Bug 36338: Update onboarding error message when creating the Koha administrator patron

Update the error message for the web installer onboarding
section when creating the Koha administrator patron (where
the card number or username already exists):
- Fix capitalization
- Use the same label in the error message as used in
  the form

Error message before: The patron has not been created!
Card number or Userid may already exist.

Error message after: The patron was not created! The
card number or username already exists.

Test plan:
1. Option 1:
   1.1 Review the diff for the patch and make sure that
       the updated text makes sense.
       . Previous text: The patron has not been created!
         Card number or Userid may already exist.
       . Updated text: The patron was not created! The
         card number or username already exists.
OR
2. Option 2:
   2.1 Access the database server:
       mysql -uroot -ppassword -hkoha-db-1
   2.2 Drop the koha_kohadev database:
       drop database koha_kohadev;
   2.3 Create the database: create database koha_kohadev;
   2.4 Add privileges (for a real installation this would
       be limited):
       grant all on koha_kohadev.* to koha_kohadev;
   2.5 Restart everything (there may be some errors listed):
       flush_memcached and then restart_all
   2.6 Access the web installer: go to 127.0.0.1:8081
   2.7 Use the database user name and password: get from
       /etc/koha/sites/kohadev/koha-conf.xml
       (default: koha_kohadev, password)
   2.8 Continue through the installation process until you
       reach 'Selecting default settings':
      . Make appropriate selections to use all the sample
        data options and settings
   2.9 For the 'Onboarding' step - Create Koha
       administrator patron:
       . Surname: Acevedo
       . First name: Henry
       . Card number: make up a number that doesn't exist in
         the sample date, for example: 741852963
       . Library: Centerville
       . Patron category: Staff
       . Username: 23529000035676 (this is an existing
         value already in the sample data)
       . Password: a valid password, for example:
         KohaCon2024
       . Confirm password: repeat password used
       . Submit
         ==> Error message before patch: The patron has not
             been created! Card number or Userid may
             already exist.
   2.10 Apply the patch.
   2.11 Repeat step 2.9
   2.12 The error message is now: The patron was not created!
        The card number or username already exists.

3. Sign off.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36930: Item search gives irrelevant results when using 2+ added filter criteria
Janusz Kaczmarek [Wed, 22 May 2024 21:08:35 +0000 (21:08 +0000)]
Bug 36930: Item search gives irrelevant results when using 2+ added filter criteria

In the Item search the librarian is allowed, in the first step, to define
additional filters like Title, Author, Publisher, Publication date etc.
(in the third fieldset).  This works fine but only for one criterion.
If one adds two or more criteria, the filter does not apply at all.

Test plan
=========
1. Make an Item search with the Pulblisher filter. Put
   %University of California% as the value.
   You should get 5 rows (with standard ktd test data set), three
   from 1982, and two from 1988.
2. Edit search -> add the second criterion: AND Publication date is 1982.
   You would expect three rows but you get 900+ rows.
3. Apply the patch; restart_all.
4. Repeat p. 2. You should get the expected three rows.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36961: Fix typo in opacreadinghistory system preference description
David Nind [Tue, 28 May 2024 01:34:41 +0000 (01:34 +0000)]
Bug 36961: Fix typo in opacreadinghistory system preference description

Fix a spelling error in the opacreadinghistory system preference
description - 'itms' to 'items'.

Test plan:
1. In the staff interface view the description for the
   opacreadinghistory system preferences (Koha administration >
   System preferences > search for opacreadinghistory).
2. Note that it reads "Allow patrons to see what itms they have
   checked out in the past."
3. Apply the patch.
4. Refresh the page.
5. Note that 'itms' is now spelt correctly as 'items'.
6. Sign off.

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36940: Resolve two warnings on undefined branchip
Marcel de Rooy [Thu, 23 May 2024 08:47:50 +0000 (08:47 +0000)]
Bug 36940: Resolve two warnings on undefined branchip

If you enabled AutoLocation and have a branch without ip, this
triggers warnings.

Test plan:
Check logs in this situation with/without this patch by logging out
and in again on staff.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 34573: (follow-up) Add better logic for add/update title and headers
Owen Leonard [Thu, 6 Jun 2024 12:54:18 +0000 (12:54 +0000)]
Bug 34573: (follow-up) Add better logic for add/update title and headers

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 34573: (follow-up) Additional updates for modify vendor page
David Nind [Tue, 21 Nov 2023 23:11:02 +0000 (23:11 +0000)]
Bug 34573: (follow-up) Additional updates for modify vendor page

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 34573: Fix inconsistencies in acquisitions modify vendor title tag
Owen Leonard [Tue, 21 Nov 2023 13:48:42 +0000 (13:48 +0000)]
Bug 34573: Fix inconsistencies in acquisitions modify vendor title tag

This patch updates the vendor details template so that the title tag
correctly reflects whether the user is viewing the vendor or modifying
it.

To test, apply the patch and go to Acquisitions.

- Locate a vendor and view the details (supplier.pl?booksellerid=X)
  - The title should read "Vendor X > Acquisitions > Koha"
- Edit the vendor.
  - The title should read "Modify vendor X > Acquisitions > Koha"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 34077: Allow to use --category-code as the only filter option
Julian Maurice [Fri, 16 Feb 2024 08:31:27 +0000 (09:31 +0100)]
Bug 34077: Allow to use --category-code as the only filter option

--category-code was not checked in the "at least one filter option"
check but it is clearly a filter option.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 34077: Improve documentation and error messages of writeoff_debts.pl
Julian Maurice [Fri, 16 Feb 2024 08:23:13 +0000 (09:23 +0100)]
Bug 34077: Improve documentation and error messages of writeoff_debts.pl

* Change the SYNOPSIS to better describe the different ways to use the
  script
* Only show the SYNOPSIS when options used are wrong (unknown option,
  no filter options, or neither -c nor -v)
* Show the options details only with --help
* Clarify the fact that -v is required when -c is not supplied in the
  description of both options
* Print a specific error message for the following cases:
  * no filters options
  * neither -c nor -v was supplied

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36937: Remove warning from unit tests
Matt Blenkinsop [Thu, 23 May 2024 09:23:10 +0000 (09:23 +0000)]
Bug 36937: Remove warning from unit tests

This patch fixes a warning in the unit tests

Test plan:
1) prove t/db_dependent/api/v1/password_validation.t
2) There will be a warning in the output - 'Use of uninitialized value $status in numeric eq (==)'
3) Apply patch
4) Re-run the test
5) The warning will disappear

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 35639: (RM follow-up) Fix missing import
Martin Renvoize [Thu, 13 Jun 2024 13:07:36 +0000 (14:07 +0100)]
Bug 35639: (RM follow-up) Fix missing import

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 35597: (RM follow-up) Modernise DB Update
Martin Renvoize [Thu, 13 Jun 2024 13:07:17 +0000 (14:07 +0100)]
Bug 35597: (RM follow-up) Modernise DB Update

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 35597: DBRev 24.06.00.006
Martin Renvoize [Thu, 13 Jun 2024 13:04:19 +0000 (14:04 +0100)]
Bug 35597: DBRev 24.06.00.006

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 35597: Move modification logging to Koha::Suggestion
Kyle M Hall [Fri, 17 May 2024 12:46:30 +0000 (08:46 -0400)]
Bug 35597: Move modification logging to Koha::Suggestion

Some actions such as archiving a suggestion were not being logged.
By moving the logging to Koha::Suggestion we can ensure more
modifcations will be logged.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 35597: Tidy Suggestions.pm
Kyle M Hall [Fri, 17 May 2024 12:16:02 +0000 (12:16 +0000)]
Bug 35597: Tidy Suggestions.pm

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 35597: Log creation on suggestion from staff or OPAC
Lucas Gass [Fri, 17 May 2024 12:12:57 +0000 (08:12 -0400)]
Bug 35597: Log creation on suggestion from staff or OPAC

To test:
1. Apply patch, restart services, updatedatabase
2. Search for the system preference 'SuggestionsLog', it should be off.
   Turn it on.
3. Create a purhase suggestion
4. Go to Tools > Log viewer. In modules check 'Suggestions'
5. You should see your newly created suggestion.
6. Create a suggestion from the OPAC.
7. You should see your newly created OPAC suggestion.
8. Modify the suggestion and check the logs again, the modification
   should be logged.
9. Delete the suggestion, the deletion should be logged.
10. Do a purchase suggestion via the OPAC.
11  Check the logs to see the newly created suggestion, the interface
    should be OPAC.
12. Turn off SuggestionsLog
13. No changes of any kind should be logged.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 35597: logaction when modifying or deleteing suggestions
Lucas Gass [Thu, 21 Dec 2023 23:05:19 +0000 (23:05 +0000)]
Bug 35597: logaction when modifying or deleteing suggestions

To test:
1. Apply patch, restart services, updatedatabase
2. Search for the system preference 'SuggestionsLog', it should be off.
   Turn it on.
3. Create a purhase suggestion
4. Go to Tools > Log viewer. In modules check 'Suggestions'
5. You should see your newly created suggestion.
6. Modify the suggestion and check the logs again, the modification
   should be logged.
7. Delete the suggestion, the deletion should be logged.
8. Do a purchase suggestion via the OPAC.
9. Check the logs to see the newly created suggestion, the interface
   should be OPAC.
10. Turn of SuggestionsLog
11. No changes of any kind should be logged.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 30715: Terminology for the log viewer - use 'Staff interface' instead of 'Intranet'
David Nind [Mon, 3 Jun 2024 02:01:30 +0000 (02:01 +0000)]
Bug 30715: Terminology for the log viewer - use 'Staff interface' instead of 'Intranet'

The log viewer (Tools > Additional tools > Log viewer) uses
'Intranet' as:
- an option for filtering what log entries to display.
- a value in the log entries interface column, for log entries.

Koha's terminology guideline is to use 'Staff interface' instead of
'Interface' (https://wiki.koha-community.org/wiki/Terminology#I).

Test plan:
1. Perform some actions that will create log entries when using the
   staff interface. For example:
   1.1 Enable the UseRecalls system preference.
   1.2 Edit the title for a record.
   1.3 Add an item for a record.
2. Use the log viewer to view the logged changes:
   2.1 Go to Tools > Additional tools > Log viewer.
   2.2 Select Submit.
   2.3 Log entries are displayed for the changes made.
3. Note that:
   3.1 For the log viewer 'Interface' filter options, "All" is
       selected by default, and other options are Intranet, OPAC,
       SIP, Command-line, REST API, and Cron job.
   3.2 For the changes viewed in step 2, the value displayed in
       the 'Interface' column is 'Intranet'.
4. Apply the patch.
5. Refresh the page.
6. Note that:
   5.1 For the interface filter options, 'Intranet' is now changed
       to 'Staff interface'.
   5.2 In the list of log entries, the value in the interface column
       is now 'Staff interface'.
7. Sign off D:

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 37005: Fix problem with item_type_description being undefined
Lucas Gass [Fri, 31 May 2024 21:30:43 +0000 (21:30 +0000)]
Bug 37005: Fix problem with item_type_description being undefined

To test:
1. Set noItemTypeImages to 'Don't show'
2. Find a record with items and notice the holdings table never loads.
3. APPLY patch, maybe clear borwser cache too.
4. Try again, the holdings table should load.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36999: Fix 00-strict.t fails to find koha_perl_deps.pl
Fridolin Somers [Fri, 31 May 2024 07:45:27 +0000 (09:45 +0200)]
Bug 36999: Fix 00-strict.t fails to find koha_perl_deps.pl

Since Bug 36323 moved koha_perl_deps.pl it is not needed anymore in 00-strict.t
It fails with :
koha_1       | Can't stat koha_perl_deps.pl: No such file or directory
koha_1       |  at /usr/share/perl5/Test/Strict.pm line 151.

Patch remove koha_perl_deps.pl from @dirs.
It contains misc.

Test plan :
prove t/db_dependent/00-strict.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 37071: Updated the purchase suggestions link
Laurae [Tue, 11 Jun 2024 14:04:38 +0000 (14:04 +0000)]
Bug 37071: Updated the purchase suggestions link

To test:
1. Go to a patron account and click on “New purchase suggestion” under the “Purchase Suggestions” tab.
    1. Clicking on the button will take you to the suggestions management page.
2. Apply the patch.
3. Go back to the patron account and click on the “New purchase suggestion” link again. This time it will take you to the purchase suggestion form. You are now able to successfully submit a purchase suggestion.
4. Sign off and have an amazing day. :D

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
4 months agoBug 37037: (RM follow-up) Add hint at end of script run
Martin Renvoize [Thu, 13 Jun 2024 12:38:57 +0000 (13:38 +0100)]
Bug 37037: (RM follow-up) Add hint at end of script run

This patch adds a hint to the end of the script to notify the end user
that they may need to run the build_holds_queue cronjob if they are
using RealTimeHoldsQueue.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 37037: touch_all_biblios.pl triggers rebuilding holds for all affected records...
Kyle M Hall [Wed, 5 Jun 2024 15:04:31 +0000 (11:04 -0400)]
Bug 37037: touch_all_biblios.pl triggers rebuilding holds for all affected records when RealTimeHoldsQueue is enabled

If RealTimeHoldsQueue is on, touch_all_biblios triggers a update_holds_queue_for_biblios background job for each affected record. This will result in a as many background jobs being queued up as records! It makes far more sense for this script to not do that which gives the administrator the option for running the holds queue builder if the changes would affect holdability, or to not run it at all.

Test Plan:
1) Run touch_all_biblios.pl
3) Note a update_holds_queue_for_biblios background job is queued for each record touched
4) Apply this patch
5) Merge touch_all_biblios.pl again
6) Note that no update_holds_queue_for_biblios jobs were queued

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36207: (RM follow-up) CSRF correction
Martin Renvoize [Tue, 11 Jun 2024 15:13:36 +0000 (16:13 +0100)]
Bug 36207: (RM follow-up) CSRF correction

I think there was a rebase issue here where we split the form into two
forms instead of one.  This patch returns us to one form with two
different submit options (one for selected tags and one per tag) that
both trigger the confirmation modal before submitting to the controller.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 34838: (QA follow-up): TypeDisclaimer tests - Add 'type' to request metadata
Pedro Amorim [Mon, 27 May 2024 14:43:41 +0000 (14:43 +0000)]
Bug 34838: (QA follow-up): TypeDisclaimer tests - Add 'type' to request metadata

This adds a type to the request (mocking it as a new ILL request of type journal being submitted)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 months agoBug 34838: Use ->set to avoid method redefinition warnings
Tomas Cohen Arazi [Thu, 16 May 2024 20:13:05 +0000 (17:13 -0300)]
Bug 34838: Use ->set to avoid method redefinition warnings

This patch silences more warnings. To test

1. Be on 23.11.x
2. Apply the patches before this one
3. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Illrequests.t
=> FAIL: Lots of warnings like this:
Subroutine Koha::Illrequest::SUPER::status redefined at /kohadevbox/koha/Koha/Object.pm line 955.
Subroutine Koha::Illrequest::SUPER::status_alias redefined at /kohadevbox/koha/Koha/Object.pm line 955.
illrequestattributes is DEPRECATED in favor of extended_attributes at t/db_dependent/Illrequests.t line 1071.
4. Apply this patch
5. Repeat 3
=> SUCCESS: No more warnings!
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 months agoBug 18493: (follow-up) Fix typo descriptionsn
Nick Clemens [Tue, 11 Jun 2024 11:20:23 +0000 (07:20 -0400)]
Bug 18493: (follow-up) Fix typo descriptionsn

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 35869: Removes the dismiss button from messages on OPAC SCO module
Sam Lau [Wed, 5 Jun 2024 17:57:10 +0000 (17:57 +0000)]
Bug 35869: Removes the dismiss button from messages on OPAC SCO module

This removes the "Dismiss" button from the SCO module. Currently, the
"Dismiss" button is present, however it does not function properly and
logs the user out if they press it. As noted on previous chats, keeping
the button would require serious changes, thus it's easier just to remove
the functionallity.

To test:
1) Enable  WebBasedSelfCheck
2) Add an OPAC mesaage to a patron account
3) Login to self check ( http://localhost:8080/cgi-bin/koha/sco/sco-main.pl )
4) See the OPAC message, click dismiss.
5) Notice you are logged out at redirected to:
   ( http://localhost:8080/cgi-bin/koha/opac-dismiss-message.pl )
6) Apply patch
7) Log back into the self checkout module
8) Notice that there is no longer a "Dismiss" button for the message.
9) Log into OPAC into the same user's account
10) On the summary page, note that there is still a dismiss button.
11) Ensure this still works properly
12) sign-off

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 37021: Change item_id type as integer in holds endpoint
Emmi Takkinen [Tue, 4 Jun 2024 10:00:05 +0000 (13:00 +0300)]
Bug 37021: Change item_id type as integer in holds endpoint

When one makes a GET call to holds endpoint and hold has
item attached to it, item_id is handled as string not integer
as it should.

To reproduce:
1. Make sure you have hold waiting in your database.
2. Call endpoint api/v1/holds/?q=[{"me.status":"W"}].
=> Note that holds item_id is displayed as item_id: "12345".
3. Apply this patch.
4. Call endpoint again.
=> item_id should now be displayed as 12345.

Also prove t/db_dependent/api/v1/holds.t.

Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36166: Disable select to add to list if opacuserlogin is disabled
Matthias Le Gac [Tue, 5 Mar 2024 20:37:11 +0000 (15:37 -0500)]
Bug 36166: Disable select to add to list if opacuserlogin is disabled

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36207: Use confirmation modal when removing tags from titles in the OPAC
Owen Leonard [Thu, 29 Feb 2024 18:37:54 +0000 (18:37 +0000)]
Bug 36207: Use confirmation modal when removing tags from titles in the OPAC

This patch changes the process of removing a tag from a title on the
user's tag list. It now uses a confirmation modal dialog instead of a
JavaScript alert.

The patch also makes some minor tweaks to CSS to correct style on
"remove" links.

To test, apply the patch and rebuild the OPAC CSS.

 - Log in to the OPAC as a user who has submitted multiple tags or tags
   on multiple items.
  - Open the "Tags" link in the sidebar of the user summary page.
  - Click the "Remove tag" link next to one of the titles in the table
    of the user's tags.
  - You should see a modal confirmation message, "Are you sure you want
    to remove the selected tag from this title?" It should show the
    title and the tag which will be removed.
  - Test both the "Yes, remove tag" and "No, do not remove tag" choices.

  - Check the box next to one of the tagged titles and click the
    "Remove selected tags" button at the bottom of the table.
  - You should see a modal confirmation message, "Are you sure you want
    to remove this item from the list?" It should show the title and
    the tag which will be removed.
  - Test boh the "Yes" and "No" choices.

  - Check the box next to multiple tagged titles and click the
    "Remove selected tags" button at the bottom of the table.
  - You should see a modal confirmation message, "Are you sure you want
    to remove the selected tags from these titles" It should show the
    titles of all the records you selected and the corresponding tags to be
    removed.
  - Test both the "Yes" and "No" choices.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 35639: DBRev 24.06.00.005
Martin Renvoize [Tue, 11 Jun 2024 10:52:24 +0000 (11:52 +0100)]
Bug 35639: DBRev 24.06.00.005

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 35639: (RM follow-up) Modernise DB Update
Martin Renvoize [Tue, 11 Jun 2024 10:48:22 +0000 (11:48 +0100)]
Bug 35639: (RM follow-up) Modernise DB Update

4 months agoBug 35639: Trim the messages that are too long before sending them via SMS
Emily-Rose Francoeur [Fri, 22 Dec 2023 13:41:39 +0000 (08:41 -0500)]
Bug 35639: Trim the messages that are too long before sending them via SMS

I created a new system preference, SMSSendMaxChar, which allows you to set a limit for the number of characters in SMS messages to send. When a limit is set, messages that exceed it will be trimed.

TEST PLAN
1) Apply the patch
2) Run prove t/db_dependent/Letters.t

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 18493: DBRev 24.06.00.004
Martin Renvoize [Tue, 11 Jun 2024 10:43:46 +0000 (11:43 +0100)]
Bug 18493: DBRev 24.06.00.004

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 18493: Modernise DB update
Martin Renvoize [Thu, 23 May 2024 14:21:22 +0000 (15:21 +0100)]
Bug 18493: Modernise DB update

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 18493: Add new searchable languages
Lari Taskula [Tue, 25 Apr 2017 10:23:03 +0000 (10:23 +0000)]
Bug 18493: Add new searchable languages

This patch adds the following languages into advanced search "Languages" dropdown:

Greenlandic
Karelian
Cornish
Burmese
Punjabi
Pashto
Finnish Kalo
Akkala Sami
Kildin Sami
Ter Sami
Pite Sami
Kemi Sami
Ume Sami
Southern Sami
Northern Sami
Sami languages
Lule Sami
Inari Sami
Skolt Sami
Somali
Sotho
Votic

To test:
1. perl installer/data/mysql/updatedatabase.pl
2. Go to intranet advanced search
3. Click "More options"
4. See "Limits" fieldset, it should have "Language" drop down
5. Observe that the languages provided in this patch are visible in this dropdown

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Just noting that the order in this dropdown is hopeless.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 37040: (RMaint follow-up) Restore passing CSRF error
Martin Renvoize [Tue, 11 Jun 2024 10:30:22 +0000 (11:30 +0100)]
Bug 37040: (RMaint follow-up) Restore passing CSRF error

This patch restores the plack.middleware.Koha.CSRF plack env setting to
allow passing to the errorDocument.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 34597: DBRev 24.06.00.003
Martin Renvoize [Tue, 11 Jun 2024 08:54:42 +0000 (09:54 +0100)]
Bug 34597: DBRev 24.06.00.003

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 34597: (QA follow-up) Add missing database revision
Martin Renvoize [Wed, 5 Jun 2024 16:18:17 +0000 (17:18 +0100)]
Bug 34597: (QA follow-up) Add missing database revision

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 34597: (follow-up) Update system preference description and order of options
David Nind [Tue, 14 May 2024 07:15:24 +0000 (07:15 +0000)]
Bug 34597: (follow-up) Update system preference description and order of options

Update the note for the BlockExpiredPatronOpacActions system preference to
make it clearer, and to follow the standard convention for notes.

Order of options for 'Block expired patron OPAC actions' when editing the
patron category changed to alpabetical order, to match the system preference
order.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 34597: Implementation
Pedro Amorim [Thu, 28 Mar 2024 12:52:29 +0000 (12:52 +0000)]
Bug 34597: Implementation

New can_patron_place_ill_in_opac method to include all rules
that need checking to determine if a patron is allowed
to place an ILL request on the OPAC or not.
Added effective_BlockExpiredPatronOpacActions_contains rule to
this new method.

Test plan, k-t-d,:
1) Install FreeForm and enable ILLmodule, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
1.5) Checkout FreeForm's reorganize_ILL branch:
  cd /kohadevbox/koha/Koha/Illbackends/FreeForm
  git checkout reorganize_ILL
  koha-plack --restart kohadev
2) Edit a patron category, visit:
<staff_url>/cgi-bin/koha/admin/categories.pl
3) Set 'Placing an ILL request' for the "Block expired patrons" input config
4) Add a new patron of one of the above category, make sure this patron is expired (set an expirydate to the past).
5) Login as that user and visit ILL page in OPAC:
/cgi-bin/koha/opac-illrequests.pl
6) Confirm there is no "Create a new request" button
7) Access the create a new request page url directly:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=FreeForm
8) Confirm you get a 403 page
9) Set the 'Block expired actions' to "Follow system preference BlockExpiredPatronOpacActions"
10) Test different values of the BlockExpiredPatronOpacActions system preference and confirm the behaviour matches what's configured

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 34597: Add tests
Pedro Amorim [Thu, 28 Mar 2024 11:28:04 +0000 (11:28 +0000)]
Bug 34597: Add tests

prove t/db_dependent/Koha/Illrequest.t
prove t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 34597: Add 'ill_request' to system preference options
Pedro Amorim [Thu, 28 Mar 2024 11:27:32 +0000 (11:27 +0000)]
Bug 34597: Add 'ill_request' to system preference options

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 34597: Add 'ill_request' to patron category admin page
Pedro Amorim [Thu, 28 Mar 2024 11:26:58 +0000 (11:26 +0000)]
Bug 34597: Add 'ill_request' to patron category admin page

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36453: DBRev 24.06.00.002
Martin Renvoize [Tue, 11 Jun 2024 08:50:06 +0000 (09:50 +0100)]
Bug 36453: DBRev 24.06.00.002

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36453: (QA follow-up) Modernise database update
Martin Renvoize [Wed, 5 Jun 2024 15:57:59 +0000 (16:57 +0100)]
Bug 36453: (QA follow-up) Modernise database update

This patch adds the colored output expected for 24.11.x onward database
updates.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36453: (QA follow-up) Update api spec
Pedro Amorim [Wed, 24 Apr 2024 11:25:19 +0000 (11:25 +0000)]
Bug 36453: (QA follow-up) Update api spec

Access {staff_url}/api/v1/patron_categories and notice all is as expected
Update some patron category's blocked expired patron OPAC actions and access the endpoint again, notice it's okay.

Updated API tests to include to_api confirming attributes are rendered correctly:
prove t/db_dependent/api/v1/patron_categories

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36453: (QA follow-up) Cosmetic fixes
Pedro Amorim [Tue, 23 Apr 2024 15:50:19 +0000 (15:50 +0000)]
Bug 36453: (QA follow-up) Cosmetic fixes

This is a squash of several improvements:
- Override weird blue color being applied from MultipleSelect when all options from an optgroup are selected;
- Fix input width depending on selected value. Now it should always be same width regardless;
- Updated the system preference UI wording to reflect new behavior;
- Updated UI labels in the patron category edit page to enforce that the actions being selected are "actions to be blocked"
- Corrected sysprefs.sql entry

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36453: Update tests
Pedro Amorim [Thu, 28 Mar 2024 10:12:12 +0000 (09:12 -0100)]
Bug 36453: Update tests

Address new new version of system pref
Address new version of categories DB table BlockExpiredPatronOpacActions column

Test plan, k-t-d, BEFORE applying patch:
1) Edit some patron categories, visit:
/cgi-bin/koha/admin/categories.pl
2) Set different values for the "Block expired patrons" input config
Set a category to block
Set a category to don't block
Set a category to follow the syspref
3) Take note of the current value of the BlockExpiredPatronOpacActions sys pref

Apply patch, then run the following commands
- koha-plack --restart kohadev
- yarn css:build
- run updatedatabase

4) Visit the patron categories you edited before, make sure they all have the correct values for the new config type
5) Check the BlockExpiredPatronOpacActions sys pref and make sure the new value is correct according to what was before
6) Add a new patron of one of the above categories, test that:
If 'hold' is a blocked action, patron is unable to place a hold in OPAC
If 'renew' is a blocked action, patron is unable to renew in OPAC
If 'follow sys pref' is the option, check that a patron may place a hold or renew an item according to the BlockExpiredPatronOpacActions sys pref value

prove t/db_dependent/Circulation.t
prove t/db_dependent/ILSDI_Services.t
prove t/db_dependent/Koha/Object.t
prove t/db_dependent/Koha/Patron/Categories.t

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36453: BlockExpiredPatronOpacActions system preference
Pedro Amorim [Tue, 26 Mar 2024 17:15:49 +0000 (17:15 +0000)]
Bug 36453: BlockExpiredPatronOpacActions system preference

The sys pref now allows multipleselect values instead of YesNo

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36453: Categories admin page:
Pedro Amorim [Tue, 26 Mar 2024 17:13:51 +0000 (17:13 +0000)]
Bug 36453: Categories admin page:

Account for multiple values param
Input is now multipleselect select
JavaScript
Staff CSS updates to account for multiselect dropdown in categories admin page

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36453: Update old occurrences of effective_BlockExpiredPatronOpacActions
Pedro Amorim [Tue, 26 Mar 2024 17:11:32 +0000 (17:11 +0000)]
Bug 36453: Update old occurrences of effective_BlockExpiredPatronOpacActions

Check for 'renew' when appropriate
Check for 'hold' when appropriate

The following command must return nothing before this is pushed to
master:
git grep "\beffective_BlockExpiredPatronOpacActions\b"

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36453: effective_BlockExpiredPatronOpacActions_contains method
Pedro Amorim [Tue, 26 Mar 2024 17:12:49 +0000 (17:12 +0000)]
Bug 36453: effective_BlockExpiredPatronOpacActions_contains method

effective_BlockExpiredPatronOpacActions
is now
effective_BlockExpiredPatronOpacActions_contains

This method has been updated to now consider an action param.
Returns true if the given action is to be blocked to expired
patrons or not.

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36453: [DO NOT PUSH] DBIC schema files
Pedro Amorim [Tue, 26 Mar 2024 17:13:26 +0000 (17:13 +0000)]
Bug 36453: [DO NOT PUSH] DBIC schema files

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36453: DB and data changes
Pedro Amorim [Tue, 26 Mar 2024 17:14:05 +0000 (17:14 +0000)]
Bug 36453: DB and data changes

- kohastructure.sql updates
- atomicupdate file
- Mandatory data installer updates

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 34718: Input field in fund list (Select2) on receive is inactive
Lari Strand [Mon, 3 Jun 2024 11:34:10 +0000 (14:34 +0300)]
Bug 34718: Input field in fund list (Select2) on receive is inactive

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36983: Fix incorrect required class
Matt Blenkinsop [Wed, 29 May 2024 11:06:31 +0000 (11:06 +0000)]
Bug 36983: Fix incorrect required class

This patch fixes an error on the B_address2 field which sets it to be
required incorrectly

Test plan:
1) In PatronSelfRegistrationBorrowerMandatoryField, set B_address to be
   required.
2) In the OPAC, navigate to the self registration form.
3) In the Alternate address section, fill in the Address field that you
   have just set to be required. Ensure that you leave the Address 2
   field blank.
4) Fill in all other required fields and submit the form, it should show
   you that the Address 2 field is required, even though it shouldn't be
5) Apply patch
6) Refresh the page and repeat steps 1-5, it should allow youto submit
   the form

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36894: Display journal article ILL request author
Matt Blenkinsop [Fri, 17 May 2024 10:25:52 +0000 (10:25 +0000)]
Bug 36894: Display journal article ILL request author

This patch fixes the ILL request table to display authors for journal article request types

Test plan:
1) Create an ILL request with the type of Journal Article and add an author in the Article author field
2) Click on the List requests button to see the table
3) The Author field should be blank for the request you created
4) Apply patch
5) Hard refresh the browser to reload the javascript
6) The author field should now be visible

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36948: (follow-up) Add chomp to sip log4perl config
Marcel de Rooy [Fri, 24 May 2024 08:35:25 +0000 (08:35 +0000)]
Bug 36948: (follow-up) Add chomp to sip log4perl config

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36948: (follow-up) Allow IPv[46] in port config
Marcel de Rooy [Fri, 24 May 2024 07:55:27 +0000 (07:55 +0000)]
Bug 36948: (follow-up) Allow IPv[46] in port config

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36948: (follow-up) Remove log_file param, adjust caller_depth
Marcel de Rooy [Fri, 24 May 2024 07:55:27 +0000 (07:55 +0000)]
Bug 36948: (follow-up) Remove log_file param, adjust caller_depth

We keep OPEN when people still use log_file or setsid.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36948: Resolve SIP issues in D12
Nick Clemens [Thu, 23 May 2024 13:56:51 +0000 (13:56 +0000)]
Bug 36948: Resolve SIP issues in D12

My Koha testing docker SIP started dying repeatedly after launch. After investigation, I
found it was a problem with logging and default ports.

In D12 there is no syslog anymore, everythign uses journal. Four our purposes, lets log SIP issues
to sip.log by default

Attaching a patch to clear things up.

To test:
1 - Open KTD/D12
2 - tail -f /var/log/koha/kohadev/*.log
3 - On another terminal 'restart_all'
4 - Wait a bit, notice SIP dying
5 - Apply patch
6 - Update SIPconfig:
    server-params:
    log_file='/var/log/koha/kohadev/sip.log'
    service with port 8023:
    port="127.0.0.1:8023/tcp"
7 - Restart all
8 - Confirm SIP no longer dies

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 37000: (follow-up) Add foreign key last
Emily Lamancusa [Fri, 7 Jun 2024 20:24:26 +0000 (16:24 -0400)]
Bug 37000: (follow-up) Add foreign key last

Certain configurations of MySQL will not allow a column to be changed
from nullable to non-nullable if the column has a foreign key constraint.
Add the foreign key constraint last to avoid issues from this.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 37000: (Bug 36120 follow-up) Improve reliability of database update
Martin Renvoize [Tue, 4 Jun 2024 10:58:54 +0000 (11:58 +0100)]
Bug 37000: (Bug 36120 follow-up) Improve reliability of database update

This patch adds a series of fallthroughs to ensure pickup_library_id is
always set prior to adding the NOT NULL constraint.

We initially only looked at items.homebranch but as that's a nullable
field itself, we now look at items.holdingbranch before finally
defaulting to the first available branch in the branches table in the
worst case.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 37026: Fix JS error on sco-main.tt
Lucas Gass [Tue, 4 Jun 2024 14:29:40 +0000 (14:29 +0000)]
Bug 37026: Fix JS error on sco-main.tt

To test:
1. Have a patron with some checkouts, holds, and charges that can login into the SCO module.
2. To go  sco-main.pl and login
3. Try changing tabs and notice the console error:

 dataTables is not defined

 4. APPLY PATCH
 5. Try again, there should be no error.
 6. Make sure you can switch the tabs without any issues.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 33407: Unit tests
Janusz Kaczmarek [Wed, 10 Apr 2024 19:38:29 +0000 (19:38 +0000)]
Bug 33407: Unit tests

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 33407: With ES and QueryAutoTruncate on, a search containing ISBD punctuation...
Janusz Kaczmarek [Tue, 4 Apr 2023 14:42:02 +0000 (16:42 +0200)]
Bug 33407: With ES and QueryAutoTruncate on, a search containing ISBD punctuation returns no results

With ES and QueryAutoTruncate on, a search with punctuation surrounded
by spaces (like ISBD punctuation copied from other catalogue or
bibliography) returns no results.  E.g.: in a search for "Maria Stuart ;
Die Jungfrau von Orleans / Schiller" (coded in record as 245 10 $a Maria
Stuart ; $b Die Jungfrau von Orleans / $c Schiller) -- both semicolon
and slash cause problems.  One had to remove them manually to get
results which is not what is desired.

Test plan
=========
1. Use ktd with Elasticsearch and ktd's test data
   (http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=1):
2. Make a search for the first ISBD zone taken verbatim from the first record:
   E Street shuffle : the glory days of Bruce Springsteen & the E Street Band / Clinton Heylin

   There should be no result.
3. Apply teh patch, restart plack.
4. Repeat the search. You should get the record (and onother one).

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36672: Circulation rules are performing too many lookups
Kyle M Hall [Fri, 26 Apr 2024 17:41:06 +0000 (17:41 +0000)]
Bug 36672: Circulation rules are performing too many lookups

Looking at the template, for every section after the main rules block we loop over categories or itemtypes, and lookup the value for each rule name.

In systems with large numbers of categories and item types this becomes very slow.

In the rules section, we have already built a hash of rules by category and itemtype - we should continue to use this throughout the page.

Test Plan:
1) Apply this patch
2) For each rule section, create and delete a rule
3) No change in behavior should be noted!

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36679: Prevent SCO login for the AnonymousPatron
Lucas Gass [Wed, 24 Apr 2024 20:00:53 +0000 (20:00 +0000)]
Bug 36679: Prevent SCO login for the AnonymousPatron

1. Make sure AutoSelfCheckAllowed is Allowed and AutoSelfCheckID and AutoSelfCheckPass are in use.
2. Make sure AnonymousPatron is pointed to an account.
3. Set SelfCheckoutByLogin to cardnumber.
4. Verify that if you go to the anonymous patron account in the staff interface, you cannot checkout items.
5. Go to the selfcheck path of the library.  It should auto login.  Put in the cardnumber for the anonymous user.
6. Proceed to check out items!
7. APPLY PATCH, restart_all
8. Try step 5 again, you should not be able to log in as the AnonymousPatron. Instead you should be redirected to OPAC home page
9. Switch SelfCheckoutByLogin to 'username and pasword'.
10. Again try to log in as the AnonymousPatron, you should not be able to.
11. Make sure you can login as a regular patron when SelfCheckoutByLogin is set to 'cardnumber' and when it is set to 'username and pasword'.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
4 months agoBug 36938: Adjusts tests to remove warns
Nick Clemens [Thu, 30 May 2024 15:19:55 +0000 (15:19 +0000)]
Bug 36938: Adjusts tests to remove warns

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>