Commit Graph

57891 Commits

Author SHA1 Message Date
Martin Renvoize efc39ed8ef
Bug 39888: Prevent load of superflous JS when table is not present
We shouldn't attempt to load the JS block for dealing with the budgets
table if there is no budgets defined and thus no budgets table.

Test plan
1) Remove all budgets
2) Load acqui-home.pl and note an error in the browser console
3) Apply the patch
4) Reload acqui-home.pl and note the errors have gone

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>

Amended-by: Jonathan Druart
Tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2025-05-13 13:04:05 +02:00
Matt Blenkinsop 49732435e2
Bug 38010: (follow-up) Remove DT reference
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2025-05-13 12:22:51 +02:00
Andrew Fuerste Henry 829186d77d
Bug 39576: Show preferred_name for hiddenborrowername
The last patron menu uses the value "hiddenborrowername." I've made that use preferred_name instead of firstname. When a patron's preferred_name is not manually set/edited, it automatically takes the value of firstname, so we don't need an IF in the template toolkit here.

To test:
1 - have a patron with a preferred_name and one without
2 - get both patrons in the Last Patron dropdown, confirm they both show firstname
3 - apply patch, restart services, clear cache, reload page
4 - get your patrons in Last Patron again, confirm now one shows preferred name and the other firstname

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:23 +02:00
Baptiste Wojtkowski e398743e06
Bug 39148: Correct sort by publicationdate in OPAC lists
Test plan (UNIMARC):
1 - Create a list with different publicationdates, chose to sort it by
  copyright gate
2 - Go to the list in the OPAC -> it is not correctly sorted
3 - Pick sort order: copyright date -> not correctly sorted
4 - Apply patch
5 - Retry 2&3 and see it works

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:23 +02:00
Fridolin Somers cef1685925
Bug 39737: Obsolete call on system preference 'PatronSelfRegistrationAdditionalInstructions'
Bug 34889 moved to additional contents.
Remove call in opac pages.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:22 +02:00
Fridolin Somers a210683610
Bug 39736: Remove obsolete call on system preference 'OPACResultsSidebar'
Bug 34869 moved additional contents.
Remove call in opac/opac-search.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:22 +02:00
Imani Thomas e52132d9c2
Bug 39029: When a basket contains an order transferred from another basket some info is incorrect.
To test:
1 - Create a new basket - 'Gonna transfer'
2 - Add an order to the basket
3 - Create another basket 'Has the transfer'
4 - Return to first basket and transfer order to second
5 - Return to second basket, click 'Add to basket' and inspect the modal
6 - Note basketno says 'Gonna transfer'
7 - apply the patch
8 - redo steps 1 through 6 with fresh baskets and the modal should have the correct values

Signed-off-by: Andrew Auld <andrew.auld@openfifth.co.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:21 +02:00
Nick Clemens f2d40e1c69
Bug 39413: Add a check for item fields in MARC records to data inconsistencies script
This patch adds a new test to the data inconsistencies script to report where
MARC records contain item fields.

These may not cause issues in Koha, however, in discovery harvests they have eben found to create errors

To test:
1 - Follow test plan on bug 39412 to generate records with item tags
2 - perl misc/maintenance/search_for_data_inconsistencies.pl
3 - Note new section and hint on how to fix
4 - perl misc/maintenance/touch_all_biblios.pl
5 - repeat 2
6 - Errors cleared

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:21 +02:00
Nick Clemens 50a68bfa1d
Bug 39079: Follow 'and_or' variable when passed to build_auth_query_compat
When building queries for matchign Zebra uses OR to combine searches - Elasticsearch
has been effectively using 'AND' - this patch checks whether and_or has been passed
and follows the variable when present.

To test:
1 - Have an import file of auths with multiple 035
2 - Setup an authority matching rule
    Search index: other-control-number
    Score: 1000
    Tag: 035
    Subfields: a
