Commit Graph

60423 Commits

Author SHA1 Message Date
Jan Kissig 405b8ade7f
Bug 28297: Allow syspref text fields to be saved when content changed to original value
This fixes the behavior on changed system preferences in HTML input text fields. Preferences which are changed back to the original value can be saved now without reloading the system pref page.
This will only affect input fields with type=text as they have the property defaultValue which is checked to highlight a field as 'modified'.

Testplan:
a) take a syspref with an HTML text input field f.e. AccessControlAllowOrigin
b) write '*' into the iput field. Notice that the preference is marked 'modified'. Click 'save'
c) now got to the text field again and delete that '*'. Notice the preference does not get marked as modified and can theefore not be saved.
d) apply patch and reload page
e) repeat b) and c) and notice that the preference gets marked 'modified' on both cases.

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 581c9b39bb)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Laura_Escamilla 663d263c17
Bug 42142: Improve accessibility of login settings toggle button
Test plan:
1. Log in to the staff interface
2. Click on the logged in menu dropdown
3. View source or inspect the markup for the login settings toggle
   (gear button)
4. Confirm the icon element has aria-label="Toggle panel for login
   settings"
5. Confirm the interactive element does not expose aria-expanded
6. Paste the page source into the W3C Markup Validation Service
7. Confirm the validator reports that aria-label must not be specified
   on the i element

Apply the patch:
8. Repeat steps 1-3
9. Confirm the aria-label has been moved from the i element to the
   toggle link
10. Confirm the i element now uses aria-hidden="true"
11. Confirm the toggle exposes aria-expanded="false" before opening the
    panel
12. Activate the login settings toggle
13. Confirm the panel opens and aria-expanded changes to "true"
14. Activate the toggle again
15. Confirm the panel closes and aria-expanded changes back to "false"
16. Paste the updated page source into the W3C Markup Validation Service
17. Confirm the validator error is resolved
18. Sign off and have a great day!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b4c3352f33)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Jonathan Druart 7590de142d
Bug 41476: Fix plugins table when one of the plugin has errors
I've tried to install one of my old plugin and it exploded.

https://gitlab.com/joubu/koha-plugin-jump

Test plan:
Install a broken plugin and notice the Datatable error on the plugins
list
With this patch applied the error is gone

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit daa1b20312)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Lucas Gass cf543d0010
Bug 41880: Add a unit test for item level holds logging
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 7fd1ff8e89)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Lucas Gass e65eea1690
Bug 41880: Add a unit test
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 27b76f9bf3)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Lucas Gass 57251668af
Bug 41880: Keep original copy of hold for proper logging
To test:
0. APPLY PATCH, restart_all.
1. Make sure HoldsLog is enabled
2. Place a record/bib level hold on bib A.
3. Move the hold to bib B.
4. Look at the diff column in the holds log. You should see the Old (0) biblionumber and the New (N) biblionumber. You should see nothing about itemnumber because this is a record level hold.
5. Ensure that the New and Old biblionumbers are the correct ones.
6. Place an item level hold on item A.
7. Mobe the hold to item B
8. Look at the diff column in the holds log. You should see the Old (0) biblionumber and the New (N) biblionumber. You should also see the New and Old itemnumbers since this is an item level hold.
8. Ensure that the New and Old biblionumbers AND the New and Old itemnumbers are correct.

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 8357a8f074)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Pedro Amorim e76356bfbf
Bug 42238: Fix loading 'holds' tab when navigating with hash
I don't know what caused this to stop working. Possibly a change in the
markup due to a bootstrap upgrade?

Test plan:

Before applying patch:
1) Place any hold for Henry, link to help:
   <staff_url>/cgi-bin/koha/reserve/request.pl?biblionumber=76&findborrower=23529000035676
2) Open a new tab and visit the Patron details page directly on the
   'Holds' tab:
   <staff_url>/cgi-bin/koha/members/moremember.pl?borrowernumber=19#holds_panel
3) Notice it activates the correct tab, but doesn't load the table.
4) Open a new tab again, this time visit the Patron 'Check out' page
   directly on the 'Holds' tab:
   <staff_url>/cgi-bin/koha/circ/circulation.pl?borrowernumber=19#holds_panel
