Commit Graph

1959 Commits

Author SHA1 Message Date
Saiful Amin 4c255bdde8
Bug 29587: Test mail option in SMTP servers
Edit: Added CSRF protection.

This patch adds a "Send test email" action to the SMTP servers
administration page. It sends a test message to the address in
the KohaAdminEmailAddress system preference and reports success
or failure to the user.

Test plan:
1. Add a valid SMTP server in Administration → SMTP servers.
2. Set KohaAdminEmailAddress to a valid email address.
3. Apply the patch.
4. Click "Send test email" in the Actions column.
5. Confirm that Koha reports "Test email sent successfully".
6. Edit the SMTP server and change the domain to an invalid one.
7. Click "Send test email" again.
8. Confirm that Koha reports failure.
9. Sign off.

Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-15 15:24:04 +00:00
Martin Renvoize 04809de849
Bug 42764: Fix spelling errors across the codebase
Correct genuine spelling errors identified by the codespell 2.4.x
full scan after the KTD container OS upgrade. Changes are in
comments, POD, strings, and template text across 55 files.

"SAN Ouest Provence" (the French library co-operative and Koha
sponsor) is preserved as a proper noun. Perl copyright lines
receive an inline # codespell:ignore annotation; about.tt files
(contributor attribution pages) are added to the Koha::Devel::Files
codespell exception list so that future uses of "Provence" as a
typo for "Province" are still caught in all other files.

Notable user-visible fixes:
- "submiting" -> "submitting" in authority and bibliographic merge screens
- "deleteable" -> "deletable" in patron exception messages
- "Acquistions" -> "Acquisitions" in reports dictionary

Test plan:
1. Apply patches
2. In the staff interface, go to Cataloguing > Merge records and
   confirm the submit button reads "Submitting" (not "Submiting")
3. In the staff interface, go to Authorities > Merge and confirm
   the same correction
4. Attempt to delete a patron with outstanding issues and confirm
   the error message reads "deletable" (not "deleteable")
5. prove xt/author/codespell.t
=> All tests pass

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-03 16:09:04 +00:00
Brendan Lawlor 04a48349be
Bug 32773: Add ability to set biblio_framework.is_fast_add
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Miranda Nero <mnero@oslri.net>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-08 16:05:35 -06:00
Pedro Amorim bbc4e8050d
Bug 37762: (QA follow-up): Add filters to supply ILL table
Also fix table_settings

Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-08 12:25:51 -06:00
Matt Blenkinsop bce9aad974
Bug 26355: (follow-up) Fix handling of extended attributes
Extended attributes weren't being identified as changes and so need to be checked to see if any of them have changed

Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-01 09:30:04 -06:00
Matt Blenkinsop cb9e70f8c2
Bug 26355: (follow-up) Allow the setting of multiple information messages
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-01 09:30:02 -06:00
Matt Blenkinsop 4979f0aead
Bug 26355: Add the new category fields to the UI
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-01 09:29:59 -06:00
Martin Renvoize 8f6daa1b38
Bug 34353: (QA follow-up) Migrate spinelabel for both holdings tables
The catalogue_detail.inc include is shared by both the holdings_table
and otherholdings_table tabs, so the column visibility migration must
seed both. Without this, sites that previously had
'SpineLabelShowPrintOnBibDetails' set to "Don't show" would still see
the spine-label column appear in the other-holdings tab.

