Commit Graph

59934 Commits

Author SHA1 Message Date
Chloe Zermatten a2d968e1aa
Bug 38876: (Rmaint follow-up) remove redundant atomic update file
Signed-off-by: Chloe Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-04 10:15:22 +00:00
Chloe Zermatten 9bdddf2273
Bug 41332: (Rmaint follow-up) remove redundant atomic update file
Signed-off-by: Chloe Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-04 10:14:30 +00:00
Chloe Zermatten 6217447544
Bug 41409: (Rmaint follow-up) remove redundant atomic update file
Signed-off-by: Chloe Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-04 10:13:25 +00:00
Chloe Zermatten 788089d9f1
Bug 38876: DBRev 25.11.01.003
Signed-off-by: Chloe Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 13:42:37 +00:00
Jessica Zairo 287abb41df
Bug 38876: (follow-up) fix db rev
syntax was wrong for dbrev
To test apply patches
dbic
updatedatatbase
koha-mysql kohadev
select * from systempreferences where variable='UpdateNotForLoanStatusOnCheckout';
confirm the updated description

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e8dca2a842)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 13:42:05 +00:00
Jessica Zairo b27388c24b
Bug 38876: (QA follow-up) automicupdate
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eebb1595d7)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 13:31:50 +00:00
Jessica Zairo 154ac33b28
Bug 38876: Fixed typo in descrption of UpdateNotForLoanStatusOnCheckout
Test Plan
1. Before applying, navigate to administration->system preferences ->
   UpdateNotForLoanStatusOnCheckout
2. Observe the language in the description "When an item is checked out,
   if the not for loan value on the left matches the items not for loan
   value it will be updated to the right-hand value"
3. Apply the patch
4. Navigate to administration->system preferences ->
   UpdateNotForLoanStatusOnCheckout
5. Observe the language in the description has been updated to "When an
   item is checked out, if its not for loan value matches the value on
   the left, then the items not for loan value will be updated to the
   value on the right"
6. Do a reset all and confirm the language is correct

Signed-off-by: Andrew Auld <andrew.auld@openfifth.co.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fdcb5fd500)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 13:28:58 +00:00
Jonathan Druart 3cc7f357cd
Bug 41546: Restore the ability to unarchive suggestions
There is a TT condition that has not been moved to JS.

Test plan:
Create a suggestion, archive it
List suggestions and tick "include archived"
Notice that with this patch applied you are able to unarchive the
suggestion

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 69c8a91cd9)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 13:27:37 +00:00
Hammat Wele 36372dbaf7
Bug 41102: Error 500 on the About page when biblioserver Zebra configuration is missing
When either the <listen id=biblioserver> entry or the
<server id=biblioserver listenref=biblioserver> section
is not present in koha-conf.xml, the Staff interface > About page
triggers a 500 Internal Server Error.

Test plan:
1. Edit koha-conf.xml and Comment out:
   <!--<listen id="biblioserver">unix:/path/to/zebradb/bibliosocket</listen>-->
2. Restart Apache: sudo systemctl restart apache2 (or restart_all)
3. Go to Intranet > About
   ==> Internal Server Error (500)
4. Now restore the <listen> line and instead comment out the entire
   <server id=biblioserver listenref=biblioserver>...</server> block.
   (Note that the commenting around <!-- The stuff below is used to enable SRU...
    interferes with adding a closing comment after </server> -
    close the comment before that section and add a comment around </server>.)
5. Repeat step 2, 3
   ==> Internal Server Error (500)
6. Apply the patch
7. Repeat step 2, 3
   ==> There is no Error (500)
       Note: Zebra status: Error message from Zebra: 10004
8. Uncomment <server id=biblioserver  listenref=biblioserver> </server>
   and Repeat Step 1
9. Repeat step 2, 3
   ==> There is no Error (500)
       Note: Zebra status: Zebra server seems not to be available. Is it started?

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 03fc6994a5)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 13:25:45 +00:00
Chloe Zermatten 0cafc1134c
Bug 41332: DBRev 25.11.01.002
Signed-off-by: Chloe Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 13:22:44 +00:00
Andreas Roussos 2760b6eb6f
Bug 41332: Add Greek to KohaManualLanguage system preference
The Koha Manual has been translated into Greek:
https://koha-community.org/manual/latest/el/html/index.html

However, 'Greek' is missing from the list of languages
available in the 'KohaManualLanguage' System Preference.

