Commit Graph

58109 Commits

Author SHA1 Message Date
Owen Leonard 46cc8f8ce7
Bug 39434: (follow-up) Fix a few more instance
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 10dd01174a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-24 11:30:04 +02:00
nina martinez 19a18be315
Bug 39434: Change the div tags that represent the header and main regions to semantic tags.
This patch updates the OPAC page structures to add <main> and <header>
tags to them.

Test plan :

1- On the opac of koha, check if the pages contain the basic semantic
   elements (header, nav, main, and footer )
2- If they do, the test succeeds.

Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 28bbadcd49)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-24 11:30:04 +02:00
Owen Leonard 74a4b44d25
Bug 39925: Table columns missing headings for bibliographic search history in OPAC
This patch updates the OPAC search history page to make table headings
consistent with each other.

To test, apply the patch and log in to the OPAC, ideally as a user who
has performed catalog searches on previous occasions.

- On the patron's search history page, each table should have the same
  heading configuration: An unsorted first column with an information
  icon at the top. The icon should display a tooltip on mouse-over.
- Check the Catalog current session, catalog previous sessions,
  Authority current session, and authority previous sessions.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a35af961f8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-24 11:29:59 +02:00
Laura_Escamilla 7ed45d8d15
Bug 33440: Tests
Test Plan
1. Staff member A creates a public list.
2. Staff member A transfers this public list to another staff member (staff member b) without list permissions.
3. Staff Member B now has the ability to edit this public list and add/remove items from this list.
4. Apply the patch
5. Repeat steps 1 and 2. An error message should now appear stating that the “Transfer not allowed: You or the selected user do not have the required permissions.”
6. Provide the correct permissions to Staff Member B. Initiate the transfer again. The transfer should be successful.
7. Test these steps in the OPAC as well.
8. Prove t/db_dependent/Virtualshelves.t
9. Sign off and have a wonderful day! :D

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 45c7020220)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:50 +02:00
Laura_Escamilla 831a8bf9b8
Bug 33440: Updated wording for unauthorized_transfer OPAC message
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7a98edf427)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:49 +02:00
Laura_Escamilla 82041841e5
Bug 33440: Updated wording for unauthorized_transfer error message
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e7b790e3a6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:49 +02:00
Laura_Escamilla acae50f177
Bug 33440: Added permission requirements to unauthorized_transfer
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0edf689870)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:49 +02:00
Marcel de Rooy 4efb86aec8
Bug 40119: (QA follow-up) Small additional comment
The reference to this bug report may be helpful to understand
later why we did so.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 01526ef545)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:48 +02:00
Janusz Kaczmarek 8119ed0405
Bug 40119: Unit tests
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5eeb04be97)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:48 +02:00
Janusz Kaczmarek ba31b8cc35
Bug 40119: Merge should not leave empty 6XX subfield $2 (MARC 21)
Currently, when removing 040 $f from authority record with 008/11 =
'z' (MARC 21), merge function removes the content of $2 subfield in
linked 6XX fields, leaving the 6XX $2 subfield empty.  This is not
correct.  We should not have empty subfields in a MARC record.

Instead, the old content of the $2 subfield should be retained (if
auth 008/11 is still = 'z').

Test plan:
==========
1. Have an authority record with 008/11 = 'z' and 040 $f = 'whatever'.
2. Link the record to a bibliographic 6XX.
3. Edit the authority record, removing 040 $f.
4. Go to bibliographic record and in modal "MARC preview" from Normal
   view notice that 6XX $2 exists but is empty. This is wrong.
5. Apply the patch ; restart all.
6. Repeat p. 1.-4. Note that the content of 6XX $2 has not been
   removed.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bd43ebdc5e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:47 +02:00
Tomas Cohen Arazi 036d940d54
Bug 39911: Remove redundant warn
Following the original test plan you notice, `THIS IS A TEST` is printed
twice:

* In the logs.
* In STDERR for the SIP server.

The latter is redundant, and also problematic for
`xt/author/pod_coverage.t` which fails the `no warnings` tests because
of that.

To test:
1. Run:
   $ ktd --shell
  k$ prove xt/author/pod_coverage.t
