Commit Graph

56413 Commits

Author SHA1 Message Date
danyonsewell d4ac3fa2c2
Bug 36729: Add publisher/distributor number to standard identifier search index
Have written a patch to allow Publisher/Distributor number to be searched using the standard identifier search index.

Testing plan:

1. Start up KTD with Elasticsearch: ktd --es8 up
2. Apply the patch and restart everything (restart_all).
3. Reset the mappings: Administration > Catalog > Search engine configuration (Elasticsearch) > Reset mappings (at the bottom of the page)
4. Reindex: koha-elasticsearch --rebuild -d -b -a kohadev
5. Alternative to steps 3 and 4: reset_all
6. Update the visibility for 028a in the default framework so that it is visible in the Editor.
7. Add a new record using the default framework and put a term in 028a.
8. Using the advanced search "Standard number" Field, search for the term you put in step 7.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ee69f07c29)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-14 11:59:17 +02:00
Katrin Fischer 068f023b40
Bug 33454: (follow-up) Use tx() to improve translatability
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d8cbdfa2df)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-14 11:59:17 +02:00
Emily Lamancusa 447b118958
Bug 38765: Parse dates correctly
Some dates in invoices.tt are being formatted to the system DateFormat
when they are not being displayed, which causes processing errors when
the code expects ISO format. Dates should be formatted for local format
only when they are being displayed.

To test:
1. Go to Acquisitions and create some invoices
    i. Search for a vendor (can submit a blank search box)
    ii. Click on vendor name
    iii. Click "Receive shipments" button
    iv. In the "Receive a new shipment" section, enter any value in the
        "Vendor invoice" field and click "Next"
    v. Click the "My Vendor" breadcrumb and repeat iii-iv a few times
2. Go to Acquisitions > Invoices
3. Search for some invoices (can submit with all blank filters)
4. Select the checkboxes by two or more invoices
5. Click "Merge selected invoices"
6. Click "Merge" without editing the input data at all
--> Internal server error! "The given date <date> does not match the
    date format (iso)"
7. Apply patch
8. Repeat steps 2-6
--> The invoices are merged successfully!

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 80a5022129)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-14 11:59:17 +02:00
Katrin Fischer ff814e9d92
Bug 38771: Add "Auth" prefix to system preference search query
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 907118e9b0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-14 11:59:13 +02:00
David Cook 29ba9d81c7
Bug 39460: Fix koha-upgrade-schema when no DB change needed
This patch fixes koha-upgrade-schema so that it returns an exit
code of 0 whether or not a DB change is needed. This is important
so that koha-common.postinst proceeds correctly even when there
is no DB change needed (e.g. for 24.11.03-2)