This patch fixes that.

Test plan:

1) Without the patch, visit Administration > System preferences >
   Enhanced content, and under the 'Manual' section notice that
   'Greek' is missing from the options of the 'KohaManualLanguage'
   syspref dropdown.
2) Apply the patch, and run updatedatabase.pl
   The 'KohaManualLanguage' dropdown should now list 'Greek'.

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 231a70ee45)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 13:04:32 +00:00
Lucas Gass 63cb2f8a36
Bug 41329: Update yarn.lock
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fc1104c912)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 12:52:55 +00:00
Matt Blenkinsop 03be603cd0
Bug 41523: Improve the output from db rev 251200002
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f7a02a6164)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 12:46:00 +00:00
Martin Renvoize c29ded1b34
Bug 41520: Filter out record_table from AdditionalFieldValue API responses
Bug 35451 added a record_table field to the additional_field_values
database table for performance optimization (better joins). However,
this field was not added to the OpenAPI schema, and with
additionalProperties: false, the API validator rejects responses
containing it.

Rather than adding this internal implementation detail to the public
API schema, this patch adds a custom to_api method to
Koha::AdditionalFieldValue that filters out the record_table field.

This approach:
1. Keeps the database optimization from Bug 35451
2. Prevents internal implementation details from cluttering the API
3. Maintains context that API consumers already have from parent objects
4. Fixes OpenAPI validation errors for ERM agreements, licenses, and
   packages using extended_attributes

Test plan:
1. Create an ERM agreement with additional fields/extended attributes
2. Access the agreement via the API with extended_attributes embedded
3. Verify the response includes extended_attributes but not record_table
4. Confirm no OpenAPI validation warnings in plack-api-error.log
5. prove t/db_dependent/api/v1/erm_agreements.t
6. Verify all tests pass

Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 60d84f91e6)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 12:09:09 +00:00
Martin Renvoize 04693febd7
Bug 41520: Add tests for extended_attributes in ERM agreements API
This patch adds api unit tests for the extended_attributes functionality in the
ERM agreements API to ensure that:

1. Extended attributes are correctly returned when embedded
2. The internal record_table field is not exposed via the API
3. Both single GET and list endpoints work correctly with extended_attributes

Test plan:
1. prove t/db_dependent/api/v1/erm_agreements.t
2. Verify all tests pass

Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c77b6b1a66)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 12:07:41 +00:00
David Nind 4c1073577a
Bug 41494: Rename "Koha administration" module name to "Administration"
This changes "Koha administration" to "Administration" on the
staff interface home page and the administration module home page.

Everywhere else in the staff interface, such as browser page titles
and breadcrumbs, administration is used.

This improves consistency, and is how it is commonly referred to.

It also change some other occurences in the code base, such
as code comments.

Test plan:
1. Note the inconsistencies in how we name and refer to the
   administration module:
   1.1 Staff interface home page: Koha administration
   1.2 Administration module home page: Koha administration, but note
       that the breadcrumb and browser page title is "Administration".
   1.3 Breadcrumbs and browser page titles for any of the administration
       areas are just "Administration".
   1.4 More > Administration.
2. Apply the patch.
3. Note that on the staff interface home page and the administration
   home page are now labelled "Administration".

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ef2f7524c0)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 12:03:45 +00:00
Lucas Gass 438a891a1a
Bug 41484: Clarify strings in checkouts.js
To test:
1. APPLY PATCH, clear browser cache.
2. Turn on UseRecalls
3. Turn on EnableBookings, make the item type bookable via item type administration.
4. Check 3 things out to a paton.
5. Put one item on hold, recall one, and book one.
6. Look at the renew and checkin columns on the issues table. They should now read:

-Item on hold for another patron
-Item booked for another patron
-Item recalled by another patron

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6ea77ba89a)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 12:01:40 +00:00
Tomás Cohen Arazi 6a43bc4872
Bug 41362: Allow Cypress tests to use KOHA_USER and KOHA_PASS as override
The cypress.config.ts file had hardcoded API credentials (koha:koha)
which don't work in KTD environments that use different credentials.

This patch makes the config use KOHA_USER and KOHA_PASS environment
variables if set, falling back to koha:koha if not.

Test plan:
1. On a running KTD, run the cypress tests:
   $ ktd --shell
  k$ run_cypress
