Commit Graph

58583 Commits

Author SHA1 Message Date
Pedro Amorim 05b2abd841
Bug 39900: REST API specs and class changes
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 316745f3e2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:42 +02:00
Pedro Amorim b08f5872d3
Bug 39900: Preparation: Move html customizations options to class for reusability
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 2da24a2002)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:42 +02:00
Pedro Amorim f365ee8801
Bug 39900: Preparation: Refactor public_query_search_params for reusability
Ensure no regressions are introduced, run:
prove t/db_dependent/Koha/AdditionalContents.t

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 ef0bde190a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:41 +02:00
Matt Blenkinsop 20dba5f8f3
Bug 37116: Redirect to batch serial modification when batch modifying items
Test plan:
- Add a new subscription to a serial record (with option 'When receiving the serial --> create an item record')
- Receive several issues and create the items linked
- Back to bibliographic record
- Select several items and click to 'Modify selected items'
- Modify data (like add a public note)
- A box opens indicating that 'some of the items have linked serial issues, would you like to edit these as well ?'
- Click on "Edit serial issue"
- We switch to the issues
- Modify data of the issues (add a note for example like for the items) and save
- Both modifications (item and issue) are validated

Signed-off-by: Nathalie <nathalie.savarit@univ-amu.fr>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3aa675795b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:40 +02:00
Matt Blenkinsop 42c7153e0d
Bug 37116: Redirect to serial modification when modifying an item
Test plan:
- Add a new subscription to a serial record (with option 'When receiving the serial --> create an item record')
- Receive one issue and create the item linked
- Back to bibliographic record
- Edit item and modifying data
- Save changes
- A box opens indicating that an issue is linked to the item.
- Click on "Edit serial issue"
- We switch to the issue
- Modifying data of the issue and save
- Both modifications (item and issue) are validated

Signed-off-by: Nathalie <nathalie.savarit@univ-amu.fr>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8e83c5c3d9)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:40 +02:00
Lucas Gass d69271f3fa
Bug 40482: Add useful data-attributes to cover image containers on OPAC/staff search results
This patch adds useful data-attributes to the bookcover/bookcoverimg
container in the OPAC/staff search results.

To test:
0. APPLY PATCH
1. Turn on at least 1 image service for both the OPAC and staff interface
2. Do a search that returns results
3. You should see the following data attributes, even when no cover
   image is supplied:

  data-biblionumber
  data-itemtype
  data-itemtype_description
  data-title
  data-subtitle
  data-author
  data-isbn

You can now target these with just CSS.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0e0c150303)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:39 +02:00
Lucas Gass b394efcd90
Bug 39883: Do not pass the borrowernumber for NEW_SUGGESTION notices
1. Turn on EmailPurchaseSuggestions and add an email address to EmailAddressForSuggestions.
2. Create a new suggestion and set the "
Created by:" field to a patron with an email address
3. Check the message queue ( select * from message_queue where letter_code = "NEW_SUGGESTION" )
4. There is a NEW_SUGGESTION queued, the to_address should be the email you entered in EmailAddressForSuggestions.
5. The borrowernumber is the borrower who made the suggestion.
6. APPLY PATCH, restart_all
7. Repeat steps 2 - 4.
8. This time a NEW_SUGGESTION should be queued, but the borrowernumber will be undef
9. Check in the patron's notice tab, there should be nothing queued.

Signed-off-by: Lin Wei Li <lin-wei.li@inLibro.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6b6d9f275e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:39 +02:00
Fridolin Somers 59897c7dcb
Bug 39824: Add a direct link to default framework in MARC bibliographic frameworks page
In Administration > MARC bibliographic frameworks, add a  direct link to default framework can be very useful.
Currently one needs to move to the actions button, click to open it, and click on "MARC Structure".

Test plan :
1) Apply patch
2) Go to Administration > MARC bibliographic frameworks
3) See new link in tools bar "View default framework"
4) Click on it, you go to default framework MARC structure

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ed9a24cfb2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:38 +02:00
Emily Lamancusa a8c8152b98
Bug 36114: Adjust TRANSFERSLIP to use Template Toolkit
To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Find or create an item that belongs to a library other than the logged-in library
4. Make sure the item has a callnumber (edit it to add one if needed)
4. Check the item in to generate a transfer slip
--> Confirm the information is all filled in correctly on the slip