5) Notice the same behavior (tab activates, no table is loaded).
6) Apply patch. Repeat test plan. Confirm table loads on both
   occasions.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a4903946ca)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Jake Deery e54acd4c30
Bug 42175: Fix Mojo under k.t.d
This patch fixes Mojo under k.t.d by providing CGI::Compile with an
absolute rather than relative path.

TO TEST:
== APPLY PATCH ==
a)  run reset_all
b)  run apachectl stop (if apache does not stop, may need to `sudo kill -9 apache2`)
c)  run /kohadevbox/koha/bin/opac prefork -m production -p -l http://*:8080 &
c)  run /kohadevbox/koha/bin/intranet prefork -m production -p -l http://*:8081 &
d)  confirm you can use k.t.d. as normal
== SIGN OFF ==

Signed-off-by: Eric Phetteplace <ephetteplace@cca.edu>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5187bd52b9)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Lucas Gass 7e4d3b646e
Bug 42182: Fix branch limitation on reports-home.tt
1- Create a StaffReportsHome HTML customization
2- Limit it by branch
3- Log into that branch and to to the reports home page
4- No HTML customization
5. APPLY PATCH
6. Try again, this time you should see the HTML customization.

Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f6addef698)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Maryse Simard 542786c484
Bug 41783: Encode query parameters for suggestions filtering
When filtering by bibliographic information in the sidebar of the
suggestions management page, the '%' contained in the query is
not encoded. This can lead to errors if the search terms can be
evaluated as an encoded character.

Test plan:
    1. Go to Acquisitions > Suggestions
    2. Create a suggestion with a title like "200 recipes"
    3. In "Filter by" > Bibliographic information, search for "200"
    4. No results are shown in the table
    5. Apply the patch
    6. Search again (step 3). The suggestion should appear in the list.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 61cffdc9f3)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Roman Dolny bbbea91aa9
Bug 41938: Argument "" isn't numeric in numeric gt (>) ... warnings in circulation.tt
The warnings:

[WARN] Argument "" isn't numeric in numeric gt (>) at
/kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
 line 1072.
[WARN] Argument "" isn't numeric in numeric gt (>) at
/kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
 line 1188.

appears in the plack-intranet-error.log.

Test plan:
==========
1. Use a fresh KTD, observe plack-intranet-error.log.
2. Find any patron and go to "Check out" tab.
==> Warnings should appear in plack-intranet-error.log
3. Apply the patch; restart_all.
4. Repeat 2. No warnings in plack-intranet-error.log

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 656da5cb4b)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Lucas Gass 3a6f0e55e1
Bug 41267: (follow-up) Check if exists
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9539b21089)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Nick Clemens 76e69eb566
Bug 41267: (follow-up) Add more clarifying text
Signed-off-by: Andrew Auld <andrew.auld@openfifth.co.uk>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2c253faf2d)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Nick Clemens c7ce11d9e0
Bug 41267: Add fill_other_biblio_holds_policy circulation rule
This patch adds a new rule for itemtypes to allow/prevent filling other holds on a bibliographic record
The rule will obey ReservesControlBranch for determining the rules

To test:
 1 - Apply patches
 2 - Setup/choose 2 item types in Administration->Item types
 3 - In Administration -> Circulation and fine rules scroll to the bottom
 4 - Set one item type to "Fill other holds on record" = 'Yes' and the other to 'No'
 5 - Place a next available hold on the record
 6 - Checkout the 'Yes' item type to the patron
 7 - Their hold should fill
 8 - Check in the items
 9 - Place a next available hold on the record
10 - Checkout the 'No' itemtype to the patron
11 - Their hold should not be filled
12 - Check in the item and confirm the hold
13 - Checkout the itme to the patron, the hold fills
     NOTE: While seemingly counter intuitive, the rule controls whether a hold NOT tied to this item will fill
     Confirming the hold adds an itemnumber to the hold. In most cases, these items will not be holdable, so won't trigger at checkin
14 - Set a rule for the patrons branch to No and set system preference ReservesControlBranch to 'Patrons library'
15 - repeat 5&6
16 - The hold should not fill
17 - Change reserves control branch to items home library
18 - checkin /checkout the yes item type
19 - The hold should fill