Also mark 'spinelabel' as is_hidden by default in admin/columns_settings.yml
for both tables, so fresh installs (where the atomicupdate doesn't run)
match the previous syspref default of 0 (Don't show).

Test plan:
1. Reset the database, do not apply the parent patch yet.
2. With the syspref still present, set it to "Don't show" and save.
3. Apply the parent patch and this follow-up, then update the database.
4. Navigate to a record with items in both 'Holdings' and 'Other holdings'
   tabs.
5. Verify the 'Spine label' column is hidden in BOTH tabs.
6. Reset the database again. Set the syspref to "Show", save, then apply
   patches and update the database.
7. Verify the 'Spine label' column is visible in BOTH tabs.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-29 09:09:28 -06:00
Martin Renvoize adc1651a52
Bug 39516: Display composite match scores in staged batch view
Adds a new "Score breakdown" column to the staged MARC batch view that
shows the per-matchpoint score contributions for each candidate match,
e.g. "title:50, author:50" or "isbn:100", rather than a single opaque
total.

The column is hidden by default and can be toggled via the standard
column configuration tool (Administration > Table settings > Tools >
manage-marc-import). The existing "Match details" column continues to
show the numeric total score unchanged.

Falls back to displaying the raw aggregate score for any pre-existing
import_record_matches rows that have no composite_scores data.

To test:
1. Ensure you have a bibliographic matching rule with at least two
   matchpoints, e.g.:
     - Match point: search index "title",  score 50, tag 245$a
     - Match point: search index "author", score 50, tag 100$a
     - Match point: search index "isbn",   score 100, tag 020$a
   Set the threshold to 100.
2. Prepare two MARC files:
   a. A record that matches an existing catalogue entry via title + author
      (but not ISBN).
   b. A record that matches solely via ISBN.
3. Stage each file via Tools > Stage MARC records for import, applying
   the matching rule above.
4. Open the staged batch view for each batch.
5. Confirm the "Match details" column still shows the total numeric score
   as before, e.g. "(score=100)".
6. Use the column visibility toggle (or Administration > Table settings >
   Tools > manage-marc-import) to show the "Score breakdown" column.
7. Verify the breakdown column shows:
   a. File (a): "title:50, author:50"
   b. File (b): "isbn:100"
8. Confirm the "Score breakdown" column is hidden by default and the
   column toggle persists across page reloads.
9. Verify that pre-existing staged batches (run before this patch) still
   display gracefully — the breakdown column falls back to the numeric
   score.

Sponsored-by: Main Library Alliance <https://www.mainlib.org/>
Signed-off-by: Jeanne Mauriello <jeanne.mauriello@mainlib.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-29 09:09:23 -06:00
Lucas Gass cc3b7cebf5
Bug 41882: Enforce pickup location rules
To test:
1- Set ReservesControlBranch to 'item's home library'
2- Set Main library's 'Holds and bookings policies by item type' so that PASS items can only be picked up at Main
3- Place a hold on a bib whose only item is a PASS belonging to Main
4- Use the Batch hold modification tool to identify the hold you just placed
5- Update the pickup location to North. Note that the update is successful, and there's no indication that the pickup location is now a problem.
6- Check in Main's PASS, and note that the hold doesn't trigger to fill
7- APPLY PATCH, restart_all
8- Try again, this time the hold should fail to update at all.
9- You should see a new table with the 'Failed hold' in it, it should also include a 'Result' column which explains why the hold failed (New pickup location is invalid).
10- Try modifying a hold to an invalid pickup location, but also attempt to modify something else on the hold at the same time, like expiration date.
11- The hold should not modify anything. If the pickup location is invalid all other modifications should NOT happen on that hold.
12 - Play with the Table settings for the holds_modified tables, ensuring you can hide/show all the columns.

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>
2026-04-29 09:09:20 -06:00
Nick Clemens 88cfb35e5e
Bug 42156: Add a stdno index for authid
In order to allow matching on authid we need a search index with a ci_raw
field

local-number is indexed as a number, and needed that way for sorting. This adds
a stdno version of 001 as authid

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>
2026-04-23 09:25:03 -06:00
Janusz Kaczmarek 95267338d5
Bug 42016: Add identifier-other search field for authorities (MARC 21)
MARC 21 authority records often have 024 $a (Other Standard
Identifier) - https://www.loc.gov/marc/authority/ad024.html,
but the field 024 is missing from ES search fields and the record
cannot be found with these identifiers.

Test plan
=========
1. Have a ktd instance with Elasticsearch.
2. Add a 024 field to an authority record, i.e. for Alatriste, Gustavo:
   024 7# $a 86971927 $7 viaf
3. In Authorities, make an 'Entire record' search for the added
   identifier. You should get no results.
4. Apply the patch, reindex with:
   sudo koha-elasticsearch --rebuild -r -d -a kohadev
5. Repeat p. 3. You should now be able to find the record.

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: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 14:10:07 -06:00
Julian Maurice e7f483def5
Bug 38136: Refactor database translations (alternative)
This has the same goals of bug 24975 but with a different approach.

Bug 24975 tried the "POT/PO files as database tables" approach but
it appeared that is not what best fits our needs.

Instead of a "source text / translated text" mapping, we need
translations to be attached to a specific "object" (or table row), which
has the added benefit of keeping translations unaffected when the
original string changes. It may or may not be what you want but at least
this avoids the problem where fixing an error in the original string
forces users to re-translate everything.

We also need to be able to translate all translatable properties of a
particular entity.

The solution proposed here is to add a DBIC component that will add
several DBIC relations to the `localization` table:
* a relation named `localizations` that will return all translations for
  all translatable properties for all languages.
* for each translatable property:
  * a relation named `{$property}_localizations` that will return all
    translations for a given property, for all languages
  * a relation named `{$property}_localization` that will return the
    translation for a given property, for the current language

To enable translations for a particular entity, we will need to:
* add two method calls in the "result class" corresponding to the
  localizable object type
* in the admin interface, add a link to the the translation popup.
  Unlike bug 24975 there is not a page where you can translate
  everything. I don't know if it is really useful (probably better to
  translate itemtypes when you are on the itemtype page). It can be
  added later if needed.

To give an example, this is what needs to be added manually in
Koha/Schema/Result/Itemtype.pm:

    __PACKAGE__->load_components('+Koha::DBIx::Class::Localization');
    __PACKAGE__->localization_add_relationships(
        'itemtype', # the PK column
        'description' # a list of translatable columns
    );

(see POD in Koha/Schema/Component/Localization.pm for more information)

Final notes:
* I wanted this patch to have as few changes as possible so I kept
  methods like `search_with_localization`, `children_with_localization`
  even if I believe they can be removed (replaced by search/children)
  Localizations do not need to be prefetched/joined unless you want to
  sort on them.
  For the same reason, $itemtype->unblessed now always return a
  `translated_description` key.
  This can be fixed in followup patches
* There is cache involved (see
  Koha::Schema::Component::Localization::localization).
  Localizations in cache are grouped by object type and language (keys
  look like 'KOHA:localization:Itemtype:en')
* By keeping a single table for all translations of all entities, we
  cannot have data integrity at the RDBMS level, but automatic deletion
  of translations is handled by the DBIC `cascade_delete` feature, so
  integrity should be fine as long as no raw SQL update/delete operation
  is involved.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 11:37:14 -06:00
Nick Clemens 876869544f
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>
2026-04-09 08:27:26 -06:00
Tomás Cohen Arazi 3c87468669
Bug 40841: Add limits configuration UI
This patch adds branch limits selection to the Z30.50/SRU configuration
page.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 14:21:28 +01:00
Pedro Amorim ade2934e2a
Bug 40504: Add 'managedby' to illrequests
This also includes a 'manager' accessor which returns the Koha::Patron
object

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 14:21:22 +01:00
Janusz Kaczmarek 71af0f01d1
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>
2026-03-26 14:21:17 +01:00
Martin Renvoize 6aff5f361a
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>
2026-03-26 09:50:53 +01:00
Jan Kissig 246f299df1
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>
2026-03-26 09:50:08 +01:00
Johanna Räisä b58f945270
Bug 23269: use REST API for patron_holds_table
This patch uses the REST API to populate the holds table

Test plan:
1) Apply the patch
2) Go to a record with holds
3) Check that the holds table is populated correctly
4) Check that hold tables functions work correctly
5) Change HoldsSplitQueue and HoldsSplitQueueNumbering system preference, try all variations
6) Repeat steps 3 and 4
7) Search for records and place holds to multiple records
8) Repeat steps 3 and 4
9) Try with lesser permissions

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-03-21 20:28:14 +00:00
Owen Leonard 713cae3a49
Bug 41126: Move shelving location into a separate column in inventory
This patch updates the inventory template so that items' shelving
location is showin in its own column in the table of results. This makes
it consisten with other displays like the bibliographic detail holdings
table and the holds queue report.