Signed-off-by: Marion Durand <marion.durand@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dcdb8b058c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:38 +02:00
David Cook 68710e3e4c
Bug 38997: Remove outdated developer doc
This change removes a line in the developer doc which is no
longer relevant.

There's not really much to test here.

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 a6713d8849)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:37 +02:00
Courtney Brown 4a5a133950
Bug 40425: Update guided reports 'Next' button to 'Save' and included a fullstop
Test plan:
1. Go to guided reports and go through the steps
2. On the final page of the reports 'Confirm custom report' page, the final sentence should have a fullstop and the button should say 'Save'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2a00970843)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:37 +02:00
Baptiste Wojtkowski 404280c868
Bug 38619: UNIMARC prices should also be extracted from 071d
When adding a document that does not use 010d as price document, but 071d, the price is not imported from koha since it only checks 010d and 345d.

To reproduce:
1 - Create a Koha item, make sure there is neither 010d or 345d
2 - Add a 071d and fill a price
3 - Export the item as marcxml
4 - If you do not have one: in acquisition, create a vendor, a basket associated to this vendor, and a line associated to this vendor
5 - Add a line to any open basket, select: import "from a new file" and
  select the exported marcxml -> The price in 071 is not imported
6 - Apply patch
7 - Repeat 5 -> the price is properly imported

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 1cb2f97e8c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:36 +02:00
Andrew Fuerste Henry c64cd33b25
Bug 40251: Add icons to patron details for selfcheck users
To test:
1: have patrons with self_check, self_checkin_module, and self_checkout_module permissions
2: observe that these patrons don't get icons by their names in the patroninfo sidebar
3: apply patch, restart_all
4: reload your patrons, see they now have icons for self checkout and/or self check-in

Signed-off-by: Eric Garcia <cubingguy714@gmail.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7ae5ca4c05)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:36 +02:00
Marcel de Rooy 585ea49741
Bug 40608: (QA follow-up) Delete notice in test, adjust about.tt
[1] This prevents a warn 'Violation of unique constraint in Letter'
    from TestBuilder if the notice already exists.
[2] The about warn should no longer say that password changes will
    fail but only warn about a missing notification.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8d31c2e067)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:35 +02:00
Tomas Cohen Arazi ab0fa4fea6
Bug 40608: (follow-up) Some tests rely on existing data
Playing with the about page, I noticed prior tests in the codebase fail
if the letter doesn't exist.

This patch fixes that.

To test:
1. With a fresh KTD run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Patron.t
=> SUCCESS: Tests pass!
2. Delete the existing notices:
  k$ koha-mysql kohadev
   > DELETE FROM letter WHERE code="PASSWORD_CHANGE"; \q
3. Repeat 1
=> FAIL: Tests fail! Current tests print a warn (Test::NoWarning)
doesn't like this
4. Apply this patch
5. Repeat 1
=> SUCCESS: Tests now pass. The test creates its own notice.
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 93a830b8ca)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:35 +02:00
Tomas Cohen Arazi a6b22a27dd
Bug 40608: (follow-up) Add warning in about page
This patch adds a check in about.pl for when `NotifyPasswordChange` is
enabled but no notices are present on the system.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8e05336a08)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:34 +02:00
Tomas Cohen Arazi cb3a4f094c
Bug 40608: Continue password change even if notification fails
When NotifyPasswordChange is enabled and GetPreparedLetter fails to find
a PASSWORD_CHANGE letter template, the set_password method was returning
early with undef, preventing the password from being changed.

This fixes the issue by:
1. Removing the 'or return;' statement after GetPreparedLetter
2. Wrapping the letter processing in an if block to handle missing templates
3. Ensuring password change continues regardless of notification success

The password change should not fail just because the notification cannot
be sent. The notification is a nice-to-have feature, but the core
functionality (changing the password) should always work.

Test plan:
1. Apply the tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Patron.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Verify that when the letter template exists, notifications are still sent
6. Verify that when NotifyPasswordChange is disabled, password changes work
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f748205ad0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:34 +02:00
Tomas Cohen Arazi 6ebff3d47f
Bug 40608: Regression tests
When NotifyPasswordChange is enabled and a patron has a valid email address,
but there is no PASSWORD_CHANGE letter template, the set_password method
fails silently and returns undef instead of changing the password.