Signed-off-by: Andrew Auld <andrew.auld@openfifth.co.uk>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 876869544f)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Kevin Carnes 36fcd33c60
Bug 21941: Fix GROUP BY in circ/reserveratios.pl
When using strict_sql_modes, the Hold ratios page causes an Incorrect
GROUP BY error and returns an Error 500.

This patch removes uncessary columns from the database query and adds
the biblio columns to the GROUP BY statement, so they can be selected.
Since it's already grouped by biblionumber, it should not cause any
additional rows to be created.

Test plan:
1. Make sure that strict_sql_modes is enabled in the koha-conf.xml
   file.
2. Place at least one hold on a book.
3. Go to Circulation and select Hold ratios.
4. Observe that you get an Error 500.
5. Apply patch.
6. Repeat step 3.
7. Observe that you can view the page.
8. If the table is empty, change the ratio to 1.
9. Sign off.

Sponsored-by: Lund University Library
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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 ea4600476e)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Paul Derscheid d0b6522041
Bug 15792: Throttle patron renewal links to prevent double-clicks
- Replace plain <a> renewal links in patron_messages.inc with the
  reusable throttled-button component introduced in Bug 40896
- Covers all four renewal links: warndeparture and expired states,
  in both circulation and patron detail contexts
- Include throttledButton.js in circulation.tt and moremember.tt
- Add persist mode and done icon state to throttled-button component
  so the button stays disabled on bfcache restore with a check icon
  instead of a misleading spinner

Test plan:
1) Create or update a patron category with an enrollment fee and an
   enrollment period in months (e.g. 24 months)
2) Create a patron of that type and write off any initial enrollment
   fee
3) Set the patron's dateexpiry to the past so the account is expired
4) Go to /cgi-bin/koha/circ/circulation.pl and scan the patron
5) Observe the "Renew" link in the expiration warning now shows as a
   small button with a rotate icon
6) Click "Renew" and confirm the button becomes disabled with a
   spinner, preventing a second click
7) Verify the patron is renewed correctly with only one enrollment
   fee charged and the correct expiry date
8) Press the browser back button to return via bfcache
9) Verify the button remains disabled and shows a check icon instead
   of the spinner, indicating the action was already completed
10) Repeat from the patron detail page (moremember.pl) to verify the
    same throttle and done-state behavior there
11) Test the warndeparture case by setting dateexpiry to a near-future
    date and confirming the same behavior

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 3a6a79a607)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Owen Leonard 79bec7da95
Bug 42017: Fix content type of OPAC news RSS
This patch updates opac-news-rss.pl so that it outputs data with the
correct content type, text/xml.

To reproduce you must have at least one news item in your system. From
the OPAC main page, click the RSS feed link.
  - If you are using Firefox or Chrome you will see unstyled plain test
    on the screen.
You may or may not be able to see the problem if your
browser (e.g. Vivaldi) has a built-in RSS reader.

To test, apply the patch and restart services.

- In the OPAC, from the main page, click the RSS feed link at the bottom
  of the OPAC news list.
- You should see the XML view of the feed. This confirms that the
  browser is receiving the correct content type.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 96d2287a6a)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Martin Renvoize afa67532ea
Bug 41980: (follow-up) Fix Cypress test ambiguous field code search
Typing "CE" in the allow_fields dropdown now matches both
"CE - Unused" and "AY - Sequence number" (case-insensitive
match on "ce" in "Sequence"), causing the wrong option to be
selected. Use "CE - " to uniquely target the intended option.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit d35f76316d)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Martin Renvoize c5956d907c
Bug 41980: (Follow-up) Improve SIP2 field code descriptions
- Use sentence case for all dropdown descriptions
- Add 'Unused' descriptions for AR, AW, AX, BA, BB, BC, BJ, CE
- Move SIP field codes outside translatable strings to avoid
  untranslatable codes being sent to translators
- Update AE/AV/DA tooltip text: use 'Template Toolkit' (not
  'Template::Toolkit'), imperative form, and clearer object
  field descriptions

Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit ed3f0dcab2)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Martin Renvoize 8172fc738d
Bug 41980: Add more descriptive labels to SIP2 field codes
- Add field name labels to all entries in getSIPFields() used by the
  Allow/Hide fields dropdowns (e.g. "CV - Alert Type" instead of "CV")
  sourced from C4::SIP::Sip::Constants field identifier names
