Commit Graph

60055 Commits

Author SHA1 Message Date
Pedro Amorim 6fcd7937f3
Bug 41478: Refactor: Readability + Never nester
1) Install the following dummy backend plugin:
https://github.com/openfifth/koha-ill-backend-plugin/releases/tag/v2.0.9
2) Sys prefs preparation: Enable ILLModule, ILLOpacUnauthenticatedRequest and check PluginBackend on AutoILLBackendPriority
3) Logout, create a new Unauthenticated ILL request on the OPAC, visit:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard
4) Fill in the mandatory top fields (first name, last name, email address and library)
5) Pick 'Book' for type and enter 'green' in title. This will cause the dummy plugin to be available in the AutoILL logic.
6) At the bottom of the form, on the "Verification" captcha, purposely input a wrong captcha e.g. '123'
7) Click 'Create'. Notice an odd looking form is presented, this is the dummy backend form, but it should present the 'Standard' form when using AutoILLBackendPriority as that was also the form we were presented with originally.
This happens because currently it's the backend that delegates back to Koha what template to render. When using AutoILLBackendPriority, however, Koha should handle this template delegation instead and present the Standard form.
8) Apply patches. Repeat test plan. Notice that now on step 7 you get the correct form, and error message (coming from Standard, as expected when using AutoILLBackendPriority).
9) Input the correct captcha this time
10) Confirm the created request landed in the PluginBackend backend.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6473a06916)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 10:42:03 +00:00
Pedro Amorim 14426d2462
Bug 41478: Render Standard form on OPAC if failed_captcha and AutoILLBackendPriority
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 53a78c501d)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 10:42:00 +00:00
Pedro Amorim af5c419802
Bug 41465: Fix display of 'type' for unauthenticated ILL request
'request' is unblessed in this context. get_type doesnt exist/work.

Test plan:
1) Enable ILLModule and ILLOpacUnauthenticatedRequest
2) Logout, place an OPAC unauthenticated ILL request, visit:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?backend=Standard&op=add_form
3) Input all mandatory fields. Click 'Create'.
4) Notice 'Request type' shows as 'N/A'. This will always be the case regardless of type you pick.
5) Apply patch. Repeat. Notice 'Request type' now shows as expected.

Signed-off-by: Richard Bridgen <richard.bridgen@nhs.net>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 51c718b184)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 10:41:18 +00:00
Paul Derscheid d3de9ea135
Bug 41035: remove invalid path component 'item'
To test:
1. Create a record as a collection with leader 007 set to c
2. Add some items on the same branch to the bundle
3. Check one item in
4. Observe that you get a 404 error and the item is not removed from
   the bundle
5. Apply the patch
6. Repeat step 3
7. Observe that the item is correctly removed (unlinked) from the
   bundle
8. Sign off

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1b52f621dc)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 10:41:03 +00:00
Jacob O'Mara 3583b7919d
Bug 23308: DBRev 25.11.02.002
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:06 +00:00
Jonathan Druart 2ad7a55388
Bug 28308: DBrev
To remove the unnecessary entries from the DB

Signed-off-by: Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0a42444fee)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:06 +00:00
Jonathan Druart a96fea3f43
Bug 28308: JS changes
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ac724b8f06)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:06 +00:00
Jonathan Druart 167758957d
Bug 28308: Remove 0 from "days in advance" for "Advance notice"
0 days in advance means that the notice should not be sent.

This patch contains the pl/pm changes: we set to null if 0 is passed,
and do not insert a row in borrower_message_transport_preferences

Test plan:
0. Do not apply the patches
1. Create some entries with email and days in advance = 0
2. Create some entries with email and days in advance > 0
3. Apply the patches
4. Run the updatedatabase script
=> The rows in borrower_message_transport_preferences have been removed
for days in advance = 0
5. Edit some messaging preferences
=> 0 has been replace with a blank entry
=> checkboxes are disabled when blank is selected
6. Save
=> No new entry in borrower_message_transport_preferences is blank is
selected
7. advance_notices.pl still works correctly

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d2ad74b63c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:06 +00:00
Emmi Takkinen 671c913b22
Bug 29768: Do not hide guarantor name from memberentry.pl
Syspref "hidepatronname" currently hides guarantors
name on memberentry.pl. This is inconsistent since name isn't hidden e.g. on moremember.pl and staff
can already see patrons other personal information
during edit.