=> FAIL: Scary errors, lots of them
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Follow the original bug test plan
=> SUCCESS: There's `THIS IS A TEST` in the logs, which was the author's
goal in the first place.
5. Sign off :-D
6. Visit bug 40144 :-P

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9a4fd4facb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:47 +02:00
Kyle M Hall 90aca69657
Bug 39911: Add POD
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 702d1d2792)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:46 +02:00
Jonathan Druart 970afe8950
Bug 38899: Fix cypress tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b0ee8a675c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:46 +02:00
Matt Blenkinsop 93bc71c36c
Bug 38899: Restore id attribute to the form
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 87a522e463)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:45 +02:00
Jonathan Druart f6cbcc7678
Bug 38899: Remove code duplication
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b44c08eb4f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:45 +02:00
Matt Blenkinsop c20792513d
Bug 38899: Improve HTML consistency
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 56eb4a6850)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:45 +02:00
Jonathan Druart 53fdcd4e2c
Bug 38899: Move the toolbar out of the form
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f24e0d52e2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:44 +02:00
Matt Blenkinsop cf18d97ca5
Bug 38899: (QA follow-up) Match buttons to patron toolbar
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4fc93fee00)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:44 +02:00
Matt Blenkinsop fe6182ed90
Bug 38899: Add a cypress test
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 57bd44ae0f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:43 +02:00
Matt Blenkinsop 4fe86bf009
Bug 38899: Add a sticky toolbar
This patch adds a sticky toolbar to the vendors form

Test plan:
N.B: This patchset will not work on a sandbox

1) Navigate to Acquisitions and click New vendor
2) The toolbar should appear at the top of the page underneath Add vendor
3) Scroll down, the toolbar should stick and be given the 'floating' class
4) Scroll back up and the toolbar should unstick and lose the 'floating' class

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 716980ce2f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:43 +02:00
Laura_Escamilla a21d6166c9
Bug 40080: QA Follow-up - Code tidy-up based on QA tool feedback
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9cdf597a83)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:42 +02:00
Martin Renvoize d0dc3ffd71
Bug 40080: Fix search position on course reserves page
This patch corrects the position of the table search box on the course
reserves details pages by warpping the presented table in a 'rows' class
div.

We also update the search box dom configuration in the datatable itself
to match that of other opac tables.

Test plan
1) Add some course reserves to a course
2) View that course on the OPAC
3) Note that the search box for the table is aligned to the top of the
   main section of the page and over to the far right almost off screen.
4) Apply this patch
5) Confirm that the display of the search box is now nested just above
   the table in the same location as the course reserves list page

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 32242f438a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:42 +02:00
Kyle M Hall 7c06904612
Bug 39911: Trap DIE signals in SIP server
At some point our SIP server stopped logging fatal errors to either logs or standard error. We should restore this vital functionality.

Test Plan:
1) Apply the first patch which will cause the patron information request
   to fail
2) Stop the SIP server
3) Start it again with: perl /kohadevbox/koha/C4/SIP/SIPServer.pm /etc/koha/sites/kohadev/SIPconfig.xml
4) Trigger the failure with the following command:
   ./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su koha -sp koha -l MPL --patron koha -m patron_information
5) Note "THIS IS A TEST" is not found in logs or stderr
6) Apply the second patch
7) Repeat steps 2-4
8) Note the error message is now visible from stderr at the command line
   and also in the SIP log

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f214db14dd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:42 +02:00
David Cook ce008cf965
Bug 40087: Fix t/Scrubber.t unit test
Remove "tag" and "staff" and add the missing "note"

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1d10d8b8c9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:41 +02:00
David Cook f72d9f2962
Bug 40087: Remove "tag" and "staff" scrubber profiles
This patch removes unused "tag" and "staff" scrubber profiles.

Test plan:
0. Apply the patch
1. prove t/Koha/Plugins/HtmlScrubber.t
2. prove t/Scrubber.t
3. Grep around the code for C4::Scrubber and make sure "tag"
and "staff" aren't used as arguments for C4::Scrubber

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e846abeeb7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:41 +02:00
Pedro Amorim 18daee91ff
Bug 39875: (QA follow-up): Correct historycheck ui_context
This ui_context is supposed to be opac, not staff.
For the purposes of these tests, this is not important, as the ui_context is
only needed for the template params and this is testing if the history check
stage is supposed to show or not.
Reckon this was a copy paste without consequences hence missed, but the code
is now semantically more correct.

prove t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dfd028871a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:40 +02:00
Pedro Amorim ed3f66e0b8
Bug 39875: Dont show history check
Unless there is a cardnumber or an authenticated user

Test plan:
1) Apply only the the tests file highlighting the issue:
prove t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t
2) Notice it fails.
3) Apply this patch.
4) Run tests again. Notice it passes.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6a0fcefa22)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:40 +02:00
Pedro Amorim 8cf43dc2f9
Bug 39875: Add tests
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ae2e9e23de)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:40 +02:00
Owen Leonard 1210d6aafa
Bug 39919: Overdues with fines report has incorrect title, breadcrumbs, etc.
This patch corrects the "Overdues with fines" page so that the page
title, breadcrumbs, and main heading match the name used in navigation
menus.

