Commit Graph

55026 Commits

Author SHA1 Message Date
David Cook 2f5428cb35
Bug 39906: Add a simple quick Apache-level bot challenge
This patch adds a fast simple bot challenge via Apache.

To test:
0. Apply the patch
1. sudo cp debian/templates/apache-shared-opac-antibot.conf /etc/koha/.
2. sudo cp debian/templates/apache-shared-opac-plack.conf /etc/koha/.
3. curl http://localhost:8080/cgi-bin/koha/opac-search.pl
4. Note an instant response with a very simple HTML response
5. Open an incognito browser and go to http://localhost:8080/cgi-bin/koha/opac-search.pl
6. Note a very brief loading animation before the OPAC search page appearing
7. Do a search
8. Note no more loading animation appears
9. Close the incognito browser
10. Open an incognito browser and go to http://localhost:8080/cgi-bin/koha/opac-main.pl
11. Do a search via the "Library catalog" search bar
12. Note no loading animation appears

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Cornelius Hertfelder <cornelius.hertfelder@bsz-bw.de>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
We have tested this in production on at least three live sites for
several weeks, and it has worked as expected. We have not noticed any
negative side effects.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-08-28 12:02:39 -04:00
Martin Renvoize d077dcb01b
Bug 40022: [24.05.x] Add the 25.11 release team
This patch updates the teams.yaml to include the voted in 25.11
release team.

Test plan
1/ Check against https://wiki.koha-community.org/wiki/Release_Teams

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-08-12 12:38:30 -04:00
Jesse Maseto 111f2d2031
Update release notes for 24.05.12 release
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-07-24 10:05:06 -04:00
Jesse Maseto 44237acacc
Increment version for 24.05.12 release
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-07-24 10:05:06 -04:00
Lucas Gass c8ac0e8255
Bug 39331: If patron category cant be guarantee do not continue with add_guarantors
To test:
1 - Remove age limits from a Child and Adult category in Administration->Patron categories. Ensure Child category can be guarantor and Adult cannot
2 - The above step is to avoid any age checks and form resubmission which removes the guarantor fields
3 - Find/create a child patron
4 - Add a guarantee from the Adult category to the child
5 - Check the DB:
   SELECT * FROM borrower_relationships WHERE guarantee_id={borrowernumber of child};
6 - Note the id colum
7 - Edit the child patron to Adult category
8 - Repeat 5
9 - Note the relationship still exists and the id is incremented
10 - Oof!
11 - APPLY PATCH, restart_all
12 - Try again steps 3 - 8
13 - The relationship should not be re-added
14 - Try with more than 1 guarantor on the record, confirming all are deleted
15 - Try adding some guarantor to patron types that should be able to, they relationship should work.
16 - Try changing some patrons to categories that do allow guarantors, making sure the relationship does stay.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-07-24 09:17:04 -04:00
Owen Leonard 9da8740955
Bug 38184: [24.05] (follow-up) Correct the number of tests
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-07-24 09:17:03 -04:00
Aleisha Amohia 2f8637325c
Bug 38184: [24.05] Show due date on OpacTrustedCheckout modal
This fixes checkout fields being made available to the public API.

Note: This depends on the fix at Bug 39313, so make sure you apply that
first.

To test:

1. Enabled OpacTrustedCheckout system preference
2. Search for an item and get the barcode
3. Go to the OPAC
4. Click the Self-checkout button at the top
5. Enter the barcode and submit
6. Notice that the due date does not show in the modal, even though the
   due date was correctly set

7. Apply the patch and restart services

8. Go to the staff interface and check in your barcode
9. Repeat steps 3-5
10. Confirm the due date does show correctly in the modal

11. Confirm tests pass t/db_dependent/Koha/Checkout.t

Sponsored-by: Reserve Bank of New Zealand
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-07-24 09:17:03 -04:00
David Cook 92ed47e182
Bug 39295: Prevent infinite loop on line wrapping
This change checks that the string width is larger than 0 before
attempting to perform line wrapping on the line.