3 - Make sure Koha is using Elasticsearch
4 - Stage file without matching, import file
5 - Stage file again, using your matching rule
6 - Note all records match
7 - Setup Cataloging->Marc modification template
8 - Add an action to delete first 035 field
9 - Run it against the records you just imported
    You can use a report:
    SELECT authid FROM auth_header WHERE authid > #### (find the lowest new record number in batch you imported)
10 - Change matching rule in batch to none, then back to your rule
11 - No matches!
12 - Apply patch, restart all
13 - Set matchign rule to none, then back to your rule
14 - Matches!

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised!
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:20 +02:00
Lucas Gass f94283fdc5
Bug 39587: Add surname to contact information list on moremember.tt
To test:

1. Go to members/moremember.pl?borrowernumber=X where X is borrowernumber of a patron with a surname
2. Look under contact information and notice surname is missing.
3. APPLY PATCH and look again.
4. Surname should be included.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:20 +02:00
Lucas Gass 9b8e2ea5e6
Bug 39588: Fix concatenation in bookings to collect
1. Turn on bookings for an item or item type
2. Find an item and book it.
3. Check the same item out.
4. Go to Circulation > Bookings to collect and run the report
5. The table never loads
6. APPLY PATCH
7. Try again, the bookings to collect report should load!

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:19 +02:00
Andrew Fuerste Henry 22470246b8
Bug 39555: Relabel "On Loan" in Transfers to Send
This test plan edits database values rather than getting these transfers requested via StockRotation. I don't believe that impacts the validity of the testing.

To test:
1 - enable StockRotation syspref (otherwise the Transfers to Show page doesn't show up)
2 - go to /cgi-bin/koha/circ/branchtransfers.pl and transfer an item
3 - log into the database and "update branchtransfers set datesent=NULL where branchtransfer_id=[your transfer]"
4 - go to /cgi-bin/koha/circ/transfers_to_send.pl
5 - confirm there is a column named "On shelf" and your transfer shows the value "On shelf" in that column
6 - back in the database, "update items set onloan=curdate() where itemnumber=[your item]"
7 - reload Transers to Send, confirm it now shows "Due [today]" for your item in the On Loan column
8 - apply patch
9 - reload Transfers to Send, confirm column is now titled "Date due" and the value for your item is still the due date
10 - back in the database, "update items set onloan=NULL where itemnumber=[your item]"
11 - reload Transfers to Send, confirm your item now shows a value of "Not checked out"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:19 +02:00
Lucas Gass 2a6da59f48
Bug 39276: Show record level priority in opac detail page
To test:
1. Enable Holds history system preference and set the OPACShowHoldQueueDetails to "Show holds and their priority level".
2. Make an item level hold on a record.
3. Make a record level hold on a different record.
4. Login to the OPAC as that patron
5. On the detail page for the item level hold, it works
6. On the detail page for the record level hold, dataTable error
7. APPLY PATCH
8. Try each of the OPAC detail pages again, they should both work.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:18 +02:00
Martin Renvoize 79e872915f
Bug 39696: (follow-up) Set text-bg-info on badge
We also use a badge without a text-bg-# class on the modal claims
include.. this patch adds the same text-bg-info to that.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:18 +02:00
Martin Renvoize 2f4f34de0a
Bug 39696: Set text-bg-info on badge
With bootstrap 5, a 'badge' class should always be accompanied by a
text-bg-# class. This second class sets the badge color and an
appropriate forground text color to ensure appropriate contrast.

Steps to test:
1. Enable the ability to mark items as "Claimed Returned" by setting
   the ClaimReturnedLostValue system preference.
2. Check out an item to a patron, and backdate the due date so that it
   becomes overdue.
3. Navigate to: /cgi-bin/koha/circ/overdue.pl to view the overdue item.
4. Mark the item as "Claims Returned".
5. Observe the display: the claim return date text uses #fff (white),
   which is not visible on white table rows and has poor contrast on
   grey rows.
6. Apply the patch
7. Clear cache in browser and observe the display: the claim return date
   badge is now blue with black text.
8. Sign off and have an amazing day! :D

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:17 +02:00
Martin Renvoize 25432b5c7e
Bug 39679: (QA follow-up) Translation friendly approach
As discussed at length on (mattermost)[https://chat.koha-community.org/koha-community/pl/wiopmtr7j3835df3yfi6q64ooy] we need to use the I18N library to properly handle this otherwise we will end up with TT tags inside the translatable strings.

We can not use <span> here as we are inside an <option> tag and nesting
<span> insdie <option> is against the html standard.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:17 +02:00
David Nind ba61427f67
Bug 39679: (follow-up) Improve consistency
This improves the consistency with other areas of Koha:
1. A space before the barcode: "Only item 3999....".
2. Where there is no barcode: "Only item [No barcode]".

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:16 +02:00
Martin Renvoize 0debad345c
Bug 39679: Add space before barcode in holds table
To test:
1) Place an item-level hold for an item with a barcode
2) In the holds list on request.pl, see that the Details
   column for your hold lists "Only item[barcode]" in the
   dropdown without a space before the barcode