- Add tooltips to ae_field_template, av_field_template and
  da_field_template explaining what each SIP field represents and
  which Template::Toolkit objects are available
- Improve ct_always_send tooltip to explain CT is Destination Location
- Improve cv_send_00_on_success tooltip to explain CV alert type codes
- Improve cv_triggers_alert tooltip to clarify the two alert behaviours
- Improve cr_item_field tooltip to explain CR is Collection Code

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 780ae2d3e3)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
David Cook b6e4bccf39
Bug 42072: Improve message about deleting bib records
This patch clarifies which records will be deleted in
the batch item deletion (when no items remain).

Test plan:
0. Apply the patch
1. Go to "Reports" and click "Create from SQL"
2. Create a report with the following SQL:
select itemnumber from items limit 5
3. Run the report and then click "Batch operations with 5 visible records"
on the output page
4. Near the bottom of the screen note that there is a checkbox that
has a label reading "Delete bibliographic records if no items remain."
5. C'est tout!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 11de56769b)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Janusz Kaczmarek 128a07749e
Bug 41759: The display of MARC 21 field 026 data (Fingerprint Identifier) is missing (both in intranet and OPAC)
Test plan
=========
1. Make field 026 active for Editor in MARC framework section (e.g. in default
   framework).
2. Edit any bibliographic record (with modified framework) adding 026 field data,
   e.g. 026 ## $a urdu esrt $b eses jecl $c 1790
3. Verify in Normal view (intranet) and in OPAC that you are unable to
   see the inserted data.
4. Apply the patch ; restart_all.
5. Verify in Normal view (intranet) and in OPAC that you are now able to
   see the fingerprint information from 026 field.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 0dc06596e2)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Janusz Kaczmarek 555c41ab48
Bug 41758: Add Fingerprint Identifier data to Elasticsearch index mappings
Libraries cataloguing older monographic resources request fingerprint indexing.

In MARC 21, it would be the content of field 026, in UNIMARC - 012.

Test plan
=========
1. Start up KTD with Elasticsearch: ktd --search-engine es8 up -d
2. Make field 026 active for Editor in MARC framework section (e.g. in default
   framework).
3. Edit any bibliographic record (with modified framework) adding 026 field data,
   e.g. 026 ## $a urdu esrt $b eses jecl $c 1790
4. Verify that you are unable to find the record searching with fingerprint data.
5. Apply the patch ; restart_all.
6. Reindex with: koha-elasticsearch --rebuild -r -d kohadev
7. Now you should be able to find the record searching with fingerprint data
   (performing a general search or prefixed with 'fingerprint-identifier:').

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 71af0f01d1)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Owen Leonard 951426853c
Bug 42134: String displays incorrectly: words “notices” and “for” appear concatenated
This patch changes the way the notices template checks for the existence
of the TranslateNotices system preference in order to avoid a missing
space in the corresponding label.

To test you should have at least two languages enabled under the
StaffInterfaceLanguages system preference.

- Apply the patch and go to Administration -> System preferences..
- Locate the TranslateNotices preference and set it to "Allow"
- Go to Tools -> Notices and edit a notice.
- The "Modify notice" page should have tabs each of your enabled
  languages as well as "Default."
- Each tab should have a "Format" section. Expand it and check that the
  label for the checkbox at the bottom is correct, e.g. "Apply format
  settings to all notices for this language."
- Return to system preferences and set TranslateNotices to "Don't
  allow."
- Reload the notice edit screen and check the "Format" section. The
  label should now read "Apply format settings to all notices."

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 4cdce0479c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Jacob O'Mara ef240151c9
DBRev 25.11.04.004
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Nick Clemens beed97eec9
Bug 28884: (QA follow-up) Add some missing pod
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit cc0e314f72)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Janusz Kaczmarek dfbba75c0f
Bug 28884: Add 'ElasticsearchEscapeCharacters' and 'OpacElasticsearchEscapeCharacters' system preferences
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 388bcec0ac)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Janusz Kaczmarek 5b60b8c15a
Bug 28884: Unit tests
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 3b1566b402)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Janusz Kaczmarek cd0e848a43
Bug 28884: ElasticSearch: Question mark in title search returns no results
Test plan:
==========
1. Have a ktd instance with Elasticsearch enabled.
2. In standard ktd installation there is a record with a title
   "Typical girls? : the story of the Slits." (with question mark
   attached to a word) - biblio # 229. We will try to find it.