Test plan:
0. Apply the patch
1. cp debian/scripts/koha-upgrade-schema /usr/sbin/koha-upgrade-schema
2. dpkg-reconfigure koha-common
3. Note the process completes correctly
4. koha-upgrade-schema kohadev
5. Note following text appears very quickly:
Upgrading database schema for kohadev
No database change required
6. koha-mysql kohadev
update systempreferences set value = '24.1102000' where variable = 'Version';
7. Clear memcached
8. koha-upgrade-schema kohadev
9. Note that it applies the 24.11.03 database upgrade

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-02 17:02:14 +02:00
Jonathan Druart 043451b08d
Bug 38684: Fix problem with koha-translate
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3c1a4a2ffb)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-25 15:55:49 +01:00
Paul Derscheid 3224a2fac1
Merge branch '24.11.x-security' into 24.11.x
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-25 09:44:04 +01:00
Paul Derscheid 8adac85be4
Update release notes for 24.11.03 release 2025-03-24 19:24:58 +01:00
Paul Derscheid d391a7f1a2
Increment version for 24.11.03 release
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:13 +01:00
Paul Derscheid 0ebbfe802b
24.11.03: Update contributors.yaml 2025-03-24 18:13:11 +01:00
Paul Derscheid a993704ec5
Bug 38108: DBRev 24.11.02.001
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:11 +01:00
Katrin Fischer 30007f6f98
Bug 38108: (follow-up) Amend system preference description with "staff interface"
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 707d3b3563)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:10 +01:00
Emily Lamancusa 84fd8d28e7
Bug 38108: (QA follow-up) Use say_success in dbrev
Use say_success instead of say when outputting a line that the
system preference was added successfully

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 606cd8d63e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:09 +01:00
Lucas Gass a994955855
Bug 38108: Add ability to show/hide table filters via system preference
To test:
1. APPLY PATCH, updatedatabase, restart_all
2. Search for the 'AlwaysShowHoldingsTableFilters' system preference. It should be set to 'Don't'.
3. Without changing the system preference, go to a record detail page.
4. The filters should not show by default.
5. Make sure that toggling the Hide filters/Show filters button still work as expected.
6. Set 'AlwaysShowHoldingsTableFilters' to 'Do'.
7. Now the filters should show by default when you load the table.
8. Make sure that toggling the Hide filters/Show filters button still work as expected.

Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 04f398890e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:09 +01:00
Lucas Gass e3318f2fec
Bug 38108: Add system preference AlwaysShowHoldingsTableFilters
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9a55785c8b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:08 +01:00
Jonathan Druart 5a2ac2285e
Bug 38632: Do not show all columns when displaying the filters
Yet another visibility bug fix for this specific table.
When the filters are displayed the table is destroyed and recreated.
We should not save the visibility changes made by DT and consider them
changes made by the user.
A temporary variable is used to store the user settings duringt this
action, then we restore them once it's done.

Test plan:
Go to the detail page of bibliographic record with items
Click on "show filters"
=> Only columns displayed should still be displayed
Retry but show/hide some columns before you display the filters
=> Only columns displayed should still be displayed

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0fefe2bed5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:08 +01:00
Lisette Scheer dd9c0d846c
Bug 39172: Merging records no longer compares side by side
This patch updates the cataloging merge screen to restore side-by-side
comparison.

Both columns had ids added by the patch for formatting purposes.

To test:
1. Go to cataloging module
2. Do a search (in sandboxes/ktd 1 works)
3. Select 2 or more records to merge
4. Click the "merge selected" button
5. Observe there are 2 columns on top of each other instead of side by
   side
6. Apply the patch
7. Restart all & rebuild css
8. Repeat steps 1-4
9. Observe the columns are side by side again.
10. Sign-off

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jason Vasche <jvasche@roundrocktexas.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4156022d8a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:07 +01:00
Andrew Fuerste Henry d4d4df1102
Bug 39025: Use old_issue_id for issue details on patron account screens
To test:
1: Have an item that is checked out, overdue, and showing an accruing fine
2: On the patron account, check both Make A Payment and Transactions tabs, confirm that the fine shows Due Date, Checkout Date, and Checked Out From values
3: Check your item in
4: Reload the patron account, confirm that the fine no longer shows checkout data on either Make A Payment or Transactions
5: Apply patch
6: Reload pages, confirm Make A Payment and Transactions tabs now show values in Due Date, Checkin Date, Checkout Date, and Checked Out From

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 41a368f35e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:07 +01:00
Nick Clemens 622abfa3b2
Bug 39108: Prevent 'Ignore' on found hold from triggering a new modal
When ignoring a waiting hold, we don't need to take any further action, we
shoudlsimply close the modal

This patch adds JS to prevent form submission

To test:
1 - place a hold
2 - check in an item that can fill the hold
3 - in the hold found modal, click Ignore
4 - the modal dismisses and nothing changes on the hold (this is the desired behavior)
5 - check in the item again, click Confirm Hold, confirm your hold is now Waiting
6 - check in the item again, confirm the modal says "Item is already waiting"
7 - click Ignore, confirm modal reloads
8 - click Ignore, confirm modal reloads
9 - click Ignore, confirm modal reloads
10 - Apply patch
11 - check in the item again, click Confirm Hold, confirm your hold is now Waiting
12 - check in the item again, confirm the modal says "Item is already waiting"
13 - click Ignore, nothign happens! Orange you glad I didn't say banana?