To test:
1) Disable syspref "hidepatronname"
2) Edit guarantee patrons information
=> Field "Guarantor" only shows guarantors cardnumber (or
is empty if guarantor has no cardnumber)
3) Apply patch
=> Guarantors name is now displayed (as a hyperlink)

Also confirm  hidepatronname still works as expected
on other pages (holds table, items detail page etc.).

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4e6e7bd914)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:06 +00:00
Jonathan Druart 057d812edc
Bug 36136: Make sure 'to' dates are instantiated with the 'from' dates as minimum
To test you should check the behavior of forms which have sets of "from"
and "to" dates. It shouldn't be possible to select a "to" date which is
before the "from" date. For example:

- Overdues report
- Invoice search

In some cases we need to check that the fields work correctly when the
"from" date is already filled:

- Editing vendor issues
- Editing a budget
- Duplicating a subscription

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Olli Kautonen <bhm503@myy.haaga-helia.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d94e2b26b6)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:06 +00:00
Owen Leonard 2f9abcc757
Bug 32288: Capitalization: RDA Carrier, etc.
This patch corrects the capitalization of the phrases "RDA carrier,"
"RDA content," and "RDA media," found in several UNIMARC cataloging
plugins.

To test you could edit subfields in a MARC framework to activate each
affected plugin, but I think the change is simple enough to be checked
by examining the patch.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ead9dd4cac)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Owen Leonard 283d428e7f
Bug 41586: Fix spacing problem in display of patron names
This patch updates patron-title.inc which generates the output of patron
names throughout Koha. Some whitespace is added to the display of
borrowers.othernames and spaces removed from the maybe_span WRAPPER.

To test, apply the patch and create or edit a patron in the staff
client.

- Add a value to all the name fields: Surname, first name, preferred
  name, middle name, and other name.
- Save the patron and check the display of their name on the patron
  detail page. The name in the page heading and sidebar should have
  correct spacing.
- Place a hold for that patron to be picked up at the logged-in library.
- Go to Circulation -> Holds to pull and confirm that the patron name is
  displayed correctly (this tests the display when the format is
  lastname, firstname).
- Edit the same patron and change its category to an organizational one
  (Inter-Library Loan, Library, or School in the sample data).
- View the same pages listed above and confirm that the name displays
  correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Manvi <manvisharma1006@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 64796fde35)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Nick Clemens 4a53efcde4
Bug 41700: Unit test
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 91a78d1aec)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Nick Clemens 65fb9c3d60
Bug 41700: Update note_date to datetime
This patch updates the swaager definition to have the correct format

To test:
1 - Enable issue notes:  AllowCheckoutNotes preference
2 - Issue an item to a patron
3 - Sign in to opac as that patron, add a note
4 - Have staff client open and a second tab try:
    http://localhost:8081/api/v1/checkouts/
5 - Error "message":"Does not match date format.","path":"\/body\/0\/note_date"
6 - Apply patch, yarn build, restart all
7 - Refresh the page
8 - Success!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1c60059808)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Nick Clemens e899db69e3
Bug 41315: Don't change which branch is used for getting the transports
See bug 41316 - the script uses the triggers of the issuing branch when sending
by patron library - we shouldn't change this here, but on the next bug

Signed-off-by: Ben Daeuber <bdaeuber@fargolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b034685fe8)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Nick Clemens 80505c6024
Bug 41315: (follow-up) Rename statements for clarity
Signed-off-by: Ben Daeuber <bdaeuber@fargolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 37eda84469)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Nick Clemens b31f8c0640
Bug 41315: Remove unecessary conditional
We are in a loop here:
foreach my $branchcode (@branches) {

branchcode must be defined or something has gone seriously wrong with PERL

Signed-off-by: Ben Daeuber <bdaeuber@fargolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ce848197e5)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Nick Clemens a9ccba49c1
Bug 41315: Change only notice branchcode when OverDueNoticeFrom is set to patron-homelibrary
This patch adds a new variable $notice_branchcode and uses this when getting the patron's
homelibrary to ensure we don't change the branch we are using.

To test:
 1 - At branch A - checkout three items, 1 day overdue to 3 patrons of the same category from different branches (not A)
 2 - Set the system preference OverdueNoticeFrom to 'patron home library'
 3 - Browse to More->Tools->Overdue notice/status triggers
 4 - Set overdue triggers for default library and the category used above to:
     Delay: 1
     Letter: Overdue notice (ODUE)
 5 - From the command line run the overdue notices:
     perl misc/cronjobs/overdue_notices.pl --triggered --library CPL --test --nomail -v -v
 6 - Note that we begin pass 1 with CPL and then use a different branch for passes 2 and 3
 7 - Apply patch
 8 - Repeat
 9 - Confirm branch is consistent