This adds comprehensive regression tests to demonstrate the bug:

1. Bug condition: Missing PASSWORD_CHANGE letter template causes password
   change to fail and method returns undef
2. Control test: Password change works when NotifyPasswordChange is disabled
3. Control test: Password change works when PASSWORD_CHANGE letter exists

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0c310ccfc0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:33 +02:00
Owen Leonard 9eb84af647
Bug 40592: Fix incorrect row highlighting on patron checkout history page
To test:
1. Check out some items to a patron so they have a circulation history,
   the check in some of those items..
2. Look at the patron's "Circulation history" table. There are four
   possible background colors for each row: #ffffff, #f3f4f4, #F9FAE0,
   and #FFFFCC.
3. Apply the patch and reload the page.
4. An orange/gold badge will appear under the "Return date" column of
   the table for items that have been checked out, and there will no
   longer be alternating, pale yellow rows.

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 70eeb057fd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:33 +02:00
Owen Leonard fb29bf15df
Bug 40146: Untranslatable actions on vendor
This patch updates the vendor detail view in order to make some menu
items translatable..

To test, apply the patch and run 'yarn build'. Test that the correct
strings are translatable. In this example I'm testing fr-FR:

- Update a translation:

> gulp po:update
> cd misc/translator
> perl translate update fr-FR

- Open the corresponding .po file for the strings pulled from
  JavaScript  e.g.  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from vue/components/Vendors/VendorShow.vue for
  translation, e.g.:

  #: koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue:12
  #, fuzzy
  msgid "Basket"
  msgstr "Paniers"

- Lines 12, 25, and 35 of VendorShow.vue have been modified.
- Delete the line "#, fuzzy"
- Edit the "msgstr" string if ncessary, however you want (it's just for
  testing)
- Install the updated translation:

> perl translate install fr-FR

- Go to Acquisitions -> Vendors -> Vendor details.
- Switch to your updated translation.
- Confirm that the menu items under "New" are translated correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Flater <flaterdavid@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a219bda218)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:32 +02:00
Owen Leonard 120a4f86c6
Bug 37926: Allow for translation of "to" in date range selection
When a calendar widget has been initiated as a date range selector (as
it is when creating a new booking), the selected dates are added to the
input field as "0000-00-00 to 0000-00-00". This "to" needs to be
translatable.

To test, apply the patch and test that the correct strings are
translatable. In this example I'm testing fr-FR:

- Update a translation:
 > gulp po:update --lang fr-FR
 > cd misc/translator
 > perl translate update fr-FR

- Open the corresponding .po file for the strings pulled from
  JavaScript  e.g.  misc/translator/po/fr-FR-messages-js.po
  - Locate strings pulled from intranet-tmpl/prog/js/calendar.js for
    translation, e.g.:

    #: koha-tmpl/intranet-tmpl/prog/js/calendar.js:144
    msgctxt "As in, from date1 to date2"
    msgid "to"
    msgstr ""

    - Edit the "msgstr" string however you want (it's just for testing)
    - Install the updated translation:

    > perl translate install fr-FR

- In the staff interface, locate an bibliographic record with items and
  change the "Bookable" option from the item details screen.
- Switch to your updated translation in the staff interface.
- Click the "Place booking" button.
- Fill out all the fields in the "Place booking" modal.
- After you select a date range, the "Booking dates" input field should
  show your translated text.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Flater <flaterdavid@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 00bb254149)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:31 +02:00
Paul Derscheid f60f9c624e
Bug 40150: Prevent uncaught error on multiple attempts to 'define' on 'CustomElementsRegistry' in islands.ts
If the name is already in use, we just return.

It might make sense to have a console.debug() or similar to notify
developers that this is happening. Open for other opinions.

To test:
1) Apply the first patch which adds an additional hydrate call in main-container.inc
2) Go to acqui/acqui-home.pl
3) Verify that you see this error in the dev tool's console tab:
Uncaught (in promise) NotSupportedError: Failed to execute 'define' on 'CustomElementRegistry': the name "acquisitions-menu" has already been used with this registry
4) Apply the second patch
5) Run `yarn js:build` in ktd (assuming ktd).
6) Reload the page without cached assets (Ctrl/Cmd + Shift + R) and verify that the uncaught error is gone.
7) Sign off.