To test, apply the patch and restart services.

- If necessary, modify a few items to add a shelving location.
- Go to Cataloging -> Inventory
- To narrow down the results, I used the item call number fields under
  "Item location filters."
- Submit the form.
- In the list of results, confirm that there is a separate column for
  shelving location and that the correct information is displayed.
- Confirm that the column visibility menu works to show and hide the
  column.
- Go to Administration -> Table settings -> Tools (sic) -> Inventory
- Confirm that there is a checkbox for the shelving location column and
  that your changes to the column's configuration are reflected in the
  inventory results.
  - Because of DataTables state saving feature you might have to clear
    your browser's local storage in order to see the new column
    configuration.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:34:02 -07:00
Owen Leonard 0ddcaa5e8a
Bug 41134: Add table settings to transfers
This patch updates the transfers page in order to add table settings to
the table of transfered items.

The patch also makes another minor correction: The transfer submit
button now has the standard class "btn-primary."

To test, apply the patch and restart services.

- Go to Circulation -> Transfer.
- Submit a barcode from a library other than your own so that the
  transfer will complete successfully.
  - Note that the "Transfer" button has the standard primary yellow
    color.
- In the table of transferred items you should see the columns setting
  menu, export option, etc. Confirm that these controls work correctly.
- Go to Administration -> Table settings -> Circulation -> Transfers
- Make some changes to the column visibility settings and return
  to the transfers page to confirm that your settings are now
  applied when you transfer more items.
  - Because of DataTables state saving feature you might have to clear
    your browser's local storage in order to see the new column
    configuration.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:33:43 -07:00