Signed-off-by: Amanda Campbell <acampbell@hmcpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 177d648ded)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:06 +01:00
Lucas Gass 708f14ce56
Bug 39270: Check to make sure checkouts are not already booked
To test:

1. Find an item that is bookable, I turned on Bookable at the item type level for BK. I am using biblionumber=28 in k-t-d with 3 items
2. Book item with barcode ( 39999000001297 ). I did March 7 - April 1
3. Book item with barcode ( 39999000001259 ). I did March 7 - April 1
4. Now checkout 39999000001297 to the patron is was booked to. When asked about early collection say yes.
5. Now item with barcode ( 39999000001273 ) is not checked out or booked. It should be bookable
6. Try to book it, it is not available till April 2, though it should be available right now.
7. APPLY PATCH
8. Try the bookings again.
9. You should correctly not be able to book 39999000001297 or 39999000001259.
10. You should be able to book 39999000001273.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 37c8c6606a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:05 +01:00
Nick Clemens d0f50136c8
Bug 37920: Add cronjob loggging to writeoff_debts.pl
This patch adds the same logging as other cronjobs have

To test:
1 - Enable system preference CronjobLog
2 - perl misc/cronjobs/writeoff_debts.pl -v -c --added-after 2025-01-01
3 - Check the logs - no entries
4 - Apply patch
5 - Repeat 2
6 - Check the logs, two entries - one for the start and one for the end

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tested on top of bug 39236. Works as advertised.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit de9c1a8ff2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:05 +01:00
Nick Clemens 358c60bee0
Bug 39236: writeoff_debts.pl needs adjustments
From bug 22435 - we need to use 'CREATE' as the account_offset type
From bug 31095 - we need to 'use Koha::Patrons;'

To test:
1 - Add a fine to a patron account
2 - perl misc/cronjobs/writeoff_debts.pl -v -c --added-after 2025-01-01
3 - Cronjob dies
4 - Apply patch
5 - Rerun
6 - Job succeeds!
7 - Confirm patron's fine is written off
8 - Sign off

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 93e2a0953d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:04 +01:00
Paul Derscheid a0d2779c31
24.11.03: Update contributors.yaml
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:04 +01:00
Phil Ringnalda 1e9c53d0b8
Bug 38853: Make 'Cancel selected' on holds table work
Because 'Cancel selected' on the table of existing holds uses
$("#cancel_modal_form #inputs").empty; rather than empty();, it fails to
clear out whatever things are in there before it puts in the things it wants.
That leaves things in a confused state, and makes it fail to actually cancel
holds.

Test plan:
1. Without the patch, add a hold to any bib record
2. Select the checkbox for the hold you placed, then click 'Cancel selected'
   and confirm that you want to cancel
3. Note that there's no message box about a background job having been
   enqueued, and no matter how long you wait, the hold doesn't go away
4. Apply patch, repeat step 2, note that there's now a message box, and
   when the background job finishes, that the hold has been deleted.

Sponsored-by: Chetco Community Public Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3bd4a9fad6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:03 +01:00
Pedro Amorim f77d570e34
Bug 39175: Fix Attributes->Attribute
Bug introduced in FreeForm prior to adding it to core in this commit:
369dffb159 (diff-662970ddc6f6828afd23e6823399a4a32807c4a6c487a0aff86c9d116f60797dR806)

It should've been Koha::Illrequestattribute into Koha::ILL::Request::Attribute not Koha::ILL::Request::Attributes

To test, k-t-d:
1) Enable ILLModule syspref
2) Edit the only patron in k-t-d with the 'Interlibrary loan' category:
<staff_url>/cgi-bin/koha/members/memberentry.pl?op=edit_form&destination=circ&borrowernumber=16
3) Add a valid e-mail address to 'Primary email:'
4) Create a new ILL request:
/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
5) Add any type, any valid patron cardnumber, any library. Click 'Create'.
6) Click 'Place request with partners'
7) Pick the only available partner library 'FRL-Walker'
8) Click 'Send email'.
9) Notice you get an error. Apply patch & restart plack. Repeat.
10) Confirm the there's no error and message was queue as expected:
$ select * from message_queue;

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0d59a3db8d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:03 +01:00
Owen Leonard 4dc4651e67
Bug 39268: Fix tab switching on lists page
This patch fixes broken tab switching on the staff interface lists page.
It was broken by the upgrade to Bootstrap 5.