Test plan:
0. Apply the patch and koha-plack --restart kohadev
1. Follow instructions at end of this message[1]
2. Note that the infinite loop does not happen and that a blank
card is created
3. Export the batch using the test layout and template that come
with koha-testing-docker
4. Note that the patron card is correctly created

[1]
To reproduce:

0. Change Koha test user's firstnameto "Firstname" and surname to "Lastname"

1. Create a template:
Units: PostScript Points
Page height: 60pt
Page width: 60pt
Card height: 60pt
Card with: 60pt

Top page margin: 10pt
Left page margin: 10pt
Number of columns: 1
Number of rows: 1
Gap between columns: 10pt
Gap between rows: 10pt

2. Create a layout:
Units: US inches

Field 1:
Text: Library Name
Font: Times-Roman
Font size: 12 pt
Text alignment: Left
Lower left X coordinate: 100in
Lower left Y coordinate: 100in

Field 2:
Text: <firstname> <surname>
Font: Times-Roman
Font size: 10pt
Text alignment: Left
Lower left X coordinate: 5in
Lower left Y coordinate: 5in

3. Create a batch for borrowernumber 51 (if using "koha" test user in ktd)

4. Export using the above template and layout

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-07-23 16:15:50 -04:00
Jonathan Druart 80edfd9607
Bug 39305: Adjust wording
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-07-23 16:15:50 -04:00
Jonathan Druart b264623e48
Bug 39305: Display a warning on the about page if Plack is not running
CSRF protection is only working if Koha is running under Plack.

The about page is not showing any errors if plack is not running.

Test plan:
0. Do not apply this patch
1. Go to the about page
=> Notice the "PSGI" entry in the "Server information" tab
2. Disable plack
koha-plack --disable kohadev && restart_all
3. Go to the about page
=> Notice that the "PSGI" entry is not displayed, and nothing indicates
that plack is not running
4. Apply this patch
=> "PSGI" now shows "Koha is running in CGI mode. This is a security issue! Use koha-plack --help"