10 - Run without branch param:
     perl misc/cronjobs/overdue_notices.pl --triggered --library CPL --test --nomail -v -v
11 - Confirm branches are consistent

Signed-off-by: Ben Daeuber <bdaeuber@fargolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 914c8be2c0)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Jonathan Druart 0c318aee2d
Bug 41561: Remove 'tab' from admin/aqbudgetperiods
commit 4b312b141a
CommitDate: Wed Sep 19 16:17:16 2012 +0200
    Bug 8117: Divide budget periods into two tabs

It was used at the time
+$url = "aqbudgetperiods.pl?tab=2";

But this has been removed by
commit 870104ce11
Date:   Mon Mar 21 09:32:39 2016 -0400
     Bug 13464 - Standardize the pagination class

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 72b06d3576)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Jonathan Druart 359016f26a
Bug 41560: Remove id="js" from script tags
Both files
 koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt
 koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt

have
  <script id="js">

That's not needed, useless, and confusing.

Added from those commits for no obvious reasons
catalogue/issuehistory.tt
commit df98c8aaaa
CommitDate: Mon May 14 15:39:44 2012 +0200
    bug_7647: Table sorter on issue history

members/readingrec.tt
commit 77b6409802
CommitDate: Mon Mar 21 20:02:15 2011 +1300
    Bug 5917 : Converted templates

Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8b532fc8f4)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Hammat Wele a84be7b8ee
Bug 40822: Custom cover images not displayed in search results
When using OPACCustomCoverImages, the custom cover image shows
correctly on the bibliographic detail page but does not appear in the
search results list.

To Test:

1. Disable all cover image preferences (OPACLocalCoverImages,
   OPACAmazonCoverImages, SyndeticsCoverImages, GoogleJackets
   OpenLibraryCovers, BakerTaylorEnabled, OPACCoce).
2. Enable OPACCustomCoverImages.
3. Set CustomCoverImagesURL to {956}.
4. Ensure field 956 is visible in the record editor.
    1. Go to Administration --> MARC bibliographic framework.
    2. Click Actions --> MARC Structure for the default framework.
    3. Search for field 956.
    4. Click Actions --> Edit subfields.
    5. Open the u subfield tab.
    6. Make sure the subfield is in tab 9.
    7. Check OPAC, Intranet, and Editor.
    8. Click Save changes.
5. In a bibliographic record, add the following URL to 956:
    https://m.media-amazon.com/images/I/71Uo7Fqbu3L.jpg
6. At the OPAC, perform a search to display the record in a results
   list.
    --> The custom cover image does not appear in the search results
        list.
7. Apply the patch
8. Repeat step 6
    --> The custom cover image appears in the search results.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit baff2098bd)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Andrew Fuerste Henry ca9197cea2
Bug 41163: Do not decode branchcode in circ log
To test:
1 - confirm circ logging is on
2 - check out an item at Centerville (CPL)
3 - go to the log viewer, find your checkout, confirm the Info column includes "CPL"
4 - switch your logged-in library to Fairfield (FFL)
5 - confirm the log viewer now shows "FFL" in the info column for your checkout
6 - use a report to view action_logs.info for your checkout, confirm the field contains "CPL"
7 - apply patch, restart_all
8 - repeat steps 3-5, confirm "info" column shows "CPL" regardless of logged-in branch

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b3bfd82c76)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Jonathan Druart 95e2265759
Bug 39745: Replace more occurrences in selenium tests
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 458a163360)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Fridolin Somers 520de088de
Bug 39745: Fix wrong system preference 'language' in test suite (mock_preference)
Bug 27490 renamed system preference language to StaffInterfaceLanguages.
Needs to be done in test suite on mock_preference calls