Nick Clemens f4634ee1c8
Bug 36506: Remove process fee from itemtype administration
Sponsored-by: The Main Library Alliance <https://www.mainlib.org/>
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-27 11:38:45 -07:00
Nick Clemens 8d6391d3f0
Bug 36506: Add lost_item_processing_fee rule and CRUD
Sponsored-by: The Main Library Alliance <https://www.mainlib.org/>
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-27 11:38:44 -07:00
Wainui Witika-Park f2dbadd52a
Bug 36853: Enhance Elasticsearch Notes/Comments MARC21 index mappings
Added the following tags and subfields to the existing note index for Elasticsearch MARC21, as used by the "Notes/Comments" advanced search dropdown option: 501a, 503a, 504a, 508a, 511a, 521a, 538a, 547a

Sponsored-by: Educational Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-27 11:38:40 -07:00
David Cook 6da9009b3a
Bug 38946: Add enumchron to inventory table
This patch adds "Serial enumeration / chronology" to the inventory table
output.

Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/tools/inventory.pl
2. Click "Submit"
3. Note that a "Serial enumeration / chronology" column appears in
the results
4. For the top result, go into the bib record and then add a "Serial enumeration /
chronology" to the item in question
5. Re-run the inventory
6. Note that the "Serial enumeration / chronology" now has a value in iy
7. Click "Columns" and hide the column
8. Try again using the CSV export and note that the new column appears again

Signed-off-by: Ludovic Julien <ludovic.julien@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-27 11:38:33 -07:00
Nick Clemens 4c82ff273b
Bug 41131: Don't allow limiting transfers from/to a single branch
We say that you cannot limit transfers internally within a branch, but
it seems we do allow you to, and don't show you when we do

To test:
1 - Go to Admin->Library transfer limits
2 - On a branches page, uncheck the box for that branch
    e.g. don't allow FIC to transfer to CPL from CPL
3 - Save
4 - Note the box is still checked
5 - Check the DB
    SELECT * FROM branch_transfer_limits;
6 - There is a line to/from CPL!
7 - Apply patches
8 - updatedatabase
9 - Repeat 5 - the line is deleted!
10 - Try to create the rule again, not the box is now disabled
11 - Be sneaky, enable the box, uncheck it and save, no rule created
12 - Be sneaky, edit the HMTL for another button to make it limiting CPL to CPL, save, no rule created
13 - Sign off

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-26 09:04:19 -07:00
Nick Clemens 7cdb17cc2f
Bug 38384: (follow-up) move require Koha::Plugins to use
remaning ocurrences in test files seem okay, this covers the others

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-25 07:37:00 -07:00
Martin Renvoize 3ee2efa9d0
Bug 28530: (QA follow-up) Use DBIC in controller
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:41 -07:00
Lucas Gass 336d48eae2
Bug 28530: Fix forbidden http pattern
Signed-off-by: Kris Becker <kbecker@jcls.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:38 -07:00
Lucas Gass 1f63d8c13f
Bug 28530: Implement float limits
Signed-off-by: Kris Becker <kbecker@jcls.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:35 -07:00
Kyle M Hall be2cbf15de
Bug 28530: Add float limits editor
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Kris Becker <kbecker@jcls.org>
Signed-off-by: Kris Becker <kbecker@jcls.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:34 -07:00
Martin Renvoize a92e6ef8ea
Bug 41798: Fix FTP passive mode not saving and add display indicator
The FTP passive mode setting was not being saved due to a typo in the
parameter name ('passiv' instead of 'passive'). This fixes the typo
and adds display of passive mode status in the transports table.