3) Apply patch, restart_all, reload page
4) Confirm your hold has a space before the barcode

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:16 +02:00
Emmi Takkinen 3e50833bbe
Bug 29074: Do not set default expiration date for hold if DefaultHoldExpirationdatePeriod is left blank
If DefaultHoldExpirationdate is on and DefaultHoldExpirationdatePeriod
is blank, the blank is treated as a zero and all holds are created
with an expiration date of today.

This patch changes expiration dates storing so that if
DefaultHoldExpirationdatePeriod is left blank, expiration date is not
set. Users are informed about this with a note in syspref.

To test:
1. Set DefaultHoldExpirationdate on but leave
DefaultHoldExpirationdatePeriod blank.
2. Add hold for patron.
=> Note that expiration date is set as today.
3. Apply this patch
=> Confirm following note is now added after sysprefs:
"NOTE: If DefaultHoldExpirationdatePeriod is left blank
default expiration date is not set."
4. Add new hold for patron.
=> Note that expiration date is not set.

Also prove t/db_dependent/Hold.t.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:15 +02:00
Owen Leonard cd7554157b
Bug 39874: Correct template variable name to fix authority merging
This patch correct a template variable name so that the authority record
ID is correctly included in the search results table markup.

To test, apply the patch and go to Authorities.

- Perform a search which will return more than one result.
- On one of the results, click Actions -> Merge.
- An message should appear at the top, "Merging with authority..." and
  the authority record ID should be shown in parentheses.
- Pick another record in the results list to merge, click Actions ->
  Merge.
- You should be redirected to the "Merging records" page, with the
  correct two records shown under "Merge reference."

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:15 +02:00
Janusz Kaczmarek 5518fe490a
Bug 39560: For authorities hidden fields (but present in the record) will be lost when editing and saving such a record
If a subfield is present in the authority record, but this subfield is
marked as 'Hide all', then if you edit and save such a record, the
data from hidden fields wil be lost forever.  This behavior differs
from bibliographic records editor, when even if a subfield is hidden
(not active) in the editor it will be activated and present in the
editor if present in the record.

The problem affect above all records imported from external agencies.

Test plan:
==========
1. Have any authority record. Note one present subfield (e.g. 100 $d).
2. Modify the record framework for this type of record
   (/cgi-bin/koha/admin/authtypes.pl), marking the subfield 'Hide all'.
3. Open the record in the editor and save.
4. Re-enable the subfield in the framework, marking it as 'Show all' now.
5. Reopen the record in the editor. Note that the previous content of
   the subfield you played with is gone. Enter any new value and save.
6. Apply the patch ; restart all.
7. Repeat p. 2, i.e. hide the subfield again. Open the record in
   the editor. You should see the content of the hidden field as you
   would for a bibliographic record with a subfield hidden in the editor
   but present in a record. (Note also that the content of this subfield
   is visible in record view).