To test, apply the patch and go to Circulation -> Overdues with fines.
Confirm that the page title, breadcrumb menu, and page heading are
correct: "Overdues with fines at [library]"

Sponsored-by: Athens County Public Libraries
Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 28cf1da6ea)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:39 +02:00
Tomas Cohen Arazi 79f69e7e4c
Bug 39961: (follow-up) Make `koha-disable` stop all queues
This patch applies the same logic to `koha-disable`.

Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d2ffae92a7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:39 +02:00
Tomas Cohen Arazi 5a6ad66117
Bug 39961: Make `koha-create` start all queues
Taking advantage of the `get_worker_queues` function introduced in bug
31124, this patch makes `koha-create` start all defined queues.

To test:
1. Run:
   $ ktd --shell
  k$ sudo -s
  k$ koha-create --create-db test
=> FAIL: No mention of `long_tasks`
2. Apply 31124 and then this patch
3. Run:
  k$ cp debian/scripts/koha-functions.sh \
        /usr/share/koha/bin/koha-functions.sh
  k$ debian/scripts/koha-create --create-db test1
=> SUCCESS: `long_tasks` worker is started
4. Sign off :-D

Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 45089704fa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:38 +02:00
Tomas Cohen Arazi 86fd02bd1a
Bug 31124: Make koha-remove stop all workers
This patch makes two things:

* Adds a `get_worker_queues` function to koha-functions.sh
* Makes `koha-remove` loop through all the defined queues to stop all
  the running workers before trying to remove the unix user for the
  instance.

To test:
1. Run:
   $ ktd --shell
  k$ sudo -s
  k$ koha-create --create-db test1
  k$ service koha-common restart
  k$ koha-remove test1
=> FAIL: There's an error about not being able to drop the instance user
2. Run:
  k$ ps -ef | grep test1
=> FAIL: There's a running process for the 'long_tasks' queue worker.
3. Apply this patch
4. Run:
  k$ cp debian/scripts/koha-functions.sh \
        /usr/share/koha/bin/koha-functions.sh
5. Repeat 1 naming the instance `test2`
=> SUCCESS: The instance is removed correctly. No error about running
processes
=> SUCCESS: No process is running for `test2`
6. Sign off :-D

Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 576c496442)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:38 +02:00
Andreas Jonsson c3a9ef0989
Bug 38974: Fix error in OPAC patron update
Test plan:

1) Make sure Patron category is checked in the system preference PatronSelfModificationBorrowerUnwantedField
2) Log in to the opac
3) Go to "Personal details"
4) Select any value for "Date of birth"
5) Click save
6) This must not yield error 500. (But may be a successful save or a validation error).

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 04ebdd4ac1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:37 +02:00
Jonathan Druart 65b15bcc19
Bug 40003: Add a test
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c4f7b14906)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:37 +02:00
Jonathan Druart fd6552957e
Bug 40003: Remove warning from log when creating a new bib record
Test plan:
Hit cataloguing/addbiblio.pl?frameworkcode=FA

Without this patch you get warnings in the Koha log file:
Use of uninitialized value in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 572.
Use of uninitialized value in substitution (s///) at /kohadevbox/koha/Koha/UI/Form/Builder/Biblio.pm line 55.

with this patch applied: no warning

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0ba11f98f9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:37 +02:00
Jonathan Druart 21ffc157f8
Bug 40021: Remove warnings from Koha/Plugins/Recall_hooks.t
Test plan:
  prove t/db_dependent/Koha/Plugins/Recall_hooks.t
should return green

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit db655799ad)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:36 +02:00
Jonathan Druart 2af2c4f6f9
Bug 40018: Remove warnings from Koha/Template/Plugin/Koha.t
Because we still use CGI::Session (bug 17427), we need to mock
CGI::Session to remove those 2 warnings
rollback ineffective with AutoCommit enabled

Test plan:
Run the tests after this patch, it should be green

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eaaabf66dd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:36 +02:00
Lucas Gass c5ff343c2c
Bug 40036: Add reason back to status column and add classes/data attributes
To test:
0. APPLY PATCH
1. Make a few AVs for SUGGEST ( reason ) and SUGGEST_STATUS ( status ).
2. Make some new suggestions and give them new statues w/ a reason.
3. The reason should display, in parentheses, in the status column.
4. There should be a status class and a reason class for each.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 35baa3ec46)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:35 +02:00
Jonathan Druart ca2ff9b46b
Bug 40019: Remove warnings from Koha/Auth/Client.t
Test plan:
  prove t/db_dependent/Koha/Auth/Client.t
should return green

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c695e6ce4c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:35 +02:00
Jonathan Druart ef3ee7d69c
Bug 40020: Remove warnings from Koha/AdditionalContents.t
Test plan:
  prove t/db_dependent/Koha/AdditionalContents.t