There's an additional problem here I (and probably you) noticed. But that's unrelated to this bug.

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 e152b1be08)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:31 +02:00
Marion Durand 15be16d017
Bug 38455: UNIMARC XSLT diplay field 036 correctly
In Unimarc, the field for music incipit is 036. The test to display the music player is correctly on field 036 but the field displayed was 031 (which is valid for Marc21 but not for Unimac).

To test:
On a Koha Unimarc instance:
1- Set system preference "OPACPlayMusicalInscripts" to "Play" and "OPACShowMusicalInscripts" to "Show"
2- set the system preference OPACXSLTListsDisplay is set on koha-tmpl/opac-tmpl/bootstrap/{languagecode}/xslt/UNIMARCslim2OPACDetail.xsl
3- Update a framework of your choice to display subfield 036$2 $g $n $o $p in OPAC, intranet and editor (make sure the collapse checkbox is not checked)
4- Create a record with the previously modified framework, fill all mandatory fields and add a 036 field with at least subfield $2 $g $n $o $p, make sure you have no 031 field
example of a valid 036 field
    036$2 pe
    036$g G-2
    036$n bB
    036$o 3/4
    036$p {8C'8C'}/4D4C'4F/2E
5- Go to the OPAC detail page for the record created (with interface in English)
6- check that the music player does not appear
7- apply the patch
8- Reload the OPAC detail page for the record created (sill with interface in English)
9- check that the music player appears and is working

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b364089c70)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:30 +02:00
Fridolin Somers ee3bf78fd4
Bug 39423: Fix column checkboxes in batch item modification hide incorrect columns
In batch item modification, unchecking any column hides the previous column.

This is caused by new HTML in table header :
<span class="dt-column-title"></span><span class="dt-column-order"></span>

This patch fixed by adding ".dt-column-title" to function guess_nb_cols().

Test plan :
1) Go to batch item modification
2) In "Show/hide columns:" click on "Home library" column
=> Check correct column is hidden
3) Go to another batch item modification
=> Check column "Home library" is hidden (from cookie storage)

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7c501cc381)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:30 +02:00
Paul Derscheid 82ac526335
Bug 35467: DBRev 25.05.03.007
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:29 +02:00
Andrew Fuerste Henry 5489e24d99
Bug 35467: (QA follow-up): Spelling correction in syspref
PA amendded: Commit title

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 559cebb000)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:29 +02:00
Andrew Fuerste Henry 552a88df61
Bug 35467: atomicupdate to rename NewsLog to AdditionalContentLog
Now executable!

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 665753634b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:28 +02:00
Andrew Fuerste Henry 6e3fba0778
Bug 35467: atomicupdate to change NewsLog to AdditionalContentLog
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 420add2908)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:28 +02:00
Andrew Fuerste Henry 0d5a1e2541
Bug 35467: Rename NewsLog system preference to AdditionalContent
To test:
1 - confirm whether or not NewsLog is enabled on your system
2 - apply patch, updatedatabase, restart_all
3 - search system preferences, confirm you now have
    AdditionalContentLog rather than NewsLog and that the new
    description is accurate
4 - confitm AdditionalContentLog shows the value you previously had for
    NewsLog
5 - go to Tools > Log Viewer
6 - confirm the checkbox here is labeled "Additional Content", that it
    correctly reflects the syspref value, and that it links to the
    syspref
7 - with AdditionalContentLog enabled, created/edit/delete news, HTML
    customizations, and pages. confirm they log
8 - with AdditionalContentLog disabled, created/edit/delete news, HTML
    customizations, and pages. confirm they don't log

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9805b4cb3e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:27 +02:00
Lucas Gass 6c1530fc58
Bug 40641: Fallback to empty values when logging action
Bug 22632 introduced the merge logging feature but missed to sanitize strings to avoid warnings.
This patch fixes that.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Patron/Borrower_Debarments.t
=> FAIL: Tests fail! Warnings introduced!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8d2f2f25bf)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:27 +02:00
Paul Derscheid 3b724c5edb
Bug 34561: DBRev 25.05.03.006
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:26 +02:00
Lisette Scheer b77389b396
Bug 34561: (QA follow-up) Rename to StaffReportsHome to match othe html customizations
I noticed the rest of the html customizations don't have html in the option name, so I renamed for consistency.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c1a1b85c87)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:26 +02:00
Owen Leonard b1be1478ec
Bug 34561: Move IntranetReportsHomeHTML to HTML customizations
This patch moves the IntranetReportsHomeHTML system preference into
HTML customizations, making it possible to have language- and
library-specific content.