8. Open the editor with an empty record (New authority) of the type
   in question. Control that the subfield is hidden (not accessible)
   for a new record.

BTW Note that the "hidden" but present subfields are visible in OPAC,
but not in the staff interface *before* applying the patch. The patch
changes nothing for OPAC.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:14 +02:00
Tomas Cohen Arazi 20b600d450
Bug 39694: Make `es_indexer_daemon.pl` use batch_size to limit DB poll size
This patch makes the indexer poll the DB in configurable batches. Pretty
much like Rabbit does.

The only change is that it will now pass a LIMIT <batch_size> to the
query.

To test:
0. Have KTD started with ES (skip if you have an instance running):
   $ ktd --es7 up -d
1. Stop the indexer and rabbit:
   $ ktd --shell
  k$ sudo koha-es-indexer --stop kohadev
  k$ sudo service rabbitmq-server stop
2. On a separate terminal, watch the queue:
  k$ watch -n 0.5 'echo "SELECT COUNT(*) FROM background_jobs WHERE status=\"new\"" | koha-mysql kohadev'
=> SUCCESS: It should be empty
3. Add a bunch of things to index (this works with default KTD data):
  k$ for i in $(seq 1 438; seq 1 438) ; do echo "INSERT INTO background_jobs (status,queue,data) VALUES ('new','elastic_index','{\"record_server\":\"biblioserver\",\"record_ids\":[$i]}')" | koha-mysql kohadev ; done
4. Start the ES indexer:
  k$ sudo koha-es-indexer --start kohadev
5. Look at the queue size
=> FAIL: It shrinks too fast [1]
6. Apply this patch
7. Restart the indexer
  k$ perl misc/workers/es_indexer_daemon.pl &
8. Repeat 3
9. Look at the queue size:
=> SUCCESS: It shrinks 'slowly'
10. Sign off :-D

[1] This is a problem in certain scenarios, not in all of them. This is
the best I come up with in order to test the behavior change. Anyone can
set a new size of their taste.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:13 +02:00
Emily Lamancusa 5937dd436c
Bug 39864: Move save button back into form
The save button for automatic item modification rules got moved outside
of the form during the refactor for bug 38714. This happened because
the form was spread between two separate IF blocks that checked the same
condition, which is no longer allowed as of 38714.

This patch consolidates the conditional blocks and moves the submit
button back inside its form.

To test:
1. Go to Cataloguing > Item modifications by age
2. Click Add Rules, and then Add Rule to create a new rule
3. Fill in some reasonable values, for example:
   Age in days: 365
   Age field: items.itemlost_on
   Substitutions: items.withdrawn = 1
4. Click save
--> Nothing happens!
5. Apply patch, refresh, the page, and fill values in again if needed
6. Click save again
--> The rule is saved!
7. Confirm the Edit rules, Add rule, and Cancel buttons still work
    i. Click Edit rules
    --> The rule you just created should now be editable
    ii. Click Add rule
    --> A new form for a second rule should be added to the page
    iii. Click Cancel
    --> The change is cancelled and the page returns to "List of rules"
        view

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:13 +02:00
David Cook ba3feb54ee
Bug 39618: (QA follow-up) add prefix length to index key
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:12 +02:00
Thomas Klausner 132593c8a8
Bug 37020: (follow-up): Remove memleak when not using Elasticsearch
If using ES, the script will collect the newly created records and biblionumbers in atwo arrays (@search_engine_record, @search_engine_record_ids) and pass that to the indexer when $commitnum records are read. The arrays are cleaned afterwards.

BUT: The records and biblionumbers were always stored, even if we're not using Elasticsearch. And as the cleaning of those arrays only happens if we are in fact using ES, all the data is added but never cleaned.