Test by running impacted tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1534574257)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Jonathan Druart 3b3e7ee90c
Bug 41710: Correctly run tests SearchEngine/Elasticsearch/Search.t in a txn
Test plan:
0. Apply this patch and startup ktd with elastic (e.g `--search-engine es7`)
1. prove t/db_dependent/check_sysprefs.t
=> pass
2. DB cli> SELECT COUNT(*) FROM systempreferences;
3. prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t
4. DB cli> SELECT COUNT(*) FROM systempreferences;
=> No change, still the same number of sysprefs
5. prove t/db_dependent/check_sysprefs.t
=> pass
6. Revert this patch or checkout main
7. prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t
8. DB cli> SELECT COUNT(*) FROM systempreferences;
=> One syspref crated (ElasticsearchIndexStatus_mydb)
9. prove t/db_dependent/check_sysprefs.t
=> fail

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5f9ec5e5c0)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Jacob O'Mara 24ed8c2b0c
Bug 41682: DBRev 25.11.02.001 2026-03-14 12:21:04 +00:00
Lucas Gass dee3a09835
Bug 41682: (RM follow-up) Fix spelling mistake
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit faabc711fa)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Jonathan Druart 096d31b512
Bug 41682: More fixes
* free => Free
* options=NULL where type=Free
* fix options and type for ArticleRequestsSupportedFormats
* fix more explanation and options

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1b3fe83d6a)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Jonathan Druart 8f82300253
Bug 41682: Ensure that sysprefs.sql is kept ordered by syspref's name
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f3525b169f)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Jonathan Druart 715fe172ce
Bug 41682: Ignore 'FrameworksLoaded'
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fecaedbbd8)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Tomás Cohen Arazi e4c8d07860
Bug 41682: Fix 'cancelation' typo
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c435b04a93)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Tomás Cohen Arazi 7e8edad51a
Bug 41682: Fix 'integer' vs. 'Integer' inconsistency
There are 72 occurences for the 'Integer' type, and 8 for 'integer'.
Tests fail because of `StoreLastBorrower` already, so fixing them all for good.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0ba2c8350c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Tomás Cohen Arazi 25c38109a3
Bug 41682: Add ApiKeyLog description
This particular case already introduced discrepancies. Fixing.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8552f04486)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:03 +00:00
Jonathan Druart 65a5f80bd7
Bug 41682: Sync DB and sysprefs.sql for new and upgraded installs
This patch removes the discrepancies and put in sync the
systempreferences table for new and upgraded installations.

Main changes:
* Set options to NULL when options=""
* Fix explanation when different
* Fix wrong order (some rows had options=explanation)
* Fix wrong type "Yes/No" => "YesNo"
* Remove StaffLoginBranchBasedOnIP: both StaffLoginLibraryBasedOnIP and
  StaffLoginBranchBasedOnIP are in the DB for upgraded installs
* Remove the 'showsql' from the test. If we need it back then it must be
  a maintenance script.
* Improve the tests:
  * Compare sysprefs.sql and the DB content for options, explanation and type
  * Catch type not defined
  * Catch incorrect YesNo values (must be 0 or 1)

Later:
* Add a C4::Installer sub to add new syspref:
  add_pref(
      {
          variable    => $variable,
          value       => $value,
          options     => $options,
          explanation => $explanation,
          type        => $type
      }
  );
* Clean 'type' and make it an ENUM
* Make it easy to run the test for devs (should be in xt but we need it
  in t/db_dependent for packages - FIXME?)
* Run the tests on upgraded installs on CI

Test plan:
0. Apply the "tests" patch only
1. prove it
=> It fails loudly
2. Apply the DB change and run updatedatabase, prove the tests
=> they pass
3. Test upgraded installs:
  * checkout v24.05.00 (the version we use for Jenkins'
    Koha_Main_MariaDB_update job)
  * reset_all
  * checkout the branch with this patchset
  * updatabase
  * prove t/db_dependent/check_sysprefs.t
  => Should be green

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 409c804bc1)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:03 +00:00
Jonathan Druart b3387fe07e
Bug 41682: Add tests
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Edit: uncommented the `Test::NoWarnings` line, probably commented by mistake.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 42c2fc7dbf)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:39:04 +00:00
Connor Cameron-Jones 8e5eb4f818
Bug 41347: Terminology: Item had a reserve waiting
"Item had a reserve waiting" changed to "Hold waiting on item"
"Item was reserved" changed to "hold placed on item"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b218bbc8c0)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:37:48 +00:00
Jonathan Druart dff97ebe39
Bug 41557: Remove unused vars sent to template
488         LoginFirstname               => ( C4::Context->userenv ? C4::Context->userenv->{"firstname"} : "Bel" ),
 489         LoginSurname                 => C4::Context->userenv ? C4::Context->userenv->{"surname"}      : "Inconnu",
 490         emailaddress                 => C4::Context->userenv ? C4::Context->userenv->{"emailaddress"} : undef,