Better wording idea welcome.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-07-23 16:15:49 -04:00
Tadeusz „tadzik” Sośnierz c7cf695279
Bug 39772: Extend background_tasks API to allow for human-readable job names
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-07-23 15:17:20 -04:00
Tadeusz „tadzik” Sośnierz a368406305
Bug 39772: Display package names for plugin jobs rather than "unknown" messages
This slightly improves the current situation, where on background_jobs.pl
each plugin job would be displayed as "Unknown job type 'plugin_...'".
After this patch, we display the implementing package name
(sourced from plugins' background_tasks()), which is slightly more
human-friendly and significantly less error-looking.

Test plan:

1. In KTD, install a plugin implementing background jobs (e.g. the KitchenSink)
2. On http://localhost:8081/cgi-bin/koha/plugins/plugins-home.pl,
   enable the plugin and run a tool/report from it
3. Observe ugly job types column on http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl
4. Apply the patch
5. Observe the improved job types on http://localhost:8081/cgi-bin/koha/admin/background_jobs.pl

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-07-23 15:17:19 -04:00
Owen Leonard 1192a706cb
Bug 38127: Missing column headings in 'Add user' pop-up modal
This patch modifies the template for adding to a basket from a new
(empty) record in order to make the "Add user" patron search results
correct. The patron search results table headers must be defined in the
template before they are used.

To test, apply the patch and go to Acquisitions.

- Search for a vendor.
- Add or create a basket for that vendor.
- Click "Add to basket" and select "From a new (empty) record."
- In the "New order" form, under the "Patrons" heading, click "Add user"
- Search for patrons to add.
- In the patron search results, each column should have a heading: Card,
  Name, Category, Library.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

	modified:   koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt
2025-07-07 13:14:39 -04:00
Nick Clemens 25dfb06f9b
Bug 39987: Correct breadcrumbs link to batch item deletion
This patch adds th del=1 param to the batchMod link in the breadcrumbs to ensure we return to batch item
deletion and not modification

To test:
1 - Browse to Cataloging->Batch item deletion
2 - Click the 'Batch item deletion' link in the breadcrumbs
3 - You are now at 'Batch item modification'
4 - Apply patch
5 - Repeat, you stay on the correct page
6 - Complete a batch item deletion and confirm the breadcrum is correct at each stage.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

	modified:   koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt
2025-07-07 13:13:46 -04:00
Martin Renvoize 2e115a41b1
Bug 39887: Improve documentation for overdue_notices.pl
This patch corrects a few spelling mistakes and missing grammer and adds
a little more detail to the '--date', '--email' and '--frombranch'
options.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

	modified:   misc/cronjobs/overdue_notices.pl
2025-07-07 13:12:51 -04:00
Jesse Maseto d8893bca20
Update release notes for 24.05.11 release
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

	new file:   misc/release_notes/release_notes_24_05_11-1.html
	new file:   misc/release_notes/release_notes_24_05_11.md

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-06-24 13:18:41 -04:00
Jesse Maseto 32c7f4d10d
Increment version for 24.05.11 release
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

	modified:   Koha.pm
	new file:   installer/data/mysql/db_revs/240511000.pl

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-06-24 13:18:40 -04:00
Tomas Cohen Arazi 7fbfc207ae Bug 38101: Make ES indexer split big fields into chunks
This patch makes the `_process_mappings()` method split the index values
in the event of them being bigger than the allowed 32766 bytes size.

To test:
1. Have KTD running with ES:
   $ ktd --proxy --es7 up -d
2. Perform a search
3. Pick the first result for edition
4. Find a cool Wiki page with lots of paragraphs
5. Copy all of the paragraphs and put them on a 500$a field for the record.
6. Repeat 2
=> FAIL: The record is not found
7. Reindex manually:
   $ ktd --shell
  k$ perl misc/search_tools/rebuild_elasticsearch.pl --biblios --where "biblionumber=3"  -v -v
=> FAIL: You get something like:
```
[22229] Committing final records...
One or more ElasticSearch errors occurred when indexing documents at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/Indexer.pm line 148.
[22229] There were errors during indexing
Record #3 Document contains at least one immense term in field="note.raw" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped.  Please correct the analyzer to not produce such terms.  The prefix of the first immense term is: '[10, 109, 117, 115, 116, 97, 102, 97, 32, 102, 117, 101, 32, 101, 108, 32, 115, 101, 103, 117, 110, 100, 111, 32, 104, 105, 106, 111, 32, 100]...', original message: bytes can be at most 32766 in length; got 32771 (illegal_argument_exception) : max_bytes_length_exceeded_exception (bytes can be at most 32766 in length; got 32771)
[22229] Total 1 records indexed
```
8. Apply this patch
9. Repeat 7
=> SUCCESS: No error!
10. Repeat 2
=> SUCCESS: The record is indexed and can be found!
11. Sign off :-D

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-06-17 19:01:17 +00:00
Tomas Cohen Arazi 0c92fee632 Bug 38101: Regression tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Cook <dcook@prosentient.com.au>
2025-06-17 18:57:20 +00:00
Tomas Cohen Arazi a984f17434 Bug 37809: (follow-up) Allow embedding item.biblio too
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-06-13 15:30:07 +00:00
Tomas Cohen Arazi 3b2e93bf1c Bug 37809: (follow-up) Remove wrong embed
It seems to me like a copy and paste error coming from the holds
endpoint.

To test:
1. Use a REST API tool like Postman to ask for some patron's checkouts
2. Add x-koha-emebed: cancellation_requested
=> FAIL: It explodes, cannot embed it
3. Apply this patch
4. Repeat 2
=> SUCCESS: cancellation_requested no longer a valid option
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2025-06-13 15:26:00 +00:00
Tomas Cohen Arazi aa886d0f8d Bug 37809: Add more embed options to checkouts endpoints
This patch adds more embed options to checkouts endpoints.
To test you really need to try them on a REST tool.

* patron
* item
* library

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2025-06-13 15:26:00 +00:00
Nick Clemens 74e3696921 Bug 36736: Load plugins at the start of background job processing
This patch adds a call to get_enabled_plugins before processing background jobs to ensure
that all plugin hooks are loaded and cached

To test:
1 - Install a plugin that adds new objects e.g. the Contracts plugin
    https://github.com/bywatersolutions/fs-koha-plugin-contracts
    or the Koha Advent plugin:
    https://gitlab.com/koha-community/koha-advent/koha-plugin-fancyplugin
2 - Restart all
3 - Tail all your logs
4 - Stage and import a file containing items
5 - Note in the logs
    DBI Exception: DBD::mysql::st execute failed: Lock wait timeout exceeded; try restarting transaction
6 - Apply this patch
7 - Restart all
8 - Stage and import again
9 - Success!

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-06-09 18:54:43 +00:00
Jesse Maseto 82e4ca1288
Merge branch '24.05bug_37820' into 24.05.x 2025-06-09 13:00:16 -04:00
Emmi Takkinen 68e4aa4f48 Bug 37820: Upgrade fails at 23.12.00.023 [Bug 36993]
If table aqbudgets is miissing foreign key
'aqbudgetperiods_ibfk_1' database update fails on
"Can't DROP FOREIGN KEY" error.

To test:
1. Remove changes made in bug 32132, drop foreign key
aqbudgetperiods_ibfk_1 and downgrade your database:
- ALTER TABLE aqbudgets MODIFY COLUMN `budget_period_id` INT(11) NULL;
- UPDATE aqbudgets SET budget_period_id = NULL
WHERE budget_period_id IN(SELECT budget_period_id FROM aqbudgetperiods
WHERE budget_period_description = "Budget for funds without budget");
- DELETE FROM aqbudgetperiods
WHERE budget_period_description = "Budget for funds without budget";
- ALTER TABLE aqbudgets DROP FOREIGN KEY aqbudgetperiods_ibfk_1;
- UPDATE systempreferences SET value="23.1200022" WHERE variable = "Version;
2. Upgrade your database (e.g. running installer/data/mysql/updatedatabase.pl)
=> Update fails on error "Can't DROP FOREIGN KEY `aqbudgetperiods_ibfk_1`;...".
4. Apply this patch.
5. Try to update your database again.
=> Database should now be upgraded succesfully.
=> Confirm table aqbudgets now contains 'aqbudgetperiods_ibfk_1'.

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: Jesse Maseto <jesse@bywatersolutions.com>
2025-06-09 16:56:20 +00:00
Martin Renvoize 5b874c8f72 Bug 36978: (Bug 34029 follow-up) Make update idempotent
The update wasn't checking for index pre-existance and as such could
fail in certain cases.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
2025-06-09 16:48:50 +00:00
Paul Derscheid 0487fc3499
Update release notes for 24.05.10 release
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-05-26 22:31:36 +02:00
Paul Derscheid 7177fee7b7
Increment version for 24.05.10 release
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-05-26 22:26:29 +02:00
Paul Derscheid f0628f9489
Merge remote-tracking branch 'upstream/24.05.x' into 24.05.x-security
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-05-26 22:25:33 +02:00
Wainui Witika-Park 986573c909 Revert "Bug 38782: Mock userenv->{number}"
This reverts commit de3999c6b8.
2025-05-21 13:44:00 +12:00
Wainui Witika-Park 81963ab452 Revert "Bug 38782: Remove concat in background process"
This reverts commit 1013d5b74e.
2025-05-21 13:43:54 +12:00
Wainui Witika-Park c1bb46670a Revert "Bug 38782: Apply same fix for CounterFile.t"
This reverts commit 549031d41b.
2025-05-21 13:43:48 +12:00
Wainui Witika-Park b9fbacfe60 Revert "Bug 38782: mock_userenv in API tests"
This reverts commit 3b70d648ed.
2025-05-21 13:43:41 +12:00
David Cook 1794924eeb Bug 39184: Turn off ABSOLUTE and EVAL_PERL for user-entered templates
This change turns off ABSOLUTE and EVAL_PERL for user-entered templates,
as these options can allow for arbitrary code execution and information
disclosure.

Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. Create a Notice for Reports with a report like:
[% IF ( x == 1 ) %]
One
[% ELSE %]
Two
[% END %]
3. Run a report using this template
4. The report should show "Two"
5. Turn on CHECKOUT emails for a test patron
6. Perform a checkout
7. Look at the CHECKOUT email and note that the email body
is correctly generated

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Would be good to have this fixed as the default.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
The test plan should include PERL blocks or absolute paths! Tested those
instead. Testing x==1 seems irrelevant.
I tried:[% PERL %]print 1;[% END %] and [% INCLUDE /app/Dockerfile_1 %]
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2025-05-21 01:20:21 +00:00
Nick Clemens fd6d58bb4b Bug 36867: (follow-up) Don't check IP if ILS-DI disabled
When ILS-DI is disabled we still expect to return the correct service name/section in the
xml, but just indicate that it is disabled.

We should skip the check for authorized IPs in this case, as the IP only matters when service is enabled

Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2025-05-06 00:03:36 +00:00
Wainui Witika-Park 58302e1092 Update release notes for 24.05.09 release
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2025-04-24 17:06:15 +12:00
Wainui Witika-Park f2954d13c1 Increment version for 24.05.09 release
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2025-04-24 16:46:46 +12:00
Nick Clemens 7589c3b6d8 Bug 36867: Update preference description
This lists the new syntax for allowing all IPs in the preference

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2025-04-24 16:46:46 +12:00
Nick Clemens 5fcc519aa3 Bug 36867: Do not allow access to ILS-DI for IPs not explicitly listed in ILS-DI:AuthorizedIPs
This patch forces a check of authorized IPs against the Koha system preference, if nothing is present, no access is allowed

To test:
 1 - Enable ILS-DI, leave  ILS-DI:AuthorizedIPs blank
 2 - In another window:
    http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=1+2+99999&id_type=item
 3 - You get a response
 4 - Apply patch and restart all
 5 - Reload ilsdi page, 'Not authorized'
 6 - Copy the IP listed as refused and paste into ILS-DI:AuthorizedIPs
 7 - Reload the page, you get a response again
 8 - Change ILS-DI:AuthorizedIPs to:
    0:0:0:0/0
 9 - You still have access
10 - Paste your specific IP again, and add a second made up IP (comma separated)
11 - Reload and confirm you still have access

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2025-04-24 16:46:46 +12:00
Jonathan Druart 6e267dc90f Bug 38969: Prevent XSS in tags/review.pl and Prevent JS error when adding tags with quote at the OPAC
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2025-04-24 16:46:40 +12:00
Roman Dolny 6ef34a6e3e Bug 38772: Typo 'minPasswordPreference' system preference
Typo in system preference 'minPasswordPreference' -> 'minPasswordLength'
in opac/opac-password-recovery.pl

There is no 'minPasswordPreference' system preference in database.
Bug 23816 added the capability to override minPasswordLength.

Test plan:
==========
1. Check 'minPasswordPreference' appearances:
   git grep -i 'minPasswordPreference' **/*
--> Note: only one in opac-password-recovery.pl; no one in sysprefs.sql
2. Apply the patch.
3. Repeat p. 1. Note there is not 'minPasswordPreference' at all.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4b8db36d2a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2025-04-17 06:47:17 +00:00
Pedro Amorim 3b70d648ed Bug 38782: mock_userenv in API tests
Reorder logic slightly for each to only create the counter_file after the mock_userenv has taken place

prove t/db_dependent/api/v1/erm_custom_reports.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1e7c49ab98)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2025-04-17 06:40:05 +00:00
Pedro Amorim 549031d41b Bug 38782: Apply same fix for CounterFile.t
prove t/db_dependent/Koha/ERM/EUsage/CounterFile.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: tidy (tcohen)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a297c42394)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2025-04-17 06:40:05 +00:00
Pedro Amorim 1013d5b74e Bug 38782: Remove concat in background process
The ud_provider->{report_type} is only defined on ->harvest_sushi, meaning it'll never be defined here.
We don't need this anyway. The filename should be the filename of the file being manually uploaded. We only need this concat logic for COUNTER files being generated by Koha following a SUSHI harvest, and that works.
This also gets rid of a warning when running the tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0231911c98)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2025-04-17 06:40:05 +00:00
Pedro Amorim de3999c6b8 Bug 38782: Mock userenv->{number}
prove t/db_dependent/Koha/BackgroundJobs/ErmSushiHarvester.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: tidy (tcohen)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c3e8b9b851)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2025-04-17 06:40:05 +00:00
Fridolin Somers 35bee8465a Bug 38653: Remove call on system preference 'OPACLocalCoverImagesPriority'
This is in opac/opac-search.pl a call on system preference
OPACLocalCoverImagesPriority. This preference does not exists elsewhere
and dates back to Koha 3.8 from Bug 1633

This patch removes the call and fixes folding of if.

Check this returns empty : git grep OPACLocalCoverImagesPriority

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit bf82831913)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2025-04-17 06:12:52 +00:00
Matt Blenkinsop 1667d7db42 Bug 38268: (follow-up) Prevent callbacks from being duplicated
This patch moves the logic up one level into the confirmModal function
to prevent future regressions

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1fc336d6bd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2025-04-17 05:50:42 +00:00
Phil Ringnalda 7e5319280a Bug 38268: Callers of confirmModal need to remove the modal as the first step in their callback function
Templates that use confirmModal to show a pretty confirm() need to
remove the modal in their callback function, or they are at risk of
having the first callback called for subsequent calls that think they
will get their own callback called. opac-user.tt is already fixed,
opac-shelves.tt is currently affected, and opace-suggestions.tt,
opac-tags.tt, and sco/sco-main.tt are at risk of being affected if
anyone adds another confirmModal caller.

Test plan:
 1. Without the patch, open the OPAC, log in, search for something that
    will return several results
 2. Select all - Add to list - New list
 3. Lists - {your list name}
 4. Click the checkboxes for the first two items
 5. Instead of clicking Remove from list, accidentally click Delete list
 6. In the confirmation popup, realize it was a mistake and click No, do
    not delete
 7. Click Remove from list
 8. Poof, your whole list is gone
 9. Apply patch
10. Repeat steps 1-7, but instead of the whole list being deleted, see
    that only the selected two items were removed
11. Now intentionally click Delete list and click Yes, delete, you'll
    see that it is deleted rather than getting a message about nothing
    being removed like you would have gotten without the patch if you
    started by removing an item
12. On any bib detail page, click Add tag(s) and add one
13. Your account - Tags, check the checkbox for the tag, Remove selected
    tags, Yes, delete tag and verify that it was deleted
14. Purchase suggestions - New purchase suggestion, fill in a title and
    submit your suggestion, click the checkbox for your suggestion,
    Delete selected, Yes, delete suggestion and verify it was deleted
15. In the staff interface, find and copy the barcode for any item that can
    be checked out, then go to /cgi-bin/koha/sco/sco-main.pl with the
    OPAC hostname and port, not the staff, and log in
16. Paste the barcode in the input, click Submit, then click Finish, and
    in the confirmation popup click Print recept and end session, and
    verify that it tries to print

Sponsored-by: Chetco Community Public Library
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6b470caa92)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2025-04-17 05:50:42 +00:00
Lucas Gass edcabe5d80 Bug 38512: Fix display of recalls in items table
1. Turn on  UseRecalls
2. Set circ rules to allow for recalls ( Recalls allowed(total) and Recalls allowed(count))
3. Check something out to a patron, choose a record with multiple items on it
4. With another patron recall the item from the OPAC
5. Choose "Recall next available item"
6. Now go back to the item table and see that all items on the bib say something like: "Recalled by koha (42) on 11/21/2024"
7. APPLY PATCH
8. Do steps 3 - 6 again and now the items should correctly show as available.
9. Place a recall again but choose 'Recall a specific item'.
10. Look at the table again, it should accuretly show the recall in the status column. "recalled by koha (42) on 11/21/2024"
11. Turn off UseRecalls, make sure the table still loads properly.

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 52dd7302d2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2025-04-16 05:33:14 +00:00
Emily Lamancusa 870fd1805c Bug 38155: (QA follow-up) Fix TT filters and scalar context
data-referer is the url for the current search page, to redirect
back after performing the operation. Since it is a url, variables within
this link all need to use the uri filter, not html or KohaDates.

Also specify scalar context when splitting the input parameter to
prevent param in list context warnings.

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0f01f2b31d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2025-04-15 09:02:56 +00:00