should return green

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 827ad21244)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:35 +02:00
Tomas Cohen Arazi 3284f58e95
Bug 40034: Only check notforloan on itemtype if it exists
This patch makes the code in `CheckReserves` survive the non-existence
of the referenced item type in the `items` table for the passed item.

To test:
1. Apply the regression tests
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Reserves.t
=> FAIL: Tests explode like this:

```
Can't call method "notforloan" on an undefined value at /kohadevbox/koha/C4/Reserves.pm line 870.
```

3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 854783c836)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:34 +02:00
Tomas Cohen Arazi 7cc3b371fe
Bug 40034: Regression tests
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6c26ce01d3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:34 +02:00
Fridolin Somers eb9da8a8d6
Bug 40042: Add default value 0 for index var in search_indexes.inc
In koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc some calls do not set 'index' var generating idx="idx_".
Set 0 has default value.

Test plan :
1) Enable system preference 'IntranetCatalogSearchPulldown'
2) Go to catalogue advanced search
3) Look HTML source and check you see:
     <select class="advsearch" name="idx" id="idx_0">
     <select class="advsearch" name="idx" id="idx_1">
     <select class="advsearch" name="idx" id="idx_2">
4) In page page toolbar, click 'Search catalog'
5) Click on 'More options' icon
6) Look HTML source of this part and check you see:
      <select class="advsearch" name="idx" id="idx_0">
Without patch you see:
      <select class="advsearch" name="idx" id="idx_">

Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0d39336f71)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:33 +02:00
Owen Leonard d99a9e28b6
Bug 40061: (follow-up) Delete last image using checkbox
This followup corrects a problem in image deletion which isn't really
the same issue (it's not CSRF related) but is another problem with
deletion. The JS for grabbing all the checkboxes by name wasn't working
when there is only one checkbox.

To test, apply the patch and delete all but one image from the patron
card creator image manager.

- Check the checkbox for the last image and click the "Delete selected"
  button.
- The image should be deleted successfully.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 727b9d2dde)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:33 +02:00
Owen Leonard 4862281a98
Bug 40061: Add CSRF protection to patron image deletion
The patron image deletion operation was not fully updated in Bug 34478.
The individual "Delete" buttons in the table of images need to be
updated to use form-submit.js

Unrelated: I removed an invalid "align" attribute from a <td>.

To test, apply the patch and go to Tools -> Patron card creator -> Image
manager.

- Upload multiple images
- Test the individual "Delete" buttons in the table of images.
  - Test that both the "OK" and "Cancel" operations work correctly.
- Test the process of checking one or more checkboxes and clicking the
  "Delete selected" button.
   - Test that both the "OK" and "Cancel" operations work correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f3bfcfa66)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:33 +02:00
Pedro Amorim 5eb5d33f2f
Bug 40057: Fix db revision
Test plan (ktd):
1) reset_all
2) Run first part of the 241200017.pl atomicupdate manually
	koha-mysql kohadev
	ALTER TABLE illrequests DROP FOREIGN KEY illrequests_bnfk;
3) Create an ILL request linked to a borrower that doesn't exist (simulate old data):
	INSERT INTO illrequests (`backend`, `borrowernumber`,`branchcode` ) VALUES ('Standard', '99999', 'CPL');
4) Run the 2nd part of the atomicupdate manually:
   ALTER TABLE illrequests ADD CONSTRAINT illrequests_bnfk FOREIGN KEY(`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE;
5) Notice you get the error:
	ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (., CONSTRAINT  FOREIGN KEY () REFERENCES  () ON DELETE SET NULL ON UPDATE CASCADE)
6) Run the added query in the patch:
	UPDATE illrequests SET borrowernumber = NULL WHERE borrowernumber NOT IN (SELECT borrowernumber FROM borrowers);
7) Repeat step 4)
8) Notice there's no errors

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 94d5c37db8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:32 +02:00
Jonathan Druart 893bd2af71
Bug 40067: Improve waits and intercepts
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 688b5961c9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:32 +02:00
Matt Blenkinsop e692023eb0
Bug 40067: Add a cypress test
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 79567178ec)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:31 +02:00
Jonathan Druart 67319ff0b8
Bug 40067: Simplify code
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7715e3ae4e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:31 +02:00
Matt Blenkinsop 2db7eb95c3
Bug 40067: Prevent receive shipments opening in a new tab
Test plan:
1) Navigate to a vendor record
2) Click the Receive shipments button
3) It will open in a new tab
4) Apply patch - yarn js:build
5) Hard refresh the browser
6) Repeat steps 1 - 2
7) The page will open in the same tab

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 052cc1b6ef)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:30 +02:00