=> SUCCESS: Tests are run, no errors about credentials
2. Edit your KTD .env file, so KOHA_USER=tcohen, KOHA_PASS=tomasito
3. Shut your kTD down, and start a fresh one
4. Repeat 1
=> SUCCESS: The command shows `cypress run --env KOHA_USER=tcohen,KOHA_PASS=tomasito` is run.
=> FAIL: Some tests fail right away with invalid credentials error
5. Apply this patch
6. Repeat 1
=> SUCCESS: Same command as 4
=> SUCCESS: Tests don't fail for credentials
7. Sign off :-D

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit af4c4a33ed)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 11:59:44 +00:00
Jonathan Druart 27576675d7
Bug 41329: Add datatables.net@^1.13.1 jquery@^3.6.0
warning " > datatables.net-vue3@2.1.3" has unmet peer dependency "datatables.net@^1.13.1".
warning " > datatables.net-vue3@2.1.3" has unmet peer dependency "jquery@^3.6.0".

Test plan:
yarn build should not show those 2 warnings after this patch is applied

@RM: You will need to push yarn.lock as well

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fee1396744)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 11:57:28 +00:00
Caroline Cyr La Rose a9c301360b
Bug 41190: Add space in "Default checkout, hold and return policy" title
This patch adds a space in the title "Default checkout, hold and return
policy" in the circulation rules page.

To test:
1. Go to Administration > Circulation and fine rules
2. Select a library (e.g. Centerville)
3. Scroll down to the second table
   --> Note the title of the section is
   "Default checkout, hold and return policyfor Centerville" with a
   space missing between "policy" and "for"
4. Apply the patch
5. Refresh the page
   --> The title should now look normal with all the spaces!
   "Default checkout, hold and return policy for Centerville"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1decca5f54)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 11:53:26 +00:00
Tomás Cohen Arazi 3651d301dd
Bug 40446: Allow overriding Cypress DB settings
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>

Amended-by: Jonathan Druart
tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8b594db9c4)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 11:51:08 +00:00
Owen Leonard 1e6261f215
Bug 38739: (follow-up) Remove extra messages.inc include
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e856754c50)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 11:46:22 +00:00
Jonathan Druart d6d03684dc
Bug 38739: Fix tools/batch_modify_holds.tt
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2f5f801ad6)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 11:45:35 +00:00
Jonathan Druart c884b00f34
Bug 38739: Fix basket/basket.tt
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 877e117e26)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 11:45:02 +00:00
Jonathan Druart 6a56f52451
Bug 38739: Fix some other wrong templates
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 03dd0759fe)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 11:44:29 +00:00
Jonathan Druart d5448dd4ac
Bug 38739: Fix admin/file_transports.pl
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7d8f11c3f1)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 11:43:43 +00:00
Jonathan Druart 78e79998c5
Bug 38739: Fix mana-report-search-result.inc
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3a1836be81)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 11:42:57 +00:00
Aleisha Amohia d75437077e
Bug 16131: Show branch transfer error messages in separate alert boxes
Currently error messages show in one alert box as bullet points. When
there is only one error shown, this looks a bit strange to have a list
with one item. This enhancement displays each error message as its own
alert box.

To test:

1. Check out a Centerville item to someone in Centerville. For example,
   check out 39999000004175 to yourself.
2. Go to Circulation -> Transfers. Enter the barcode 39999000004175 and
   transfer the item to Centerville.
3. Confirm two error messages are shown, with one blue box for each.

4. Go to Koha administration -> System preferences. Set
   UseBranchTransferLimits to Enforce and BranchTransferLimitsType to
   collection code.
5. Go to Koha administration -> Library transfer limits. Go to the REF
   tab and uncheck the Allow transfer? box for FFL - Fairfield, then hit
   Save
6. Go to Circulation -> Transfers. Enter the barcode 39999000004175 and
   transfer the item to Fairfield.
7. Confirm the error message shows in a blue box with no bullet point.
8. Type something random in the item barcode box and click Transfer.
9. Confirm the error message shows in a blue box with no bullet point.

Sponsored-by: Catalyst IT
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 b9953974fb)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 11:38:43 +00:00
Matt Blenkinsop 8eec3943cc
Bug 41411: Remove the input length restriction on streetnumber
Test plan:
1) In the intranet, try to add a new patron
2) When typing into the streetnumber field, the string will be
   truncated after 10 characters