To test, apply the patch and go to the Lists page in the staff
interface.

- If necessary, create multiple public and private lists.
- Confirm that switching between the "Your lists" tab and the "Public
  lists" tab works correctly.
- Try using URL parameters to load each tab:
  http://127.0.0.1:8081/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=0
  http://127.0.0.1:8081/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=1

Sponsored-by: Athens County Public Libraries
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3054868fc4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:02 +01:00
Nick Clemens 636c290186
Bug 39044: Pass budgets to template
This simply copies the fetch of budgets from the acqui/histsearch.pl script.

We should in the future make this a template or other method to avoid code duplication,
but we should fix the functionality first.

To test:
1 - Go to Acqusitions
2 - See the dropdown "Fund: All funds" in the order search section
3 - Click it
4 - Feel disappointed
5 - Apply patch and restart all
6 - Reload and click the dropdown
7 - Options! Feel warm and fuzzy

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c5f598d874)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:01 +01:00
Lucas Gass 7b312a9554
Bug 39244: Fix display of change password/duplicate buttons
To test:
1. Make or find some patron categoies that are not adult category type.
2. On patron pages notice that the Change password and duplicate
   buttons are missing from the toolbar.
3. APPLY PATCH
4. Try again, this time the pChange password and duplicate buttons
   should appear.
5. Make sure the 'Add guarantee' buttons still work.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9580e06e67)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:01 +01:00
Martin Renvoize f0f00c6c1d
Bug 38375: Unit tests
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9bed52a868)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:00 +01:00
Martin Renvoize 3967f4cbdb
Bug 38375: Use perl 5.10+ \R
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 006485a036)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:13:00 +01:00
Lari Strand ee703aba86
Bug 38375: Splitting SIP2SortBinMapping syspref does not support all operating systems' line endings
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3407dc28a3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:59 +01:00
Jake Deery 69ad16e955
Bug 38957: edifactmsgs data table sorts on date
This trivial patch addresses a missing order-by on
the edifact messages datatable since moving to API
based fetching

TO TEST:

a)  Read in a load of EDIFact messages in k.t.d
b)  Notice on the EDIFact messages table the order
    is seemingly arbitrary
c)  APPLY PATCH
d)  Notice the sorting is now by transfer date,
    descending

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 09d3fd9b95)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:59 +01:00
Emily Lamancusa 17f56ba608
Bug 39183: Only check unresolved claims
To test:
1. Set up sysprefs:
   - Set any non-empty value for ClaimReturnedLostValue
   - Set AutoClaimReturnStatusOnCheckout to "found in library"
   - Set AutoClaimReturnStatusOnCheckin to "returned by patron"
2. Check out an item to a patron
3. On the patron's account page, click the "Claim Return" button next to
   that checkout
4. Check the item in. Note the message that the claim was auto-resolved.
5. Return to the patron's account page and open the Claims Returned tab
--> Note that the claim is resolved and hidden
6. Click the "Show all 1 claims" link to view the hidden claim. Make a
   note of the resolution code and timestamp.
7. Check the item out again
--> Note the message saying that the claim was resolved, even though it
    was already resolved previously
8. View the return claim again
--> Note that the timestamp and resolution code have changed
9. Apply patch and restart_all
10. Repeat steps 2-8 with a new item
--> Note you do not get a claim resolved message on checkout this time
--> Note that the timestamp and resolution code remain the same before
    and after the checkout

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4b6325dfce)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:58 +01:00
Emily Lamancusa c42c928adf
Bug 38793: Don't dismiss modal before submitting form
Remove the bs-data-dismiss attribute from the "cancel transfer" button
on the Wrong Transfer modal. The "cancel transfer" button's JS works by
adding a hidden input and then submitting the form - we don't want
Bootstrap to dismiss the modal before the embedded form has been
submitted.