This patch fixes this by only storing record and biblionumber if we have an $indexer (i.e. if we're using Elasticsearch).

I have no idea though how/if the records are indexed when using Zebra.

After applying this patch and importing a large enough file without using Elasticsearch, the RAM usage also stays more or less constant.

@Jan, please verify!

Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:12 +02:00
Thomas Klausner 01d36c5e8b
Bug 37020: (follow-up) Fix txn handling, loop label and record_number counter
So, I reviewed the code, which has a bunch of issues:

* there's a call to `next RECORD`, but no `RECORD` loop label.
* $record_number is incremented twice
* and the calls to txn_begin is moved from the outside the loop into each record, starting one transaction per record. Not sure how mysql handles this, but postgres would not like it.

This patch fixes those issues:

After I fixed the first two issues, I ran the patched script on a file containing 75 authorities (from GND), and not one was added to the DB, presuambly because nested transactions don't work in mysql?

So I also moved the BEGIN transaction outside of the main loop and started a new one after each commit, and added a final commit after to loop.

Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:11 +02:00
David Gustafsson ba0979a4c9
Bug 37020: bulkmarcimport gets killed after update to 24.05. when inserting large files
Include checking for invalid marc data in main loop to avoid
loading all marc data into memory at once.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-12 18:31:11 +02:00
Martin Renvoize 1941a0c87e
Bug 39011: (follow-up) Update selenium tests
We alter how the options are added to the patrons_search datatables
search bar, but we didn't update the selenium test to match.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 16:52:59 +02:00
Tomas Cohen Arazi 93cad32c5b
Bug 39869: Add more tests for the club holds endpoint
This patch does:

* Mock `CanItemBeReserved` and `CanBookBeReserved` to better control the
  test scenario and make it agnostic from existing data.
* Adds tests for the item-level group holds use case
* Adds tests for the warnings printed when placing the hold should not
  be possible

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/clubs_holds.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 16:52:58 +02:00
Martin Renvoize 348ba00ba9
Bug 39237: (follow-up) Fix selenium tests
We change the page title in the templates, but didn't update the
corrseponding selenium test

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 16:52:58 +02:00
Pedro Amorim 09f76a78a9
Bug 39179: Allow edit batch without having to add new items
Test plan:
BEFORE APPLYING PATCHES:
1) Enabled ILLModule
2) Install a metadata enrichment plugin .e.g:
https://github.com/PTFS-Europe/koha-plugin-api-pubmed/releases/tag/1.1.1
3) Visit ILL requests:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl
4) Click 'New ILL requests batch' and pick 'Standard'
5) Enter a name 'test', a cardnumber '42' and any library
6) Click "Continue", enter '123' on the identifiers textarea on the right.
7) Click "Process identifiers"
8) Click "Add items to batch"
9) Click "Finish and view batch"
10) Click 'Batch requests' at the top right of the page.
11) Select the batch you just created and click 'edit'
12) Notice you're unable to 'Continue' or 'Finish and view batch' until you add some pubmedid and click 'Process identifiers'
APPLY ALL PATCHES
13) Repeat test plan
14) Notice the layout and cosmetic changes.
15) Notice you can now edit a batch without having to add new requests. Edit the batch name or library or status and click 'Finish and view batch'. Notice it saves the batch.

Sponsored-by: UKHSA - UK Health Security Agency
Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:18 +02:00
Pedro Amorim adb9df445d
Bug 39179: Adjust modal buttons visibility
1) Hide 'continue' button when its no longer needed
2) Dont display 'finish' button until 'continue' is hidden

Sponsored-by: UKHSA - UK Health Security Agency
Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:17 +02:00
Pedro Amorim bf900f015d
Bug 39179: CSS and layout adjustments:
The layout is now vertical, fieldsets should be shown vertically, not horizontally.
Border inside the modal no longer exists.
Footer has been readjusted to match other modal footers in Koha, both buttons on aligned to the right, where first button is accept and 2nd button is cancel.
'Process identifiers' button style has been updated.