3) Try the same in the OPAC, the field will be limited
4) Repeat for the streetnumber for the alternate addresses
5) Apply patch
6) Repeat steps 1-4, the field should now accept a longer string

Sponsored-by Cheshire West and Chester Council

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 d3df2cce0f)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 11:23:41 +00:00
Chloe Zermatten df11e16950
Bug 41409: DBRev 25.11.01.001
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 10:31:17 +00:00
Matt Blenkinsop 8a546ea580
Bug 41409: Convert streetnumber and B_streetnumber to tinytext
Test plan:
1) Run 'updatedatabase'
2) No errors should be thrown

Sponsored-by: Cheshire West and Chester Council
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 366ce3f08e)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-03 10:30:27 +00:00
Jacob O'Mara fcf6199705
(RMaint follow up): make suggestion.pl & opac-patron-consent.pl executable
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-29 15:29:00 +00:00
Jacob O'Mara da75da8c5d
(RMaint follow up): make 251101000.pl executable
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-29 15:11:10 +00:00
Jacob O'Mara c70b1d1a5e
Update release notes for 25.11.01 release
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-28 11:23:21 +00:00
Jacob O'Mara af6de22633
Increment version for 25.11.01 release
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-28 10:00:15 +00:00
David Cook b1917a70c0
Bug 41662: Prevent CSRF on opac-patron-consent.pl
This change prevents CSRF on opac-patron-consent.pl by
adding checking of the "op".

Test plan:
0. Apply the patch and koha-plack --restart kohadev
1. Set system preference PrivacyPolicyConsent to "permissive"
2. Log into the OPAC and go to this path:
/cgi-bin/koha/opac-patron-consent.pl?check_GDPR_PROCESSING=1
3. Note that it doesn't change the consent
4. Go to this path:
/cgi-bin/koha/opac-patron-consent.pl?check_GDPR_PROCESSING=0
5. Note that it doesn't change the consent
6. Click the "Yes" radio button and click "Save"
7. Note it changes the consent to Yes
8. Click the "No" radio button and click "Save"
9. Note it changes the consent to No

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-28 09:59:19 +00:00
Lisette Scheer 0b804e8f85
Bug 41593: (QA follow-up) Move cypress test
This patch moves the cypress test into the Acqusitions folder to help keep t/cypress/integration organized as we add more tests.

Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-28 09:59:11 +00:00
Jonathan Druart c1d4162a8b
Bug 41593: Add a Cypress test
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-28 09:58:18 +00:00
David Cook a80f3429f0
Bug 41593: Validate displayby parameter in suggestion.pl
This change validates the displayby parameter in suggestion.pl
in order to prevent SQL injection.

Test plan:
0. Do not apply the patch
1. Log into the staff interface
2. Visit the path /cgi-bin/koha/suggestion/suggestion.pl?
op=else&displayby=status+AND+EXTRACTVALUE(1,CONCAT(0x7e,@@version))
3. Notice a 500 error is generated
4. In the error logs, the MySQL version number will appear

5. Apply the patch
6. koha-plack --restart kohadev

7. Visit the path /cgi-bin/koha/suggestion/suggestion.pl?
op=else&displayby=status+AND+EXTRACTVALUE(1,CONCAT(0x7e,@@version))
8. Notice that no error is generated
9. Try each of the "Organize by" options on the left nav bar
10. Note that none of them generate an error and that the option is
retained after clicking "Go"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-28 09:57:59 +00:00
Jacob O'Mara 2c2c04dfb2
Reapply "Bug 41328: Fix incorrect use of ref in KohaTable.vue"
This reverts commit 6cefe064d4.

Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-27 17:36:12 +00:00
Jacob O'Mara 6cefe064d4
Revert "Bug 41328: Fix incorrect use of ref in KohaTable.vue"
This reverts commit 6a8b160a2f.

Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-26 13:40:52 +00:00
Jacob O'Mara 695743328b
Bug 38426: (RMaint follow-up) update package.json and yarn lock
Clamp @types/express to v4.17.13 as there is a circular dep in v5
causing builds to fail

Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-25 20:32:31 +00:00
Lucas Gass 4d3e5f4c98
Bug 39014: Remove unnecessary tests
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 94ba3d5344)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-16 17:10:57 +00:00
Lari Taskula f4d343bcd7
Bug 39014: (follow-up) Refactoring and renaming to can_be_guaranteed_by
To test:
1. prove t/db_dependent/Koha/Patron.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 d214d441a8)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-16 17:10:49 +00:00
Emmi Takkinen 32354c3370
Bug 39014: Add new method validate_guarantor
Adding a new guarantee and storing it fails with "Creating a patron"
selected in  TrackLastPatronActivityTriggers when guarantors are set
to be mandatory. The problem comes from Koha::Patron->store called
in update_lastseen. Since we validate guarantor in Koha::Patron->store
but don't store them in there, new call to store fails because it
doesn't receive guarantor info as parameter.