To test you should have some content in the IntranetReportsHomeHTML
system preference before applying the patch. Apply the patch and run the
database update process.

- In the staff client, go to Tools -> HTML customizations and verify
  that the content from IntranetReportsHomeHTML is now stored there.
- The HTML customization entry form should offer
  IntranetReportsHomeHTML as a choice under "Display location."
- Update and reinstall active translations (for instance fr-FR):
  - perl misc/translator/translate update fr-FR
  - perl misc/translator/translate install fr-FR
- Enable the translation if necessary under Administration -> System
  preferences -> language.
- Edit the IntranetReportsHomeHTML HTML customization and add unique
  content to the "fr-FR" tab.

- Go to the reports home page. You should see the
  content you added to the IntranetReportsHomeHTML HTML
  customization.
- Switch to your updated translation and confirm that the content you
  added for your translation shows up correctly.
- Go to Administration -> System preferences and search for
  "IntranetReportsHomeHTML." It should return no results.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 20caaf611a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-20 10:42:21 +02:00
Jonathan Druart 2b39454874
Bug 22632: Prevent tests to fail randomly
Jenkins was failing on Koha_Master/3350

With this patch we won't rely on the order (timestamp are identical and
may not be sorted as expected)

23:56:28 koha-1      |     #   Failed test 'GetLogs returns results in the log viewer for the merge of 526'
23:56:28 koha-1      |     #   at t/db_dependent/Koha/Patron/Log.t line 67.
23:56:28 koha-1      |     #          got: 'G7X8jre jVr_oz8M (eQXWiW9b4jX16424uC3Chn) has been merged into Mwqx7a zkSkFX7 (y_L7flupzFShb8JWYVCwYGSuv)'
23:56:28 koha-1      |     #     expected: 'exgnQtw lLmxQL9eWY (nHc_VZdFHIXr90p6WrIijDPgFrz8JM38) has been merged into Mwqx7a zkSkFX7 (y_L7flupzFShb8JWYVCwYGSuv)'
23:56:28 koha-1      |
23:56:28 koha-1      |     #   Failed test 'GetLogs returns results in the log viewer for the merge of 527'
23:56:28 koha-1      |     #   at t/db_dependent/Koha/Patron/Log.t line 82.
23:56:28 koha-1      |     #          got: 'exgnQtw lLmxQL9eWY (nHc_VZdFHIXr90p6WrIijDPgFrz8JM38) has been merged into Mwqx7a zkSkFX7 (y_L7flupzFShb8JWYVCwYGSuv)'
23:56:28 koha-1      |     #     expected: 'G7X8jre jVr_oz8M (eQXWiW9b4jX16424uC3Chn) has been merged into Mwqx7a zkSkFX7 (y_L7flupzFShb8JWYVCwYGSuv)'
23:56:28 koha-1      |     # Looks like you failed 2 tests of 4.
23:56:28 koha-1      |
23:56:28 koha-1      | #   Failed test 'Test Koha::Patrons::merge'
23:56:28 koha-1      | #   at t/db_dependent/Koha/Patron/Log.t line 113.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f337c53ee)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:31 +02:00
Nick Clemens 85e5b036f9
Bug 22632: (QA follow-up) Add no warnings test
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7ef460765d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:30 +02:00
Owen Leonard 886ff35adf
Bug 22632: (follow-up) QA tool corrections for Log.t
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8ed44fde97)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:29 +02:00
Owen Leonard 8a09899885
Bug 22632: (follow-up) Use PATRON_MERGE as log action
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 80c656d79e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:29 +02:00
Axel Amghar f0b80e6c79
Bug 22632: Unit Testing of patch 22632
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ad7b8607ed)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:29 +02:00
Axel Amghar e8ed7d01f1
Bug 22632: adding of the rescearch of merge in the log viewer
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit da4818054b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:28 +02:00
Axel Amghar bb7e736915
Bug 22632: Add logging of merged patrons
without this patch , when patrons are merged , you can't see the merge in the log viewer.

    To test:
    -Apply the patch
    -Make sure you have "BorrowersLog" on in you System Preference
    -Search patrons
    -Check two ore more patrons
    -Merge selected patrons
    -Merge patrons
    -Go to log viewer
    - Make sure there is the line with the action : "Merge"

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0424ebb439)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:28 +02:00
Marcel de Rooy 27104bb65d
Bug 40315: (QA follow-up) Fix shebang for both tests
Including chmod 755 xt/use-test-no-warnings.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 02a9dd1489)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:27 +02:00
Jonathan Druart 8af412e989
Bug 40315: Remove warnings from xt/tt_tidy.t
Maybe we could remove the warnings from misc/devel/tidy.pl if the file
was originally empty but for now it feels safer to skip the tidy of
empty files