Note: This bug seems to be browser-dependent. So far it has been
reproduced with Firefox, but not Chrome/Chromium or Microsoft Edge

To test:
1. Log into the staff client using Firefox
2. Set up system preferences:
   TransfersBlockCirc - Don't block
   AutomaticConfirmTransfer - Do
3. Find or create an item that belongs to a branch other than the
   logged-in branch
4. Check in the item to trigger a Return to Home transfer
5. Click OK on the modal to confirm the transfer
6. Check in the item again to trigger a Wrong Transfer modal
7. Click the "Cancel transfer" button on the modal
8. Navigate to the bib for that item and check the item status
--> The transfer wasn't cancelled - the item is still in transit
9. Apply patch and refresh the page
10. Repeat steps 6-8
--> Item shows as available - the transfer was cancelled successfully

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
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>
(cherry picked from commit cdf12b9bda)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:58 +01:00
Katrin Fischer 182cd42e60
Bug 38766: (follow-up) Make confirmation message translatable
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit be1646fb80)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:57 +01:00
Emily Lamancusa 1ef8886a24
Bug 38766: Use uri filter for all parameters in referer link
Also fixes the confirmation message for deleting.

To test:
1. Go to Acquisitions and create some invoices
    i. Search for a vendor (can submit a blank search box)
    ii. Click on vendor name
    iii. Click "Receive shipments" button
    iv. In the "Receive a new shipment" section, enter any value in the
        "Vendor invoice" field and click "Next"
    v. Click the "My Vendor" breadcrumb and repeat iii-iv a few times
2. Go to Acquisitions > Invoices
3. Specify search filters for shipment to/from dates (that include the
   invoices you entered) and search for invoices
4. Try opening, closing, and deleting individual invoices using the
   Action menu
--> Internal server error! "The given date <date> does not match the
    date format (iso)".
--> Also, note that there is no confirmation dialog when deleting
5. Apply patch
6. Repeat steps 2-4
--> Confirm that invoices can be opened and closed using the drop-down
    menu with no issue
--> Confirm that both open and closed invoices can be deleted with no
    issue, and that a confirmation message displays before deleting

Note for QA: search for $KohaDates within invoices.tt, and confirm that
the $KohaDates filter is now only used for display, never for Internal
data storage/flow

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 47f35a4017)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:57 +01:00
David Cook c19b6e8968
Bug 38826: Make check_api_auth $sessionID consistent
This change makes $sessionID consistently return using the session
ID and not sometimes the session object.

Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. curl -v 'http://localhost:8081/cgi-bin/koha/svc/authentication' --cookie-jar /tmp/test.cookies
3. Note the Csrf-Token header value
4. Replace the <CSRF-TOKEN>, <USERID>, and <PASSWORD> tokens in the next step
using the appropriate values (eg the CSRF-TOKEN is from the previous step)
5. curl -v -H "Content-Type: application/x-www-form-urlencoded" \
    -H "Csrf-Token: <CSRF-TOKEN>" -XPOST \
    'http://localhost:8081/cgi-bin/koha/svc/authentication' \
    -d "login_userid=<USERID>&login_password=<PASSWORD>" \
    --cookie /tmp/test.cookies --cookie-jar /tmp/test.cookies
6. curl -XGET -v 'http://localhost:8081/cgi-bin/koha/svc/bib/29' \
    --cookie /tmp/test.cookies > rec.marcxml
7. curl -v 'http://localhost:8081/cgi-bin/koha/svc/authentication' \
    --cookie /tmp/test.cookies --cookie-jar /tmp/test.cookies
8. Note the Csrf-Token header value
9. curl -H "Content-Type: text/xml" -H "Csrf-Token: <CSRF-TOKEN>" \
    -XPOST -v 'http://localhost:8081/cgi-bin/koha/svc/bib/29' \
    --cookie /tmp/test.cookies --data @rec.marcxml

Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 04dbbcc2f2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:56 +01:00
Andrew Fuerste Henry f10e7f799c
Bug 38986: Restore Any in fund dropdown on suggestions homepage
This patch restores Any as a budget filter option on the suggestions homepage, but does not allow one to select Any when saving a suggestion