As a solution, we should validate guarantors in separated method.
Validation can't be moved e.g. to Koha::Patron::Relationship->store
since this could lead to situations where guarantee is stored without
guarantor. This patch adds new method validate_guarantor and adjusts
old guarantor requirements tests to match this new method.

To test:
1. Select option "Creating a patron" in "TrackLastPatronActivityTriggers" syspref.
2. Enable syspref "ChildNeedsGuarantor" and make sure you have options in
"borrowerRelationship" syspref.
3. Create a guarantee patron, fill all required fields and add guarantor for patron
(either add Patron guarantor or fill Non-patron guarantor inputs).
4. Attempt to save patron.
=> Error box is displayed with text "The following fields are wrong. Please fix them.".
=> Logs show error "Patron creation failed! - [Child patron needs a guarantor]".
5. Apply this patch.
6. Create a guarantee patron again and save.
=> Patron should be saved correctly.
7. Create a new guarantee patron but this time don't add patron guarantor or fill
non-patron guarantor inputs.
8. Attempt to save patron.
=> Save should fail with error "A child patron needs a guarantor."
9. Add patron guarantor who can also be a guarantee and save.
=> Save should fail with error "A guarantor cannot be a guarantee."

Also prove t/db_dependent/Koha/Patron.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 382ba17a8c)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-16 17:10:48 +00:00
Lucas Gass 2d5e288bb9
Bug 41456: (follow-up) Change item_type to item_type_id and add _strings in test data
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c1efa1f810)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-16 17:08:39 +00:00
Jonathan Druart 8e87a7fa5c
Bug 41456: Rename more item_type => item_type_id in hold's api spec
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f47ab213fd)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-16 17:08:24 +00:00
Jonathan Druart a97137a9d2
Bug 41456: Fix item type searching and filtering on the holds history table
Use should use coded_values for the library and item type column so that
we can search using the code and the description.

With this patch we now have a dropdown list with the libraries and item
types in the table's headers.

Test plan:
0. Turn on AllowHoldItemTypeSelection
1. Create a hold and select an item type
Note: I think there is a bug if you select it from "Hold next available
item", use "Hold details". Please confirm?
2. Go to the holds history view
3. Filter and search by item type description and code. Same for
   library.
   Use the dropdown list in the headers.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 66d92ba6c6)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-16 17:08:16 +00:00
Martin Renvoize c0bb19f1cd
Bug 41404: (QA follow-up) Add tests for empty string and zero edge cases
This QA follow-up adds comprehensive test coverage for edge cases that
the original patch handles:

1. Empty string values ('') - the default value in sysprefs
   - Verifies that empty strings are treated as "not set"
   - Confirms charge calculations are skipped (performance optimization)
   - Ensures patrons are not blocked

2. Zero values (0) - valid numeric limit
   - Verifies that zero triggers charge calculation (valid number)
   - Confirms patrons are not blocked (0 means "no limit")
   - Documents intended behavior that 0 disables blocking

3. Positive numeric values - normal case
   - Confirms charges are calculated and blocking works correctly

These tests validate that looks_like_number() is the correct approach
rather than simple truthiness checking, as it properly distinguishes
between:
- Empty string '' (not a number, skip calculation)
- Zero 0 (is a number, calculate but don't block)

Test plan:
1. Apply this patch
2. Run the tests:
   prove t/db_dependent/Koha/Patron.t
3. Verify all tests pass

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5810633b67)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-16 17:02:44 +00:00
Nick Clemens eb6cefae4e
Bug 41404: Use looks_like_a_number to verify if prefs are set
This check adds a check to ensure we have number, not just defined

To test:
1 - Apply only unit tests patch
2 - Run the tests
    prove -v t/db_dependent/Koha/Patron.t
3 - Apply this patch
4 - Run the tests
5 - They pass!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 154f807f6b)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-01-16 17:02:43 +00:00