Sponsored-by: UKHSA - UK Health Security Agency
Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:17 +02:00
Pedro Amorim a944b63912
Bug 39179: Update style of 'remove' button when adding requests to batch
Sponsored-by: UKHSA - UK Health Security Agency
Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:16 +02:00
Pedro Amorim 99d0471c8d
Bug 39179: Update batches table icons
Sponsored-by: UKHSA - UK Health Security Agency
Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:16 +02:00
Pedro Amorim 90e18bcaa3
Bug 39444: Make Standard consider pubmedid field
This field may be added by a plugin or jQuery, so Standard should consider it as a possibility.
This patch does not change anything for existing users that do not add a 'pubmed id' field themselves.

1) Enable ILLModule
2) Install the ILL Actions plugin:
https://github.com/PTFS-Europe/koha-plugin-ill-actions/releases/tag/v2.0.1
3) Create a new ILL request:
http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
4) Pick type: 'Journal article', notice a top pop-up for DOI/PubMed ID now shows. This is coming from the plugin.
5) Add something to the pubmedid input like '123'. Notice the metadata is auto-filled.
6) Add a patron cardnumber '42'. Notice the library is automatically picked. Click 'Create'.
7) On the manage request screen, notice the PubMed ID is not shown. This is because it was not saved.
8) Apply patch and repeat.

Signed-off-by: Jeremy Evans <jeremy.evans@ukhsa.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit (tcohen): adapted to 38339
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:15 +02:00
Pedro Amorim 20c993a594
Bug 39697: Add left spacing to form
Test plan, before applying patches:
1) Enable ILLModule and ILLOpacUnauthenticatedRequest
2) Log out, or open a new browser session
3) Create an OPAC unauthenticated request:
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard
4) Notice the form is aligned to the left
5) Apply patch. Repeat

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:15 +02:00
Tomas Cohen Arazi dc68549dbc
Bug 39832: Add $basket->vendor method
This patch adds the method to be used on the API for embedding.
Tests are added.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Acquisition/Basket.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:14 +02:00
Tomas Cohen Arazi b7c4795d6e
Bug 39832: Unit tests
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:14 +02:00
Katrin Fischer 4e94c231c3
Bug 39452: DBRev 24.12.00.042
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:13 +02:00
Nick Clemens b7227e8738
Bug 39452: (follow-up) Use INSERT IGNORE for system preference
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:13 +02:00
Nick Clemens 74a49b117b
Bug 39452: Add CardnumberLog to track changes to cardnumbers
This patch adds a new preference 'CardnumberLog' which allows libraries
to track cardnumebr changes for patrons.

While these changes are currently captured in the BorrowersLog, some libraries
would like to keep cardnumber chanegs specifically, and for a longer period than
other borrower modifications.

To test:
1 - Apply patches, update database
2 - Ensure BorrowersLog and CardnumberLog are enabled
3 - Edit a borrower, not thier cardnuber
4 - Confirm in Modification Log only one entry is recorded
5 - Edit again, changing cardnumber only
6 - Confirm 2 modifications are recorded, a MODIFY and a MODIFY_CARDNUMBER
7 - Disable BorrowersLog
8 - Edit patron changing something other than cardnumber
9 - Confirm no log generated
10 - Edit borrowers cardnumber
11 - Confirm one MODIFY_CARDNUMBER recorded
12 - Disable CardnumberLog
13 - Edit patrons cardnumber and other fields
14 - Confirm no logs generated

Signed-off-by: Philip Orr <philip.orr@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:12 +02:00
David Cook 0d06c27e75
Bug 39623: Remove "install" target's dependency on "all" target
This change removes the install target's dependency on "all". There
is no clear reason why "install" would need to depend on all other
build targets.

After you remove this dependency, running "make" and "make install"
work the way you'd expect them to work. "make" does the build and
"make install" does the install.