Test plan:
1. Go to Administration > File transports
2. Click "New file transport"
3. Fill in the name (e.g., "Test FTP")
4. Change Transport to "FTP"
5. Set Passive mode to "Enabled (Recommended)"
6. Fill in required fields (host, username, etc.) and save
7. Edit the transport you just created
8. Verify Passive mode is still set to "Enabled" (not reverted to Disabled)
9. Return to the file transports list
10. Verify the Transport column shows "FTP (passive)" for this transport
11. Edit the transport and change Passive mode to "Disabled"
12. Save and return to the list
13. Verify the Transport column now shows just "FTP" (without the passive indicator)

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:21 -07:00
Martin Renvoize d5f9858307
Bug 3492: Remove from patron categories admin
Sponsored-by: OpenFifth <https://openfifth.co.uk>
Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-09 12:57:56 -07:00
Martin Renvoize 35c7f0a7c4
Bug 3492: Add hold fees to circulation rules system
This commit integrates hold fee configuration into the main circulation
rules system, providing granular control over hold fees based on patron
category, item type, and branch combinations.

Changes:
- Add hold_fee as a new circulation rule type with full scope support
- Remove deprecated reservefee column mapping from Koha::Patron::Category
- Integrate hold fee input into the circulation rules admin interface
- Add hold fee column to the main circulation rules matrix
- Enable proper rule hierarchy resolution for hold fees

Hold fees can now be configured at multiple levels with automatic
fallback handling following standard circulation rule patterns.

Sponsored-by: OpenFifth <https://openfifth.co.uk>
Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-09 12:57:55 -07:00
Martin Renvoize 1f51dab88e
Bug 41268: (QA follow-up) Apply same simplification to remaining operations
This follow-up applies the same variable-based simplification pattern
to the remaining operations in smart-rules.pl:

- cud-set-branch-defaults: 2 code paths reduced to 1
- cud-add-branch-cat: 4 code paths reduced to 1
- cud-add-open-article-requests-limit: 4 code paths reduced to 1
- cud-del-open-article-requests-limit: 4 code paths reduced to 1
- cud-add-branch-item: 4 code paths reduced to 1

Note: cud-delete-branch-cat was NOT simplified because it contains
additional business logic (setting itemtype rules only when deleting
the default categorycode), which is not simply a matter of converting
'*' to undef.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:18 -07:00
Nick Clemens e9d675fcbc
Bug 41268: Use variables rather than conditionals
Testing plan:

- Apply patch
- Run tests
- Go to admin > circ and fine rules
- Create a few Holds and bookings policies
  - For All Libraries
  - For a specific library
- Delete the policies
- (optional) a simple `SELECT * FROM circulation_rules` can confirm policies were created/deleted correctly

Signed-off-by: Eric Phetteplace <ephetteplace@cca.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:18 -07:00
Fridolin Somers 15f21656fe
Bug 41043: Use op 'add_form' and 'edit_form' in z3950 servers
Since CSRF protection, 'op' arg for creating/editing an object uses add_form and edit_form.
This is missing only in admin/z3950servers.pl

This patch also removes TT variable add_form to avoid confusion

Test plan :
1) Create a new z3950 server
2) Enter mandatory datas in form and save
3) Edit this server
4) Copy this server
5) Repeat 1 to 4 for a SRU server

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:12 -07:00
Fridolin Somers d0cdf16a45
Bug 41043: Use op 'add_form' and 'edit_form' in oai servers
Since CSRF protection, 'op' arg for creating/editing an object uses add_form and edit_form.
This is missing only in admin/oai_servers.pl

This patch also removes TT variable add_form to avoid confusion