3. Go to advanced search (OPAC or intranet) and try a *title* search
   with:
   Typical girls? the story of the Slits
   You should get no results.
   From the main page try a ccl-style search:
   ti:Typical girls? the story of the Slits
   You should get no results too.
4. Apply the patch ; updatedatabase ; restart_all.
5. Put ? in OpacElasticsearchEscapeCharacters and/or
   ElasticsearchEscapeCharacters system preference.
4. Repeat the searches from p. 3. You should get the record if a
   system preference was set for the given interface.

Sponsored-by: Pontificia Università di San Tommaso d'Aquino (Angelicum)
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 3e5ba1e316)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Emily Lamancusa b0063ab6c2
Bug 42147: Update tests
To test: prove t/db_dependent/Reserves.t

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit ccc5ca534c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Emily Lamancusa 3e8e92831e
Bug 42147: Log all relevant hold data on hold creation
When logging a hold create action, include all hold fields that may be
defined at hold creation.

Fields that are not defined until later (such as found status, waiting
date, etc) are not included to avoid clutter.

To test:
1. System preference setup
    i.  Enable HoldsLog system preference
    ii. Set AllowHoldPolicyOverride to Allow
2. Place a hold in the staff interface
3. View the action logs entry for that hold creation
    i. Go to Tools > Log viewer
    ii. Select Modules: Holds and Action: Create
    iii. Click Submit
--> Note that the "info" column only shows the hold id
4. Apply patch and restart_all
5. Repeat steps 2-3
--> The "info" column should now show hold details

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 83e2c3888d)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
David Nind abc0148985
Bug 41985: Fix wording on SIP2 account form: 'Syspref'
Fix spelling on the SIP2 account form to spell 'Syspref'
section heading in full ('System preference overrides').

Test plan:
1. Go to Administration > Patrons and circulation > Self-service
   circulation (SIP2) > Accounts > New account
2. Note the label for the section is "Syspref overrides".
3. Apply the patch.
4. Rebuild everything: yarn build
5. Hard refresh the page.
6. Note that "Syspref..." is now spelt in full as
   "System preference overrides".

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 5861ecdd0e)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Paul Derscheid 94e9baf077
Bug 42149: (QA follow-up) Add aria-label to shortcut nav
- Add aria-label="Quick shortcuts" to the shortcut nav element
  in both the TT include and the Vue Help component
- Ensures all nav landmarks on the staff interface are
  uniquely labeled for screen readers (WCAG 2.4.1)

To test:
- Apply the patch
- Rebuild vue components with `yarn js:build`
- Open the staff interface home page
- View the page source and confirm the shortcut nav has
  aria-label="Quick shortcuts"
- Confirm that all three nav elements (Main, Breadcrumb,
  Quick shortcuts) have unique aria-labels

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit fa1fa49531)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Brendan Lawlor 4ec36a6288
Bug 42149: Add aria-label to main nav
The main <nav> should have a unique aria-label to differentiate it from the Breadcrumb nav

To test:
1. View page source and confirm there are two <nav> elements
2. Notice the main <nav> does not have a unique aria-label
3. Apply patch and check again
4. Confirm the main <nav> is labeled

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit ac4b2127cc)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Brendan Lawlor 7f27b18ec1
Bug 42143: (follow-up) Remove empty duplicate links from patron breadcrumbs
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 0fe44ec697)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:13 +01:00
Brendan Lawlor 0a474f87a1
Bug 42143: Remove empty duplicate links from patron breadcrumbs
This patch imporves accessibility for screen readers by removing a duplicate empty link
that is rendered in the breadcrumbs on patron pages.
patron-title.inc already includes the links and doesn't need to be wrapped in <a> element.

To test:
1. Go to a patron record and tab through the breadcrumbs
2. Notice there is an empty link that is invisible but gets focus
   between the Patrons and <patron title> breadcrumbs.
3. Check the other tabs to confirm the issue is present
    Accounting, Routing list, Circulation history, Holds history, Notices,
    Statistics and Purchase suggestions