Test plan:
0. DO NOT APPLY THE PATCH YET!
1. Setup intall target
sudo mkdir /opt/koha
sudo chown kohadev-koha  /opt/koha
2. Clean build env
rm -rf blib Makefile /opt/koha/*
3. perl Makefile.PL
Installation mode (dev, single, standard) [standard] single
Please specify the directory in which to install Koha [/var/lib/koha/kohadev/koha] /opt/koha
NOTE: Otherwise accept all defaults
4. make
NOTE: build-resources.PL is run and the blib directory is populated
5. make install
NOTE: build-resources.PL is run and the blib directory is populated and the built
files are installed to /opt/koha

6. Apply the patch now
7. mv /opt/koha /opt/koha.bak
8. Re-setup install target
sudo mkdir /opt/koha
sudo chown kohadev-koha /opt/koha
9. Clean build env
rm -rf blib Makefile /opt/koha/*
10. perl Makefile.PL
Installation mode (dev, single, standard) [standard] single
Please specify the directory in which to install Koha [/var/lib/koha/kohadev/koha] /opt/koha
NOTE: Otherwise accept all defaults
11. make
NOTE: build-resources.PL is run and the blib directory is populated
12. make install
NOTE: Only the install step is run

13. diff -r /opt/koha /opt/koha.bak
14. Note that there are no differences between the two directories

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:12 +02:00
Owen Leonard dad63bfdf3
Bug 39688: Improve i18n and spacing
Reworking the template logic of this section improves the spacing and
makes it so that the strings make more sense in translation.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:11 +02:00
Lucas Gass a009011d5c
Bug 39861: Delegate click function to the table
To test:
1 - Add a new Z3950 server with basic information filled out, it doesn't need to be valid
2 - Add a second copy via the DB:
    INSERT INTO z3950servers SELECT null,host,port,db,userid,password,servername,checked,rank,syntax,timeout,servertype,encoding,recordtype,sru_options,sru_fields,add_xslt,attributes FROM z3950servers WHERE id=6;
3 - Delete the copy, assuming it is on page one, it works
4 - Spam the DB with the SQL above and create 20+ entries
5 - Open the Z3950 admin page
6 - Go to second page of servers
7 - Attempt to delete any entry
8 - Nothing happens
9 - APPLY PATCH
10 - Try deleting again, it should now work.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:11 +02:00
Jonathan Druart fb88cabe54
Bug 39473: Add Cypress tests
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:10 +02:00
Jonathan Druart ec2fbc0d81
Bug 39473: Use exact search for column filtering with dropdown
We need to use an exact search when using the id of an option.

Test plan:
0. If not using default KTD data, create an item type with the following settings:
   Item type: BK
   Description: Books
   leave all other values on their defaults

1. Create a new item type with the following settings:
   Item type: BKA
   Description: Other type of book
   leave all other values on their defaults

2. Add or edit items on a bib record so that the record has at least one item of type "Books" and at least one item of type "Another type of book"

3. Go to Normal View for that bib record

4. Click "Show filters" above the item holdings table

5. In the Item type column, filter by "Books"
Only "Books" items show in the table

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:10 +02:00
Pedro Amorim 25167963e9
Bug 39777: Use cardnumber OR authenticated user cardnumber
Test plan:
1) Apply the 'rollback tests' patch to reinstate the testing of the behavior if a cardnumber is missing (and a user is authenticated)
2) Run tests (they should fail):
    prove t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t
3) Apply this patch. Repeat 2) They should pass.

Test plan for UI:
1) Enable ILLModule and ILLHistoryCheck
2) Create a new ILL on OPAC, visit:
http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard
3) Select type="journal", enter DOI = "123". Create.
4) Repeat steps 2 and 3. A history check screen should be displayed (it is not, before this patch).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:09 +02:00
Pedro Amorim c3ef47d432
Bug 39777: Rollback tests
These tests should test an authenticated patron, without the presence of a cardnumber in the metadata (as it is the case in the OPAC form)
This is also the reason why we mock_userenv right below this.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit (tcohen): Tidied the file...
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:09 +02:00
Tomas Cohen Arazi a8afc9f8d7
Bug 39784: Remove stray 'xxx' string in migrate.inc
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-09 09:12:08 +02:00