To test:
1 - have two suggestions, one with a fund assigned and one without
2 - go to /cgi-bin/koha/suggestion/suggestion.pl, use Fund filter, confirm it does not offer an Any option
3 - apply patch, reload page
4 - use Fund filter, confirm it shows Any as an option and both Any and None work properly
5 - confirm you cannot select Any when creating a new suggestion

Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>

Bug 38986: Restore Any option to suggestions homepage filter

"Any" should show all suggestions, any fund value and null fund values. One should not be able to create a suggeestion set to "Any"
"None" should show only suggestions with no fund value selected. A new suggestion should default to "None"

To Test:
1: have two suggestions, one with a fund selected and one without
2: go to suggestions homepage, confirm the filter does not have an "Any" option
3: apply patch, reload page
4: confirm the fund filter on suggestion homepage now has both Any and None and they behave as described above
5: confirm the fund filter defaults to Any as you change the branch filter
6: create a new suggestion, confirm its fund defaults to None and cannot be set to Any

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit da6996c08e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:55 +01:00
Jonathan Druart b4acbebd6a
Bug 36025: Fix failure when pref is off
Prevent JS error if ExtendedPatronAttributes is off
 "Uncaught TypeError: options.extended_attribute_types is undefined"

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Makes the Cypress tests pass.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 16f528e4b4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:55 +01:00
Jonathan Druart a8380e82a5
Bug 36025: Add cypress tests
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tests pass, with the followup patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 60332e7552)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:54 +01:00
Andreas Jonsson 4bb59ec348
Bug 36025: Incorrect clause in patron search
This patch removes the search clause for
extended_attributes when there is no patron
attribute types which are searchable by default.

The clause was incorrectly added because the array
extended_attribute_types was rendered as [""]

This seems to be an issue with get_columns from DBIX Class and how that is cast when forcing an array
in the template. It returns an empty string for nothing, a scalar for a single value, and an array for multiple
values.

This patch now checks if the variable is set and has content, and wraps as an array if so. In the case of two attributes,
we do double the array, but this was true before as we always cast the return as an array.

Test plan:

* Make sure that no borrower attribute type is set to "searched by default"
  in Koha administration -> Patron attribute types.
* Enable the network monitring in the developer tools in your web browser
  (Ctrl + Shift + E in firefox or Ctrl + Shift + I and select the "Network"
  tab).
* Go to the patrons view members-home.pl (click patrons in top menu bar).
* Search for a string that will match multiple borrowers (to not be automatically
  redirected)
* Examine the ajax-request and make sure that "extended_attributes.code" is NOT
  part of the query.
* Also, in koha-testing-docker with selenium enabled,
  run 'perl t/db_dependent/selenium/patrons_search.t'
* Now set one patro attribute to searchable and searched by default and add a value for a patron, confirm search works
* Set a second patron attribute to searchable and searched by default and confirm searching works

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Did not run the selenium tests, as they have
been obsoleted.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 208a7cc3a4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:54 +01:00
Nick Clemens 779d89df0e
Bug 39282: (follow-up) Use generated budget and don't rely on existing data
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f97533c7a0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:53 +01:00
Nick Clemens 4b29adb4bc
Bug 39282: Use generated MARC record to create item and return itemnumber
When creating items from the form we need to use the MARC record we build from the HTML->XML->MARC

This patch simply uses the variable we create and ensures we pass the itemnumbers back

To test:
1 - prove -v t/db_dependent/Koha/MarcOrders.t
2 - Still failing
3 - Apply this patch
4 - Success!

Phew! We did it.

Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3f6d482410)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:53 +01:00
Nick Clemens 89302013aa
Bug 39282: Clarify use of budget codes and ids
When getting items from the form on addorderiso2709.pl we are getting actual budget id's,
we only deal with codes when fetching the values from the MARC.
The code here assigns an id into a variable called code - this patch clarifies that and
ensures that we fallback to using the id if one has been passed from the interface form