Test plan:
`git grep` the 3 variables and confirm that there is no occurrences in
the templates (.tt/.inc files)

Signed-off-by: Connor Cameron-Jones <22264cc@hvhs.school.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ac1d6a7f2c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:37:22 +00:00
David Nind 74a6b76835
Bug 32285: (QA follow-up) Remove additional spaces before colons 325$j
This removes two additional spaces before colons for the UNIMARC 325$j
value builder (unimarc_field_325j.pl plugin).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b4cbe3c6fe)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:36:55 +00:00
Photonyx 4f19a921f5
Bug 32285: Removed spaces before the colons
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7bf6f009a6)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:36:54 +00:00
Raguram Gopinath fa06b8e0f9
Bug 40031: Redirect to add action page from add template form
Test plan:
1. Login to staff client.
2. Go to: Cataloging > MARC modification templates > New template
3. Give new template a name and click submit.
4. Following URL loads: http://localhost:8081/cgi-bin/koha/tools/marc_modification_templates.pl
If you are using KTD
5. Apply patch and restart services.
6. Repeat steps 2 and 3.
7. Following URL loads: http://localhost:8081/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=(template_id)&op=select_template
8. You can now add actions for your new template.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8a09573fa3)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:36:35 +00:00
Lari Taskula 12eda3ea41
Bug 35423: Fix substr outside of string warning
To test:

Before applying patch

1. Create an authority record, fill field 400$w with "n"
2. Search for the authority you just created
3. Observe a warning has been logged

"substr outside of string"

4. Apply patch
5. Refresh the search results from step 2
6. Observe no warnings have been logged

Signed-off-by: Harrison Hawkins <harrisonhawkins@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3c34d7bf43)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:36:14 +00:00
Owen Leonard 5f40e97139
Bug 39715: (follow-up) Undo change to shelves_results.tt
This must have been an overzealous find and replace. A similar template,
itemsearch_json.tt, was not similarly affected.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1e84cbd496)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:35:44 +00:00
Owen Leonard 458a3d7add
Bug 39715: Do not quote DataTables options
This patch updates templates so that the options passed to DataTables
(via kohaTable) are not quoted. The quotes are not necessary, and
are not consistent with official DataTables documentation. This
establishes a standard for us to follow in the future.

The patch also corrects some option names which required upates,
particularly "sorting" -> "order".

To test, apply the patch and test updated DataTables.

Sponsored-by: Athens County Public Libraries

Rebased-by: Jonathan Druart
paginate => paging

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 684c014577)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:35:43 +00:00
Lucas Gass 112b257a4d
Bug 41539: (follow-up) Add missing filters
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 166604f9f3)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:34:37 +00:00
Nick Clemens 1947118ce7
Bug 41539: (QA follow-up) Add classes for styling
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f9912bcd1d)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:34:36 +00:00
Andrew Fuerste Henry 1efee676c3
Bug 41539: Add item barcode to hold waiting message
To test:
1 - have or create a waiting hold
2 - go to the patron's record, see your waiting hold is listed in the patron messages but does not include barcode
3 - apply patch, reload page
4 - confirm item barcode appears on both Check Out and Details pages, for holds waiting both at your current branch and at another branch

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8a7109be70)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:34:35 +00:00
Chloe Zermatten 22c09155c9
Update release notes for 25.11.02 release 2026-02-23 16:55:40 +00:00
Chloe Zermatten 0585588d4b
Increment version for 25.11.02 release
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-23 16:41:44 +00:00
Jonathan Druart 34050c8180
Bug 41591: Remove view=1 parameter from the invoices table
It has been removed in the controller by the previous patch.

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: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-23 16:41:39 +00:00
David Cook b6ec792aa5
Bug 41591: Prevent inline rendering of invoice files
This patch forces download of invoice files rather than showing
them inline where they can potentially perform XSS

Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. Find or create an active vendor
3. Create a basket if one doesn't already exist
4. Receive a shipment for the vendor
5. Create an invoice
6. Go to the invoice
7. In the URL change invoice.pl to invoice-files.pl
(or turn on AcqEnableFiles and go to it that way)
8. Upload an image file (e.g. SVG) or PDF
9. Click on the filename
10. Note that instead of displaying in the browser,
the file will be downloaded

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: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-23 16:41:31 +00:00