Test plan:
  prove xt/tt_tidy.t xt/use-test-no-warnings.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 a43065d307)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:27 +02:00
Jonathan Druart 6da4c46de5
Bug 40444: Fix onboarding and installer selenium tests
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c456dd86b4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:27 +02:00
Jonathan Druart 8c6d148911
Bug 40444: Add Test::NoWarnings to newly added api/v1/cash_registers.t
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e4b27be895)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:26 +02:00
Martin Renvoize 3996ef16e6
Bug 40444: (follow-up) Remove EDI tests from the exclude list
We've got those tests running without warnings now too.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b10a6f855f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:26 +02:00
Jonathan Druart d57bfdbaf5
Bug 40444: Add Test::NoWarnings to xt tests
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 40d3fe470e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:25 +02:00
Jonathan Druart 319d6f88cd
Bug 40444: Add a test to ensure all Perl test files use Test::NoWarnings
This patch adds a new xt test (xt/use-test-no-warnings.t) to make sure
all our Perl test files will use Test::NoWarnings.

It also adds Test::NoWarnings to some files that were missing it and
that didn't need any other changes.

However we still have 7 non-trivial tests that we will consider
exception for now, until they are fixed.

Test plan:
  prove xt/use-test-no-warnings.t
should return green.
And all other tests modified by this patch (the qa script will do that
for you)

You can also test the 2 selenium tests:
1. DROP and CREATE the DB
  DROP DATABASE koha_kohadev;
  CREATE DATABASE koha_kohadev;
  restart_all
2. KOHA_TESTING=1 prove t/db_dependent/selenium/00-onboarding.t
3. Repeat 1
2. KOHA_TESTING=1 prove t/db_dependent/selenium/01-installation.t

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 63eb2e1f4a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:25 +02:00
Paul Derscheid a52239172b
Bug 40305: DBRev 25.05.03.005
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:25 +02:00
Martin Renvoize 4e596b8fff
Bug 40305: Add database update to fix existing notice templates
This database update fixes existing RECEIPT and ACCOUNT_CREDIT notice
templates that may still use the old 'collected' variable instead of
'tendered'. It handles various formatting patterns and provides
verification that the conversion was successful.

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 4b300b1c1d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:24 +02:00
Martin Renvoize 86b3f2f08e
Bug 40305: Fix 'tendered' vs 'collected' variable name inconsistency
"One Ring to rule them all, one Ring to find them, One Ring to bring
them all and in the darkness bind them"

We've been battling against this for years, with a mixed use of
terminology and thus confusion in templates vs controllers and notice
templates.  I've decided to just try and make sure all the terminology
matches throughout, and use the more popular 'tendered' term over the
'collected' term.

This patch standardizes the terminology used throughout the payment
  system to consistently use 'tendered' instead of the mixed usage of
  'collected' and 'tendered' that has caused confusion over the years.

Changes include:
  - Update all payment form templates to use 'tendered' input names
  - Update JavaScript validation and change calculation logic
  - Update controller parameter handling in pos/pay.pl, pos/printreceipt.pl,
    and members/paycollect.pl
  - Update sample notice templates (RECEIPT) to use 'tendered' variable
  - Add null check for $total_tendered to prevent perl warnings

Test plan:
  1. Test Point of Sale payments with tendered amounts and change calculation
  2. Test member account payments with tendered amounts
  3. Test receipt generation (both print and email)
  4. Verify JavaScript validation works correctly
  5. Confirm no perl warnings when tendered amount is undefined

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 f91310306c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-16 14:02:24 +02:00