To test:
0 - Apply first two patches
1 - prove -v t/db_dependent/Koha/MarcOrders.t
2 - It fails
3 - Apply this patch
4 - It fails?

Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fd609d9bb3)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:52 +01:00
Nick Clemens 21350cb20d
Bug 39282: Ensure items are created using Item Information values if not using MarcItemFieldsToOrder
When using MarcFieldsToOrder and not MarcItemFieldsToOrder it is expected that all of the item
information will come from the second tab 'Item information' on addorderiso2709.pl

Currently we are not and blank items are beign created

To test:
 1 - Apply unit tests
 2 - prove -v t/db_dependent/Koha/MarcOrder.t
 3 - It fails
 4 - Set MarcItemFields to Order:
     price: 949$p
     quantity: 947$c
     budget_code: 947$f
 5 - Ensure MarcItemFieldsToOrder is blank
 6 - Find a basket in acquisitions
 7 - Add to basket from a file
 8 - Fill item information, set 'Matching' at top of form to 'Do not look for matchign records' and save
 9 - Orders are added
10 - Click on a title
11 - Items do not load and an error is generated, this is because items don't have any values
12 - Check the DB:
     SELECT * FROM items WHERE homebranch IS NULL\G
13 - Note items from order are listed
14 - Apply the rest of the patches
15 - Repeat 6-10
16 - This time the items load successfully

NOTE: This patch alone doesn't address all errors, but subsequent will, keeping separate to address
each issue individually, but test plan can be executed as a whole against all

Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5034c27628)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:52 +01:00
Nick Clemens 2bf988a5d4
Bug 39282: Unit tests for item creation
Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a68623009b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:51 +01:00
Matt Blenkinsop 2f4d62bb8d
Bug 39007: Update API spec and unit test
Test plan:
1) Run prove t/db_dependent/api/v1/erm_sushi_services.t - FAIL
2) Apply patch
3) Repeat step 1 - PASS
4) Inspect patch diff and note that last_audit has been added to the API definition

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5d67151107)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:51 +01:00
Nick Clemens dc765520c1
Bug 38459: Ensure cities field works in patron quick add
This patch adjust the selector for quick add and updates the change event for the city
dropdown to affect quickadd fields as well

To test:
 1 - Administration->Cities and towns
 2 - Define several cities
 3 - http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=PatronQuickAddFields
 4 - Select city,state, zipcode and some other fields
 5 - Patrons->Quick add new patron
 6 - Note city field/dropdown does not show
 7 - Apply patch
 8 - Reload
 9 - City dropdown shows!
10 - State and zip are updated when city is selected!
11 - Celebrate!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b007966f44)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:50 +01:00
Emily Lamancusa c69e7864f6
Bug 38789: Add block class to WrongTransfer modal
To test:
1. Find or create an item belonging to a branch other than the logged-in
   branch
2. Check in the item and click OK in the "transfer to home" modal
3. Check the item in again
--> The Wrong Transfer modal should appear, but it doesn't!
4. Apply patch
5. Cancel the transfer or find a different item
6. Check in the item and click OK in the "transfer to home" modal
7. Check the item in again
--> The Wrong Transfer modal should appear
8. Click OK
9. Open the bib record for that item in a new tab
--> The item should have a status of "In transit"
10. Change the system preference TransfersBlockCirc to don't block
11. Check the item in again
--> The Wrong Transfer modal should still appear
12. Confirm that you can click outside the modal to dismiss it without
    choosing an option

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 46e025d08c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:49 +01:00
Owen Leonard 4fa4464601
Bug 35808: Remove obsolete responsive table markup from several pages in the OPAC
This patch removes span.tdlabel from several templates. The markup is
obsolete now that we use the DataTables responsive feature.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)

- Log in to the OPAC as a user with checkouts, suggestions, and tags.
- Check these pages to confirm that the tables on each one have the
  correct responsive behavior at varying browser widths:
  - OPAC home -> Most popular
  - Your account
  - Your account -> Checkout history
  - Your account -> Suggestions
  - Your account -> Tags
* The recalls history page is fixed in Bug 37158

Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2627cfbe1d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-03-24 18:12:49 +01:00