Test plan :
1) Create a new OAI repository
2) Enter mandatory datas in form and save
3) Edit this repository
4) Copy this repository

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:11 -07:00
Lucas Gass 3b149f0f50
Bug 33544: (RM follow-up) Add new line
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:05 -07:00
Martin Renvoize 9954466c10
Bug 33544: Move biblio ID into title link
This patch removes the separate biblio_id column and instead embeds
the biblio link directly within the title field of the details column,
reducing table width while maintaining access to the full record.

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:04 -07:00
Pedro Amorim 589c6112b4
Bug 33544: Update columns_settings.yml for consolidated details column
This patch removes the now-unused individual column definitions from
columns_settings.yml, replacing them with a single 'details' column
configuration.

Note: Fields combined into a single column are no longer individually
sortable. I believe this is acceptable for the ILL requests fields selected
for display consolidation to reduce horizontal overflow.

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:04 -07:00
Jonathan Druart 849f67988f
Bug 41076: Adjust our perl tidiness for v20250105
Generated using
  `perl misc/devel/tidy.pl --perl`

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-05 09:03:51 -07:00
Jonathan Druart 72b06d3576
Bug 41561: Remove 'tab' from admin/aqbudgetperiods
commit 4b312b141a
CommitDate: Wed Sep 19 16:17:16 2012 +0200
    Bug 8117: Divide budget periods into two tabs

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

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

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-28 14:24:00 -07:00
Nick Clemens 31d52435b6
Bug 37099: (QA follow-up) Combine fields in mappings for brevity
The syntax '630anr' is equivalent to mapping each individual field, this just keeps the file smaller

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:29 -07:00
Wainui Witika-Park 522024f2df
Bug 37099: Add uniform title fields to the subject Elasticsearch index mappings
Add 'subject' or 'subject as phrase' search to also search on the following Uniform Title fields: 630$a

Sponsored-by: Educational Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:29 -07:00
Emmi Takkinen 05204294bb
Bug 41334: Move modified_holds tables column settings under Tools section
Bug 36135 added new tool to batch modify holds and two new datatables.
Table holds_to_modify was added to "Table settings" page under section
Tools>Page: batch_hold_modification but table modified_holds is under
Circulation>Page: holds section. It should be also moved to Tools section.

To test:
1. Navigate to page "Table settings" and open section Circulation.
2. Jump to Page: holds.
=> Note that modified_holds tables settings are displayed under this page.
3. Apply this patch.
4. Open Tools section and jump to page batch_hold_modification.
=> Note that modified_holds tables settings are now displayed under this
page and they are no longer present under Circulation>Page: holds.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-16 14:07:17 -07:00
Wainui Witika-Park 277bc4e294
Bug 36849: Add more tags to Elasticsearch mapping for title, title as phrase
Add additional mappings to the title index for MARC21: 440a, 600t, 800t, 810t, 830np

Sponsored-by: Educational Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-13 15:20:08 -07:00
Martin Renvoize 856e6d3b38
Bug 39522: (follow-up) Remove debugging
Signed-off-by: Catherine Small <c.small@rcs.ac.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:33 -07:00
Jacob O'Mara 8e6b687f51
Bug 39522: Allow Valuebuilders to be installable as plugins
This patch adds hooks to allow 'Valuebuilder' plugins to be installable
using the standard plugin architecture for Koha. This enables cataloguing
plugins to be dynamically installed, enabled, and disabled through the
plugin system rather than being hardcoded framework components.

Test plan:
1. Install the example valuebuilder plugin from GitHub
   (https://github.com/Jacobomara901/koha-plugin-value-builder)
2. Go to Administration > Plugins
3. Verify the valuebuilder plugin appears in the plugins list
4. Enable/disable the plugin and confirm the custom valuebuilder
   appears/disappears in the framework configuration
5. Assign the custom valuebuilder to a MARC subfield in the
   bibliographic framework
6. Create/edit a bibliographic record and verify the valuebuilder
   button appears next to the configured subfield
7. Click the valuebuilder button and confirm it functions correctly
8. Disable the plugin and verify the valuebuilder button disappears
9. Re-enable the plugin and confirm functionality is restored
10. Uninstall the plugin and verify it's completely removed

Sponsored-by: Open Fifth <https://openfifth.co.uk>
Co-authored-by: Mark Hofstetter <koha@trust-box.at>
Signed-off-by: Catherine Small <c.small@rcs.ac.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:31 -07:00