4. Click edit and check the breadcrumbs on that page
5. Enable TwoFactorAuthentication and check the manage two-factor auth page
6. Apply patch
7. Revist the pages from steps 1-5 and tab through the breadcrumbs again
8. Confirm there is no duplicate empty link

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit d7a1141e64)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:13 +01:00
Jacob O'Mara da27301554
DBRev 25.11.04.003
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:13 +01:00
Martin Renvoize 6f43ca12e4
Bug 35380: (QA follow-up) Minor code quality fixes
- Add order_by => ['name'] to record_sources fetch in marc-overlay-rules.pl
  so filter dropdown options are consistently sorted
- Add COMMENT to record_sources.is_system column in kohastructure.sql
  to match convention of other columns in that table
- Remove commented-out Data::Dumper debug lines from biblios.t
- Remove redundant explicit object deletes inside subtests that are
  already wrapped in txn_rollback; the rollback undoes them anyway

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 6aff5f361a)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:13 +01:00
Martin Renvoize 3afef2bbc4
Bug 35380: (QA follow-up) Fix data migration for pre-existing record sources
INSERT IGNORE silently skips rows whose name already exists, leaving
their is_system column at 0. Systems that already had 'intranet',
'z3950' etc. as record sources would not have them protected from
deletion. Added an explicit UPDATE after the INSERT to ensure all
known system record source names have is_system=1 regardless of
whether the row was just inserted or already existed.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 38c7696866)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:13 +01:00
Martin Renvoize 13412e87ba
Bug 35380: (QA follow-up) Fix bulkmarkimport typo in marc-overlay-rules.tt
The CASE checks for 'bulkmarkimport' but the record source inserted by
the atomicupdate is named 'bulkmarcimport'. The mismatch caused the
display label and the JS filter option to fall through to the default
(untranslated) case. Fixed in both the rule filter display block and the
module_filter_options JS object.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 75d88eb36c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:13 +01:00
Jan Kissig d0ed49f71c
Bug 35380: (follow-up): Fix errors from qa script
Make atomicupdate script executable, add html filters to tt, annotate is_system as boolean (SQL12 coding guidelines)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 9b7824d789)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:13 +01:00
Jan Kissig 59e3dd9a00
Bug 35380: Unit tests
updateBiblio API:
- tests for locked records (records with a given record_source which is set to can_be_edited = 0)
- tests for MARCOverlayRules bound to a record_source or fallback source (*)

As record_sources now has an is_system property which prevents it from getting deleted, all tests creating and deleting a record_source were changed so that is_system is set to 0 on creation.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 448eb4f69a)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:13 +01:00
Jan Kissig 555640b585
Bug 35380: Make updateBiblio-API respect Record overlay rules
This patch moves hardcoded source filter from 'MARC overlay rules' (batchmod, intranet, z3950, staged import, bulk import, import_lexile) to 'Record Sources' and makes them untouchable. They cannot be renamed or modified.
New record sources can be added and modified though.
All default and newly created record sources are available as filter for the module "Source" in 'MARC overlay rules'.
The API route for PUT /biblios/:biblio_id now checks for a given header x-record-source-id.
If an id is given the name of the rule is retrieved and forwarded as an overlay_context to ModBiblio.
If no id is given the fallback '*' is added as overlay_context.
Also the record source id is getting saved.

Test plan:
pre) run perl installer/data/mysql/updatedatabase.pl to add new is_system column
pre) run dbic to build Koha::Schema::Result::RecordSource as it gets a new columns is_system
pre) run 'redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json' or 'yarn build'

a) enable system preference MARCOverlayRules and RESTBasicAuth
b) create new record source in /cgi-bin/koha/admin/record_sources and recognize its <NAME> and <ID>
c) create overlay rules in /cgi-bin/koha/admin/marc-overlay-rules.pl
f.e.
+----+-----+--------+----------+-----------+
| id | tag | module | filter   | preset    |
+----+-----+--------+----------+-----------+
|  1 | 245 | source | *        | protect   |
+----+-----+--------+----------+-----------+

This will make the 245 field protected from change, unless the record source matches
d) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=262 and change 245 (title)  via edit -> edit record
e) save and take a look the title is still the same
f) run the updateBiblio-Request from below with a API-testing client like REST Client
g) check that title gets overwritten even though it is protected. This is due the fact the updateBiblio is not setting an overlay context.

h) apply patch
redo d) and e)
i) add another overlay rule allowing your record source to change 245:
+----+-----+--------+----------+-----------+
| id | tag | module | filter   | preset    |
+----+-----+--------+----------+-----------+
|  1 | 245 | source | *        | protect   |
|  2 | 245 | source | <NAME>   | overwrite |
+----+-----+--------+----------+-----------+

j) run the updateBiblio-Request from below, be sure to fill out x-record-source-id:with your ID from step b)
k) check that title gets overwritten
l) run the updateBiblio-Request from below, but omit x-record-source-id or set it to another value than <ID>
m) check that title is not overwritten

PUT http://main-intra.localhost/api/v1/biblios/262
Authorization: Basic koha:koha
Authorization: Basic koha:koha
Content-Type: application/marcxml+xml
x-record-source-id: <ID>

<?xml version="1.0" encoding="UTF-8"?>
<record
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"
    xmlns="http://www.loc.gov/MARC21/slim">

  <leader>01075cam a2200313 a 4500</leader>
  <controlfield tag="001">foo</controlfield>
  <controlfield tag="005">20200421093825.0</controlfield>
  <controlfield tag="008">120417s2012    ch a     b    001 0 eng  </controlfield>
  <datafield tag="040" ind1=" " ind2=" ">
    <subfield code="c">482</subfield>
  </datafield>
  <datafield tag="100" ind1="1" ind2=" ">
    <subfield code="a">Christiansen, Tom.</subfield>
    <subfield code="9">482</subfield>
  </datafield>
  <datafield tag="245" ind1="1" ind2="0">
    <subfield code="a">New Title</subfield>
    <subfield code="c">Tom Christiansen, Brian D. Foy &amp; Larry Wall.</subfield>
  </datafield>
  <datafield tag="260" ind1=" " ind2=" ">
    <subfield code="a">City</subfield>
  </datafield>
  <datafield tag="300" ind1=" " ind2=" ">
    <subfield code="a">Pages and more</subfield>
  </datafield>
  <datafield tag="942" ind1=" " ind2=" ">
    <subfield code="c">BKS</subfield>
  </datafield>
</record>

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit ce42c3b5ec)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:13 +01:00
Jan Kissig 34b0bcfb20
Bug 35380: Make record sources available in overlay rules
This patch enhances the filters in record overlay rules when using the "Source" module. The available filter values are now system defined in Administration -> Record sources and can be extended by own record souces. The former hard coded values (f.e. batchmod, intranet) are added to the database and cannot be deleted.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 246f299df1)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:13 +01:00
Jan Kissig 431bf6767f
Bug 35380: Schema Update
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit d7dd72b1a4)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:13 +01:00
Jan Kissig aa14b91902
Bug 35380: Change record sources to by systemdefined
This changes the structure of record source with an is_system column which controls whether this value can be deleted.
Also predefined values are inserted to reflect the default hard coded values from 'Record overlay rules' sources

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 86443b8437)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:13 +01:00
Martin Renvoize 7b86e88eea
Bug 42010: (RM follow-up) Tidy that was missed during push
(cherry picked from commit 67adbce656)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:13 +01:00
Martin Renvoize cc2a8b814c
Bug 42010: Escape EDIFACT special characters in BGM purchase order number
Bug 20253 introduced the ability to use the basket name as a purchase order
number in the BGM segment of an EDIFACT order message. However, the basket
name was inserted into the BGM segment without escaping EDIFACT special
characters (apostrophe, colon, plus, question mark).

In EDIFACT, the apostrophe (') is the segment terminator, so any literal
apostrophe in data must be escaped with the release character (?) as ?'.
Without this, a basket name like "Children's Requests" would produce an
invalid EDIFACT message.

This fix applies encode_text() to the purchase order number in
beginning_of_message() so all special characters are properly escaped.

Test plan:
- Run t/db_dependent/Koha/Edifact/Order.t
- All tests should pass, including the new tests covering special character
  escaping in BGM segments

Signed-off-by: Graham Jones <GrahamJ@askewsandholts.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 9d39d80801)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:13 +01:00
Nick Clemens a28b2312d6
Bug 41959: (QA follow-up) Add missing POD
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 0d84b49ea7)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:13 +01:00
Andreas Jonsson d84e3dcd82
Bug 41959: Handle edge case
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 6fbcedd5db)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:13 +01:00