commit 82812114c02209e2a34b8e58f820bea959218b18 Author: Martin Renvoize Date: Mon Nov 16 11:47:31 2026 +0000 Bug 22639: (RM follow-up) Restore the commented-out head and body tags in mappings.tt Bug 22639 formatted mappings.tt with prettier directly instead of misc/devel/tidy.pl. The Koha Template Toolkit prettier plugin rewrites , and as HTML comments because they are unbalanced inside a single template, and only tidy.pl reverts that. The commit therefore left in the template, so the page was served with its head and body tags commented out. xt/tt_tidy.t did not catch it: tidy.pl cannot repair an already damaged file (prettier nests the comment and tidy.pl strips only the inner pair), so its output equals the damaged file and the test passes. Restore and . tidy.pl --no-write now reproduces the file unchanged. Signed-off-by: Martin Renvoize commit 91236b3e6826794ae29906a1da97a57a0a65c637 Author: Martin Renvoize Date: Mon Nov 16 11:11:48 2026 +0000 Bug 33501: (RM follow-up) Allow TT in the cashup payment types script xt/tt_script_tidy.t failed on pos/register.tt: the second inline script builds cashupPaymentTypes with a [% FOREACH %] but is not marked data-tt-allowed. Move the cashupPaymentTypes constant into the first script, which already carries data-tt-allowed="true" for the other cashup data. The second script still reads it as a global constant. Signed-off-by: Martin Renvoize commit 3c7da3969c3875f45b45e6ffefe3236a7879555a Author: Martin Renvoize Date: Mon Nov 16 11:11:43 2026 +0000 Bug 33260: (RM follow-up) Fix template tidy and main-container failures Three xt tests fail on the notices templates: * xt/find-missing-main-container.t: tools/notices.tt hand-wrote
and
. Move the sidebar into an aside_block and wrap the content in main-container.inc, as other pages with a custom sidebar do. main-container.inc already includes messages.inc, so drop the duplicate include and the stray closing tag left after intranet-bottom.inc. * xt/tt_script_tidy.t: the script in members/notices.tt contains Template::Toolkit tags (the can_print order) but lacked data-tt-allowed="true". * xt/tt_script_tidy.t: the script in members/print_notice.tt had data-tt-allowed="true" but contains no Template::Toolkit tags. Signed-off-by: Martin Renvoize commit 441abebc01b5a6418160f795baa77992c910d877 Author: Martin Renvoize Date: Mon Nov 16 11:11:42 2026 +0000 Bug 41294: (RM follow-up) Fix the test plan of UsageDataProvider.t The test declared tests => 5 for its five subtests, but it also uses Test::NoWarnings, which adds a sixth test ("no warnings"). Prove reported "planned 5 tests but ran 6" and exited 255 even though every subtest passed. Plan 6 tests. Signed-off-by: Martin Renvoize commit 792bcc62e3fb518060aa0c953027ddd5da7cc8d5 Author: Martin Renvoize Date: Mon Nov 16 11:11:42 2026 +0000 Bug 42425: (RM follow-up) Add checkin_id to the account line API definitions Bug 42425 added accountlines.checkin_id and the DBIC column, so Koha::Account::Line->to_api now returns checkin_id. The account_line, credit and debit swagger definitions have additionalProperties: false and did not list it, so response validation rejected every account response with "Properties not allowed: checkin_id" and the API answered 500 for GET /patrons/{patron_id}/account and POST /patrons/{patron_id}/account/credits. This made t/db_dependent/api/v1/patrons_accounts.t fail (get_balance() and add_credit() subtests, the warning and the plan). Add checkin_id as a read-only nullable integer to the three definitions. Signed-off-by: Martin Renvoize commit e9826904564721563eef4957c1fe918e8f36ef4f Author: Martin Renvoize Date: Fri Nov 13 10:22:50 2026 +0000 Bug 42383: (QA follow-up) Say the result of a dialog once, in an alert, and keep the dialogs for decisions Dialogs are for what staff have to decide or read: a transfer, a hold, a recall, a claim, the contents of a bundle, a note of the patron. The results of the check-in are alerts under the form, including the result of what was chosen in a dialog. Two things did not follow that: - The dialog of a transfer listed all the check-in messages (item type message, fees, restrictions...), and the dialog of a claim the messages about the lost item fees. They were shown again as alerts as soon as the dialog was closed. They are no longer in the dialogs, the alerts have them. The dialogs keep what is needed to decide: the reason of the transfer, the hold and its patron, the recall, the fields of the claim - Nothing said the result of the choice: after Confirm hold, Cancel transfer or Resolve claim only the badge of the row changed. An alert now says it once the dialog is closed: "Hold confirmed: the item is waiting at X" or "being sent to X", "The hold was cancelled.", "The item is being sent to X.", "The transfer was cancelled." or "The item was not transferred.", "Recall confirmed.", "The return claim was resolved." Test plan: 1. Apply the patch and rebuild the JS (yarn js:build) 2. Check in an item that belongs to another library, with an item type message (Check in message of the item type), and open the transfer dialog => The dialog has the reason of the transfer, not the message 3. Press OK (Y) => The alerts say that the item is being sent, and show the message 4. Repeat with a hold (Confirm hold), a cancelled transfer and a return claim => An alert says the result each time 5. Run: $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 886a6776381febe6f3cbfac7a5801073e9df26e8 Author: Martin Renvoize Date: Fri Nov 13 10:22:43 2026 +0000 Bug 42383: (QA follow-up) Do not take the focus from the field of an open dialog The check-in page puts the focus back in the barcode box after a scan, once a dialog is closed and when a dialog opens. When one of these ran after the dialog had focused its own field, the focus left it: the barcodes of a bundle were typed half in the dialog and half in the barcode box, and the date picker lost the focus that kept its calendar open. It depended on how fast the server answered, so the check-in tests failed from time to time. The focus is no longer taken from an input, a textarea or a select inside an open dialog. Test plan: 1. Apply the patch and rebuild the JS (yarn js:build) 2. Check in the host of a bundle and scan its parts into the barcodes box => All the barcodes land in the box, whatever the speed of the server 3. Run: $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 1b1dd8e1b5676f692c0cf49db55119245b0f7fe4 Author: Martin Renvoize Date: Fri Nov 13 09:26:40 2026 +0000 Bug 42383: (QA follow-up) Make the librarian read the note a patron left on the checkout A patron can leave a note on a checkout (AllowCheckoutNotes). It is freeform, and it is not a message staff come to expect, so a blue alert under the form is easy to get used to and ignore. On the legacy page it is a heading in the message area of the page. When a returned item has such a note, and there is nothing else to decide for it, the page now opens a dialog with the note, its date and an "Acknowledge (Y)" button. As the dialogs of a blocking transfer, it dims the page and disables the barcode box until the note is read. Items that need a hold, transfer, recall or claim answer show the note in that dialog, as before. It queues with the other dialogs: one is shown at a time. The note stays on the row, in the Note column, once it was read. This is the exception to the rule that a dialog is for a choice that changes what happens next: staff have to read this one. Test plan: 1. Apply the patch and rebuild the JS (yarn js:build) 2. Check out an item to a patron, and give the checkout a note (the patron can add it in the OPAC, with AllowCheckoutNotes on) 3. Check the item in => A dialog "Note from the patron" shows the note and the date; the page is dimmed and the barcode box is disabled 4. Press "Acknowledge (Y)" => The barcode box is ready again, and the row shows the note 5. Run: $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 0edfe7aff1f2467f391e53d7d2f44f68687d235b Author: Martin Renvoize Date: Fri Nov 13 08:49:01 2026 +0000 Bug 42383: (QA follow-up) Say what closing the transfer dialog does Closing the dialog of a transfer without a button (Escape, or scanning the next item) does different things: it confirms an existing transfer when AutomaticConfirmTransfer is set, leaves it as it is when it is not, and does not create the transfer when AutomaticItemReturn is off. Nothing on the dialog said which, and the primary button is the same in all three cases. The dialog now has a line under the question that says what closing it will do. It is not shown when TransfersBlockCirc blocks the page, as the dialog cannot be closed then. Test plan: 1. Apply the patch and rebuild the JS (yarn js:build) 2. Set AutomaticItemReturn to "Automatically transfer", AutomaticConfirmTransfer to "Don't confirm" and TransfersBlockCirc to "Don't block". Check in an item that belongs to another library => The dialog says that closing it leaves the transfer as it is 3. Set AutomaticConfirmTransfer to "Confirm" and check in another => It says that closing it, or scanning the next item, confirms the transfer 4. Set AutomaticItemReturn to "Don't automatically transfer" and check in another => It says that closing it does not transfer the item 5. Run: $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 5b1a21971fdaa0808d1b3e2df9cb95534abe67ab Author: Martin Renvoize Date: Fri Nov 13 08:48:47 2026 +0000 Bug 42383: (QA follow-up) Show "Not checked out" and "Local use recorded" as alerts, and say when a hold was cancelled The new check-in page only showed "Not checked out" and "Local use" as small badges in the Status column of the row, where the legacy page shows them as messages. They were also both blue. The page also cancels, like the legacy one, the waiting holds that the patron asked to cancel before returning the item, and said nothing about it: the only thing visible was "Not checked out" and "Local use", as if the item had been scanned with no hold on it. The results are now alerts under the form, like the other results: - "Not checked out." is a warning (yellow). The message is a warning in the API, so its badge is yellow as well - "Local use recorded." (RecordLocalUseOnReturn) is information (blue) - "The hold waiting for this item was cancelled: the patron asked for it to be cancelled." is information, and the row has a "Hold cancelled" badge. The API reports it as a "hold_cancelled" message with the hold and the patron The tests also cover the note a patron leaves on a checkout, which the page already shows as a "Patron note" alert and which had no test. Test plan: 1. Apply the patch, rebuild the JS (yarn js:build) and restart_all 2. Set RecordLocalUseOnReturn to "Record", and check in an item that is not checked out => A yellow alert says "Not checked out." and a blue one "Local use recorded." 3. Place a hold on an item, set it waiting (check it in and confirm the hold), then cancel it as the patron from the OPAC (Request cancellation) and check the item in again => A blue alert says that the hold was cancelled, and the row says "Hold cancelled" 4. Check out an item with a note (OPAC, AllowCheckoutNotes) and check it in => The "Patron note" alert is shown 5. Run: $ prove t/db_dependent/api/v1/checkins.t $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit a0dd3d0365dcacc3c72cebdbfb1607f25786db1d Author: Martin Renvoize Date: Fri Nov 13 07:42:10 2026 +0000 Bug 42383: (QA follow-up) Restore the Columns, Export and Configure controls of the checked-in table The legacy page shows the checked-in items in a DataTable with its menu: Columns (show or hide a column), Export (CSV, Copy, Print), Copy shareable link and Configure (the table settings in the administration). The new page showed the table without any of it. The columns only followed the table settings, and there was a TODO for the rest. The table now has the same controls above it, right aligned and without outlines until hovered, as the buttons of the DataTables. They are a new shared component, TableControls, for the tables that Vue renders itself (KohaTable keeps its DataTables buttons): each control is there when the table gives what it needs, so another table can have only some of them. The helpers to print, copy and download a table move to utils/: - Columns: a menu with a checkbox for each column of the table settings, starting from their defaults (Date acquired is hidden, for example). The choice is remembered in the browser, so it is the same on the next check-in session - Export: CSV, Copy and Print of the table as shown: the visible columns and their cells, without the buttons - Configure: a link to the table settings (module circ, page returns, table checkedintable), for librarians allowed to configure the columns "Copy shareable link" is not brought back: it shares the search, sorting and page of a table that has data of its own, and this table lists what was checked in during the session. Test plan: 1. Apply the patch and rebuild the JS (yarn js:build) 2. Check in an item => Columns, Export and Configure are above the table 3. Open Columns, untick "Call number" and tick "Date acquired" => The table loses the first and gains the second, headings and cells 4. Reload the page and check in another item => The same columns are shown 5. Open Export and choose CSV, Copy and Print => The visible columns are exported 6. Press Configure => The table settings of the check-in table open 7. Run: $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 074d5a137d6c36529660ea7232d344eeb11157a7 Author: Martin Renvoize Date: Thu Nov 12 18:09:09 2026 +0000 Bug 42383: (QA follow-up) Say on the row when an action was declined, and let it be reopened Answering "No" to the transfer prompt, cancelling or ignoring a transfer, a hold or a recall, or leaving a return claim for later, closed the dialog and left nothing on the row of the checked-in item: the row looked as if nothing had been asked. After a mis-click there was also no way back: the item had to be checked in again, which it cannot be. The row now remembers what was done and says so, with a button to decide again: - "Transfer declined" (No, don't transfer), "Transfer cancelled" (Cancel transfer) and "Transfer left as it is" (Ignore, or closing the dialog with an existing transfer) - "Hold ignored", "Recall ignored" and "Claim not resolved" (Resolve later) - "Reopen" brings the dialog back, as it was. For a cancelled transfer it asks "Transfer now?": a new transfer is requested, the cancelled one is kept in the transfer history Nothing changes in what the buttons do. The rows stay out of the queue of the modals, so they do not interrupt scanning. Test plan: 1. Apply the patch and rebuild the JS (yarn js:build) 2. Set AutomaticItemReturn to "Don't automatically transfer", and check in an item that belongs to another library. Press N => The row says "Transfer declined", with a Reopen button 3. Press Reopen, then Y => "Transfer now?" is asked again, and the transfer is requested 4. Repeat with a hold (Ignore), a recall (Ignore), a transfer made by AutomaticItemReturn (Cancel transfer) and a return claim (Resolve later) => Each row says what was left undone, and Reopen brings it back 5. Run: $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 112dcba577dc96331ae661bd56fde56d2cd6a057 Author: Martin Renvoize Date: Thu Nov 12 18:03:04 2026 +0000 Bug 42383: (QA follow-up) Wait for the focus of the barcode box in the check-in tests The page gives the focus to the barcode box about half a second after it is mounted (after staff-global.js has focused the header search box). A test that opened the date picker of the settings straight after loading the page could have the focus taken from it while the calendar was open, which closes it: "takes a time and does not allow a future date" failed now and then because of it. visitCheckin() now also waits until the barcode box has the focus. Test plan: 1. Run: $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 6238615ee616f7330c5c1407db444ded5683a584 Author: Martin Renvoize Date: Thu Nov 12 18:02:58 2026 +0000 Bug 42383: (QA follow-up) Report a refused check-in in a red alert under the form, not in a modal When the module policy refuses a check-in (BlockReturnOfWithdrawnItems, BlockReturnOfLostItems, an item that must be checked in at another library), the Vue page opened a "Cannot check in" modal with an OK button to acknowledge. The legacy page showed a red alert for withdrawn and lost items. Nothing is decided in this modal: it only informs, and it costs a click before the next item can be scanned, in a page where the other outcomes (messages, fees, bundle changes) are shown in alerts under the form. The page now follows one rule: a modal is for a choice that changes what happens next, and an alert is for an outcome. A refused check-in is an outcome, so: - a red alert ("NOT CHECKED IN", then the reason) is shown under the form, like the other alerts of the page. It has role="alert" and plays the warning sound - the note about the accompanying materials, if the item has one, is shown with it - the row of the table stays marked "Blocked", and the next item can be scanned at once - a refused check-in no longer waits in the queue of the modals Test plan: 1. Apply the patch and rebuild the JS (yarn js:build) 2. Set BlockReturnOfWithdrawnItems, withdraw a checked out item and check it in => A red "NOT CHECKED IN: This item is withdrawn and cannot be checked in." alert under the form, no modal, and the barcode box is ready 3. Set BlockReturnOfLostItems, mark an item lost and check it in => The same, for a lost item 4. Run: $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 9443f95f9ab8bbae89c7a3840b5d647cd892c259 Author: Martin Renvoize Date: Thu Nov 12 17:51:33 2026 +0000 Bug 42383: (QA follow-up) Resolve a return claim in the same modal, and name "Ignore" for what it does Checking in an item with a return claim needed two consecutive modals: the "Return claim" modal, with "Resolve claim" and "Ignore", then a second "Resolve return claim" modal asking for the resolution. The first one only asked staff to open the second. The "Ignore (I)" button did not say what is being ignored: the item is already checked in, it only leaves the claim unresolved. The resolution fields are now in the return claim modal: - the resolution (required) and the optional new lost status, under the messages about the check-in. Opening the claim from the row of the checked-in items shows the same modal - "Resolve claim (Y)", disabled until a resolution is chosen, resolves the claim and closes the modal; an error is shown in the modal - "Ignore (I)" is "Resolve later (L)" The fee messages of the modal ("lost item fees will remain on the patron's account"...) are the outcome of the check-in itself, which already found the item and applied the lost item refund rules. They stay correct after the claim is resolved: resolving only records the resolution, and the new lost status only sets the status of the item, nothing is charged or refunded when it changes. The modal now says so under the lost status. The second modal is removed. Test plan: 1. Apply the patch and rebuild the JS (yarn js:build) 2. Set ClaimReturnedLostValue, and claim an item as returned by the patron it is checked out to 3. Check the item in => One "Return claim" modal, with the resolution fields, "Resolve claim (Y)" (disabled) and "Resolve later (L)" 4. Choose a resolution and press Y => The claim is resolved, the row is marked resolved, no second modal 5. Run: $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 127af52758bcfa423f7c009f2167abf96431a2b7 Author: Martin Renvoize Date: Thu Nov 12 17:39:14 2026 +0000 Bug 42383: (QA follow-up) Confirm a bundle in a single modal, and bring its list of missing items back Checking in a bundle needed two consecutive modals: "Please confirm check in", which only told staff that the item is a bundle, then "Please confirm bundle contents". The first one asked for nothing the second does not ask for. The legacy page had the single contents modal. Also: - the contents modal did not look like the other modals of the page: the explanation was below the table, as help text, and the bundle being checked in was only named in the title - the table of the expected items could no longer be exported (legacy had copy, CSV and print buttons) - the actions had no keyboard shortcuts, and "Confirm checkin without verifying bundle contents" did not say what it does - when parts were missing, the alert named them but the list could not be printed any more (legacy offered it in a printable modal), so staff could not take it with them to look for the parts The bundle is now confirmed in one modal: - the bundle (barcode and title, linked to the record) is at the top, then the CircConfirmItemParts note if there is one, then the explanation as an alert, above the table of expected items - the barcodes box has the focus, as before - "Export" in the heading row of the table (copy, CSV, print), which does not add vertical space and leaves out the status column - "Check in, mark missing lost (Y)", "Check in, verify later (L)" and "Cancel (X)", with the cross of Cancel like the other modals The "bundle had missing items" alert has a "Print list" button, which prints the barcodes and titles of the missing items. Test plan: 1. Apply the patch and rebuild the JS (yarn js:build) 2. Check in a checked out bundle => One modal: the bundle at the top, the explanation above the table, the focus in the barcodes box, Export in the table heading 3. Click Export => Copy, CSV and Print, without the status column in the result 4. Scan one of the two parts and press Y => The other part is lost, and the alert lists it with a "Print list" button 5. Check in the bundle again and press X (Cancel) => The bundle is not checked in 6. Run: $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit c18ba56c24764d332e5cd446182e851945af41df Author: Martin Renvoize Date: Thu Nov 12 13:27:48 2026 +0000 Bug 42383: (QA follow-up) Clarify the description of AutomaticConfirmTransfer The preference reads "[Do/Don't] automatically confirm a transfer when the modal is dismissed without clicking 'Yes'". It is misleading: - there is no "Yes" button when the transfer already exists (it is "OK"), and a "Yes, transfer" button only when none exists yet - it does not say what "confirm" does: the transfer is sent (set in transit) - it does not say which transfers are concerned. Only transfers that already exist when the dialog is shown are: the replacement transfer of a wrong transfer, or a pending transfer found at check-in (stock rotation for example). Nothing is created by dismissing a "Transfer now?" prompt (AutomaticItemReturn disabled), and a transfer created by AutomaticItemReturn or for a hold is already sent, so dismissing the dialog changes nothing for those - it does not say that it only applies when TransfersBlockCirc is set to "Don't block" (the dialog cannot be dismissed otherwise), nor that choosing an option explicitly (OK, Print slip, Cancel transfer, Ignore, No) is never altered This is what the check-in pages implement (the legacy page dismisses the wrong-transfer dialog and the dialog of an existing transfer; the Vue page does the same). Only the description changes. Test plan: 1. Apply the patch 2. Go to Administration > System preferences > Circulation > Check-in policy, and read AutomaticConfirmTransfer => The description says what is confirmed, for which transfers, and when it applies 3. Run: $ prove t/db_dependent/sysprefs.t t/db_dependent/check_sysprefs.t => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 4c6d4caed4ccc43331120df9d74c7cf69ef66c70 Author: Martin Renvoize Date: Thu Nov 12 11:02:53 2026 +0000 Bug 42383: (QA follow-up) Stop password managers from treating the barcode box as a fillable field Password managers (1Password, LastPass, Bitwarden, Dashlane) can decide that the barcode input is a login or autofill field and add their icon inside it. The icon sits where the check-in settings (sliders) icon is, on the right of the box, so the settings icon can no longer be clicked. The legacy form carried autocomplete="off" on the form, which the Vue form lacked. Put it back on the form and mark the input, in addition to its autocomplete="off", with the opt-out attributes the common password managers honour: data-1p-ignore, data-lpignore, data-bwignore and data-form-type="other". Test plan: 1. Apply the patch and rebuild the JS (yarn js:build) 2. With a password manager browser extension enabled, go to Circulation > Check in => The extension does not add its icon inside the barcode box, and the settings (sliders) icon can be clicked 3. Run: $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit f6034f15f5af79b232dfa45c9347f9fba0be4a5a Author: Martin Renvoize Date: Thu Nov 12 13:01:49 2026 +0000 Bug 42383: (QA follow-up) Test the clear control of the return date field The return date of the check-in settings is a Vue date field, which gets a clear control from the date picker (Bug 44112): a cross inside the field, shown once it has a value. The legacy check-in page had an equivalent link, so make sure the Vue page keeps offering it. This test picks a return date, clears it with the control, and checks that the field is empty and that no return date is active any more. Depends on Bug 44112. Test plan: 1. Apply the patch of Bug 44112 and this one, rebuild the JS (yarn js:build) 2. Run: $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 4f860fa4552749b5094c1a531d0567bbe0d4ddc5 Author: Martin Renvoize Date: Thu Nov 12 10:22:09 2026 +0000 Bug 42383: (QA follow-up) Restore the card layout of the check-in page The legacy check-in page presents the form in a white block: the heading, the barcode box and the settings that expand when the sliders icon in the barcode box is clicked, separated by a rule. The checked-in items sit in a second white block (".page-section") with a "Checked-in items" heading. The Vue page lost this. Only the barcode row was white, the settings panel was rendered on the grey page background outside any block, and the checked-in items table had no block at all, so the form and the results ran into the page background. Restore it: - the heading, the barcode box, the active-settings badges and the settings panel share one white card, as before - the checked-in items are in their own card with the "Checked-in items" heading when there is something to show (the empty message stays plain) The settings keep their legacy layout: the return date with its "Remember" checkbox, then the other checkboxes, stacked. The ids and behaviour of the options are unchanged. Test plan: 1. Apply the patch and rebuild the JS (yarn js:build) 2. Go to Circulation > Check in => The heading and the barcode box are in a white card 3. Click the sliders icon in the barcode box => The settings expand inside the same card, below a rule: the return date, then the checkboxes, stacked as on the legacy page 4. Check in an item => The checked-in items are in a second white card, headed "Checked-in items" 5. Run: $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 797390dd7f6907b01a57caf0cff0788d34db023a Author: Martin Renvoize Date: Thu Nov 12 07:50:28 2026 +0000 Bug 42383: (QA follow-up) Add an explicit "Ignore" to the transfer dialog for an existing transfer The transfer dialog is shown whenever the check-in has a transfer attached: a return to home created by AutomaticItemReturn, a transfer for a hold at another library, a pending transfer found for the item (stock rotation for example) or the replacement of a wrong transfer. For those the only choices were to confirm (OK, Print slip) or to cancel the transfer. There was no way to say "leave it as it is" other than dismissing the dialog with Escape, which also depends on AutomaticConfirmTransfer: with the preference on, dismissing confirms the transfer, with it off it is left alone. Staff could not tell what a dismissal would do. Add "Ignore (I)" next to "Cancel transfer (C)". It neither confirms nor cancels: the transfer is left exactly as it was, whatever AutomaticConfirmTransfer is set to, and the row stops asking. As for "Cancel transfer", it is only offered when the dialog does not block: with TransfersBlockCirc a decision is required, so only OK and Print slip are available. Test plan: 1. Apply the patch and rebuild the JS (yarn js:build) 2. With AutomaticItemReturn on and TransfersBlockCirc off, check in an item that belongs to another library => OK (Y) / Print slip (P) / Cancel transfer (C) / Ignore (I) 3. Press I => The dialog closes, the transfer is untouched (not cancelled) 4. Set TransfersBlockCirc to Block and repeat => No Cancel transfer and no Ignore, the page is blocked until OK 5. Run: $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 494a87e18e92d22fc40ee51afc5b3d75e3fae8eb Author: Martin Renvoize Date: Thu Nov 12 07:46:48 2026 +0000 Bug 42383: (QA follow-up) Dim the page and block clicks outside the dialog with TransfersBlockCirc TransfersBlockCirc ("Block staff from continuing to check in items when a transfer is triggered") only disabled the barcode box on the Vue check-in page. Every dialog carries the non-blocking class (no backdrop, pointer-events: none), so the page behind the transfer prompt stayed fully usable. Following a menu or sidebar link while the prompt was open navigated away and abandoned it: the item stayed "Available" and the transfer was never made or recorded. The legacy returns.pl page prevents this with a static backdrop that dims the page and swallows every click. When the transfer prompt blocks (TransfersBlockCirc on) the dialog now: - uses a "blocking" state with a dimmed backdrop and pointer-events on, so clicks outside the dialog hit the backdrop and do nothing - sets aria-modal="true" - keeps keyboard focus inside the dialog (Tab cannot reach the page) Escape was already ignored in this state and still is. Without TransfersBlockCirc nothing changes: the dialog stays non-blocking so staff can keep scanning. Test plan: 1. Apply the patch and rebuild the JS (yarn js:build) 2. Set TransfersBlockCirc to Block and AutomaticItemReturn to Don't automatically transfer 3. Check in an item that belongs to another library => "Transfer now?" is shown and the page behind is dimmed 4. Click a sidebar link, empty space, the barcode box; press Escape => Nothing happens, you stay on the page with the dialog open 5. Choose an option => The dialog closes and the check-in completes 6. Set TransfersBlockCirc to Don't block and repeat 3 => No dimming, the dialog can be dismissed with Escape 7. Run: $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 62ed61f6abd1146bb0f6b024ece49267ca1d7d10 Author: Martin Renvoize Date: Thu Nov 12 07:46:44 2026 +0000 Bug 42383: (QA follow-up) Make "Cancel transfer" explicit when the transfer already exists When AutomaticItemReturn is enabled (or a wrong transfer is replaced) Koha creates the transfer, and sets it in transit, before the check-in dialog is shown. The Vue dialog nevertheless asked "Yes, transfer (Y)" and "No, don't transfer (N)", as if nothing had been done yet. Choosing "No" in fact cancels the transfer after the fact: it is kept in the transfers table with a cancellation date and the reason "Manual". The wording hid that, and it could not be reached with a cancel-specific shortcut. The legacy wrong-transfer dialog already uses "Cancel transfer (X)", so the same wording and access key are used here. When the check-in already has a transfer the dialog now reads: OK (Y) / Print slip (P) / Cancel transfer (X) with a note explaining that cancelling records the cancellation in the item's transfer history. When there is no transfer yet (the item "needs a transfer", AutomaticItemReturn disabled) the dialog asks "Transfer now?" with "Yes, transfer (Y)", "Yes, print slip and transfer (P)" and "No, don't transfer (N)", where "No" simply creates nothing. The print button used to read "Print slip and transfer"; it keeps the "Yes," of the legacy "Yes, print slip" so that it reads as the answer to the question. Test plan: 1. Apply the patch and rebuild the JS (yarn js:build) 2. Item belongs to library B, check it in at library A with AutomaticItemReturn on => The dialog says OK (Y) / Print slip (P) / Cancel transfer (X) 3. Press X => The item is Available, and the transfer is listed as cancelled (reason Manual) in the item's transfer history 4. Set AutomaticItemReturn to Don't automatically transfer, repeat => "Transfer now?" with Yes/No, "No" creates no transfer 5. Run: $ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 46e3bdfb72f7ef0e49eddbdfcff161d23f152d51 Author: Tomás Cohen Arazi Date: Tue Nov 10 15:22:28 2026 -0300 Bug 42383: Add Cypress tests for the check-in page This patch adds end-to-end tests for circ/checkin.pl: simple check-ins (including from the header search box), confirmations (accepted and declined), blocked check-ins, the module policy, holds, transfers, recalls, return claims and the return date. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ yarn cypress run --spec t/cypress/integration/Circulation/Checkin_spec.ts => SUCCESS: Tests pass! 3. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: Brendan Lawlor Signed-off-by: Matt Blenkinsop Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit e44f4a1d36adb3f895e33830287087ff5e7b6f4e Author: Tomás Cohen Arazi Date: Tue Nov 10 15:22:18 2026 -0300 Bug 42383: Replace circ/returns.pl with circ/checkin.pl This patch removes the legacy check-in page and points every entry point to the new one: - circ/returns.pl and circ/returns.tt are removed - circ-nav.inc, circulation-home.tt and the Alt+r shortcut in staff-global.js open circ/checkin.pl - the header search box (checkin-search-box.inc) and the ILL 'Check-in' action post the barcode to circ/checkin.pl, which checks the item in, as they did with circ/returns.pl - Koha::Manual maps the new page - basic_workflow.t checks items in on the new page Test plan: 1. Apply patch 2. Build and restart: $ ktd --shell k$ yarn build k$ restart_all 3. Open 'Check in' from the circulation home page, the circulation sidebar and with Alt+r => SUCCESS: circ/checkin.pl opens 4. Scan the barcode of a checked out item in the header 'Check in' box => SUCCESS: circ/checkin.pl opens and the item is checked in 5. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: Brendan Lawlor Signed-off-by: Matt Blenkinsop Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 1d5fe900d1bdd9b613980560eb95f3c6a343dc92 Author: Tomás Cohen Arazi Date: Tue Nov 10 15:21:51 2026 -0300 Bug 42383: Add the Vue check-in page This patch adds a Vue based check-in page, circ/checkin.pl, built on top of the check-in REST API and its follow-up action endpoints. - circ/checkin.pl and circ/checkin.tt: entry point, bootstrapped with the check-in module policy - A check-in can be requested from other pages with a POST request (op=cud-checkin, with a CSRF token): the page checks the item in once it is loaded. A GET request with a barcode only prefills it. - Vue module, Pinia store and components under js/vue/components/Circ/Checkin/: barcode input, check-in options, checked-in items table, confirmation, hold cancellation, return claim and bundle verification modals, slip printing - checkin-api-client.js, plus the claim, item (bundled items) and patron API client additions it needs - HttpClient: the error thrown for a failed request carries the parsed response body (`body`), so callers that present errors themselves (suppressDefaultErrorDialog) can use it - rspack: new 'checkin' entry The page reproduces the behaviour of circ/returns.pl: confirmations, blockers, hold/transfer/recall dialogs, messages, audio alerts and slip printing. When the API refuses a request because of the module policy, the store applies the policy returned in the error object and tells the user why. The store identifies the rows by key, not by position, as the list changes while requests are in flight. Rows that need attention are never trimmed from the list, and a follow-up action cannot be sent twice. The errors returned by the API are shown translated, in the page. Test plan: 1. Apply patch 2. Build and restart: $ ktd --shell k$ yarn build k$ restart_all 3. Go to /cgi-bin/koha/circ/checkin.pl and check in: - an item that is checked out - an item that is not checked out - an item with a hold - an item that needs a transfer - a bundle => SUCCESS: The item is checked in, and the messages and dialogs match what returns.pl showed 4. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: Brendan Lawlor Signed-off-by: Matt Blenkinsop Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit b812d16bd054f780ba7224ea3c1fc86433ca8da2 Author: Tomás Cohen Arazi Date: Tue Nov 10 15:21:47 2026 -0300 Bug 42383: Add check-in follow-up action endpoints This patch adds the follow-up action sub-resources to the check-in API: - POST /checkins/{checkin_id}/hold_confirmation - POST /checkins/{checkin_id}/hold_cancellation - POST /checkins/{checkin_id}/transfer_confirmation - POST /checkins/{checkin_id}/transfer_cancellation - POST /checkins/{checkin_id}/recall_confirmation Each one delegates to the matching Koha::Checkin method, requires the action token returned with the check-in, and returns the updated check-in. They are rejected (409) when the item has been checked in again (stale_checkin) or checked out again (item_checked_out) since. POST /checkins and GET /checkins/availability are adjusted to the needs of the check-in page: messages, pending actions and action tokens in the response, barcode filters applied, item parts and bundle confirmations. As the legacy returns page did, POST /checkins cancels the waiting holds of the item for which cancellation has been requested before the return. A blocked check-in (withdrawn, lost, wrong library) is answered with 403 (checkin_blocked), but AddReturn is still called, as the legacy returns page did: the check-in, the local use, the date last seen and the location and not for loan updates are recorded. If AddReturn cannot return the item (e.g. because of a data problem), POST /checkins answers 500 (checkin_failed) and skips the post-return processing. The internal error is logged, not returned. All the check-in endpoints are marked EXPERIMENTAL in the spec: they serve the new check-in page, and may still change. The error definition gains an optional 'policy' attribute (module_policy, module_policy_global and checkin_policy definitions), returned when a request is refused because of the module policy. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ yarn api:bundle k$ prove xt/api.t t/db_dependent/api/v1/checkins.t => SUCCESS: Tests pass! 3. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: Brendan Lawlor Signed-off-by: Matt Blenkinsop Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit d392cbcf822cb49eacccf4bf900af143784e8015 Author: Tomás Cohen Arazi Date: Tue Nov 10 15:21:30 2026 -0300 Bug 42383: Add check-in follow-up actions and messages to Koha::Checkin This patch moves the post check-in logic of circ/returns.pl into the domain layer, so the check-in API and the new check-in page can use it. Koha::Checkin gains: - confirm_hold / cancel_hold: set the trapped hold waiting (or in transit to its pickup library), or cancel it, optionally forgiving the hold fees - confirm_transfer / cancel_transfer / replace_wrong_transfer. A transfer that has already arrived or has been cancelled is not touched - confirm_recall. If the transfer to the pickup library cannot be started, the recall is left unchanged - verify_bundle: bundle content verification, in a single transaction - is_latest, pending_actions, action_tokens and check_action_token: the follow-up actions are only allowed on the latest check-in of the item, and require a short-lived token issued with the check-in C4::Circulation::AddReturn records the check-in messages on the check-in (item type check-in message, patron fines, patron waiting holds, overdue charges on lost returns, ...) and restores the legacy post-return processing (holds queue update, HoldsAutoFill, notices for the returning patron). The waiting holds message counts the holds waiting at the check-in library, so it does not depend on a logged in user (e.g. automatic check-ins from cron jobs). Koha::Item::Availability::Checkin gains the item_parts and items_bundle confirmations, and uses snake_case keys for its blockers and confirmations (bad_barcode, not_issued). New exceptions: Koha::Exceptions::Checkin::HoldNotFound, Koha::Exceptions::Checkin::ItemCheckedOut, Koha::Exceptions::Checkin::TransferFinished and Koha::Exceptions::Checkin::TransferNotStarted. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Checkin.t \ t/db_dependent/Circulation.t \ t/db_dependent/Circulation/issue.t \ t/db_dependent/Koha/Item/Availability/Checkin.t \ t/Koha/Result/Availability.t => SUCCESS: Tests pass! 3. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: Brendan Lawlor Signed-off-by: Matt Blenkinsop Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit b200861c1f314d5f9ef6b3cecae4aede45859726 Author: Tomás Cohen Arazi Date: Tue Nov 10 15:21:25 2026 -0300 Bug 42383: Add Koha::REST::Plugin::Policy This patch adds a Mojolicious plugin that provides the module_policy helper to API controllers: return $c->render( status => 403, openapi => { error => 'Return date override is not enabled', error_code => 'return_date_not_allowed', policy => $c->module_policy( 'Checkin', { library => $library_id } ), } ); The helper loads the matching Koha::Module::Policy subclass and returns the policy envelope for the authenticated user, so controllers can include it in the 'policy' attribute of the error object when refusing a request because of it. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/REST/Plugin/Policy.t => SUCCESS: Tests pass! 3. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: Brendan Lawlor Signed-off-by: Matt Blenkinsop Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 0fef2615708ff4c06888528ccc7d1c80166898f7 Author: Tomás Cohen Arazi Date: Tue Nov 10 15:21:18 2026 -0300 Bug 42383: Add Koha::Module::Policy framework This patch adds a module policy framework that exposes per-module capabilities to the UI. It replaces the pattern of dedicated GET /config endpoints (like GET /erm/config) with a session-scoped mechanism. A module policy is the intersection of system preferences (feature toggles), user permissions and library context. It is a plain JSON structure: an envelope with the module name, a 'global' block with the keys common to all modules, and the module specific keys under the module name: { module => 'checkin', global => { audio_alerts => true, ... }, checkin => { exempt_fine => false, ... }, } The page is bootstrapped with the policy, and the API returns it in the error object when it refuses a request because of it, so the client can refresh the UI. The server remains authoritative: the policy is informational, not an access token. Components: - Koha::Module::Policy: base class with new(), module(), to_hashref() and scope() - Koha::Module::Policy::Checkin: check-in module policy covering fines, holds, recalls, transfers, display and blockers Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Module/Policy.t \ t/db_dependent/Koha/Module/Policy/Checkin.t => SUCCESS: Tests pass! 3. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: Brendan Lawlor Signed-off-by: Matt Blenkinsop Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 471783c70be9235fd2a78c3ceff11d62d36f84d3 Author: Martin Renvoize Date: Thu Nov 12 11:42:50 2026 +0000 Bug 44112: Add a clear control to the Vue date picker and move its icon inside right The Vue FlatPickrWrapper, used for every "date" field of the Vue modules (ERM, Preservation, ILL, Item lists...), has no way to clear a date in one click. Koha's flatpickr defaults add a "clear date" link, but only to inputs carrying the "flatpickr" class used by the legacy pages, so the Vue inputs never got it. Clearing a date meant selecting the text and deleting it. The Vue selects (vue-select) already put their controls inside the field on the right: a grey clear cross, then the dropdown toggle. The date inputs did not: the calendar icon was inside on the left, and the clear link of the legacy pages sits outside on the right, in red. Make the date picker consistent with the selects: - a grey clear cross inside the field on the right, shown only when the field has a value, followed by the calendar icon (moved from the left) - "clearable" prop of FlatPickrWrapper (default true) to opt out - the cross is a button with a "Clear date" label The size and the position of the input in the forms do not change. Legacy pages are not affected. Test plan: 1. Apply the patch and rebuild the JS (yarn js:build) 2. Enable the ERMModule preference 3. Go to E-resource management > Agreements > New agreement, and click "Add new period" => The calendar icon is inside the date fields, on the right. No cross is shown. 4. Pick a date in "End date" => A grey cross is shown inside the field, left of the calendar icon, and only for that field 5. Click the cross => The date is cleared and the cross disappears 6. Compare with the selects of the form (for example Status): the cross and the toggle are in the same place 7. Run: $ yarn cypress run --spec t/cypress/integration/ERM/Agreements_spec.ts => SUCCESS: Tests pass! Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Brendan Lawlor Signed-off-by: Anna Stalter Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 872ff1453073f82e647daf49bf44cc08ae16338b Author: Tomás Cohen Arazi Date: Thu Oct 29 15:13:23 2026 -0300 Bug 43486: (follow-up) Do not send notification_summary for sample patrons The notification_summary attribute added to the patron definition is generated by buildSampleObject as a random string, which makes the insertSamplePatron Cypress task (and all the tasks using it, like insertSampleHold and insertSampleCheckout) fail with: Error: Expected object/null - got string. This patch strips the attribute before POSTing the patron, like it is already done for the other read-only/embeddable attributes. Test plan: 1. Run: $ ktd --shell k$ yarn cypress run --spec t/cypress/integration/Circulation/FineNoRenewals_spec.ts => FAIL: insertSampleCheckout fails with 'Expected object/null - got string' 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! 4. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: Anna Stalter Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit d2bc0093a810edf6b4aa803a20d7999bde32d275 Author: Tomás Cohen Arazi Date: Wed Sep 9 15:28:12 2026 -0300 Bug 43486: (follow-up) Report notice transports in notification_summary The notification_summary embed only exposed a boolean hold_fill_notified. The checkin/returns confirmation UIs show which transports the patron uses for the relevant notice. Add per-notice transport lists so consumers can render the same detail as the legacy returns page: - hold_fill_transports / hold_fill_notified (Hold_Filled) - recall_waiting_transports / recall_waiting_notified (Recall_Waiting) Test plan: 1. prove t/db_dependent/Koha/Patrons.t => SUCCESS: notification_summary subtest passes, including the new hold_fill_transports and recall_waiting_transports assertions 2. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Signed-off-by: Brendan Lawlor Signed-off-by: Anna Stalter Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 2d80e7656c2267cf0fb17f97437d897f58681426 Author: Tomás Cohen Arazi Date: Tue Sep 8 16:17:59 2026 -0300 Bug 43486: Add permission-gated notification_summary patron embed Adds a `notification_summary` embed to the patron API, exposing how the patron will be notified: { hold_fill_notified => 0|1, primary_contact_method => 'email' } This is patron information, so it must not leak to consumers that are not allowed to see the patron. The generic embed machinery computes embeds via a bare accessor ($patron->notification_summary) with no requesting-user context and cannot enforce that gate itself, and the parent redaction in to_api runs before embeds are attached. So Koha::Patron->to_api strips the notification_summary out after the fact when the requesting user is not allowed to see the patron (is_accessible / can_see_patron_infos). This unblocks the Vue checkin page (bug 42383), which needs to display the "is notified" / "main contact method" information the legacy returns.pl dialog shows, without leaking patron data. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Patrons.t t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass, including the gating subtest 3. GET /patrons/:id?x-koha-embed=notification_summary as a user who can see the patron => SUCCESS: response includes notification_summary 4. Repeat as a user who cannot see the patron (no view_borrower_infos_from_any_libraries, ft_hide_patron_info group) => SUCCESS: notification_summary is absent 5. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Signed-off-by: Brendan Lawlor Signed-off-by: Anna Stalter Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 7a11e4749fac383a958cbc196660e55140b6dc97 Author: Tomás Cohen Arazi Date: Tue Jul 14 14:58:55 2026 -0300 Bug 43077: (follow-up) Refactor JWT methods to use encode_claims/decode_claims This patch refactors the existing JWT methods (generate_jwt, check_jwt, decode_jwt) to be thin wrappers around encode_claims/decode_claims, eliminating the private _gen_jwt, _chk_jwt, and _decode_jwt functions. check_jwt delegates to check(), so the validation lives in one place. This makes encode_claims/decode_claims the single source of truth for JWT operations, with the id-based methods as a convenience layer on top. It also hardens the new methods: - decode_claims returns undef on an undefined or empty token, without warning or logging - decode_claims uses Try::Tiny and logs invalid tokens - encode_claims throws Koha::Exceptions::WrongParameter if the claims are not a hashref - generate({ type => 'JWT' }) without an id returns undef, as before Behaviour changes, documented in the POD: - JWTs are always signed with the Koha secret: a caller-supplied secret is ignored (no caller in Koha passes one) - decode_jwt returns undef and logs a warning on an invalid or expired token, instead of dying Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/Token.t t/Koha/Token.t => SUCCESS: Tests pass! t/Koha/Token.t covers tampered payloads, a wrong key, alg:none, garbage, expired tokens and tokens without an id 3. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: David Nind Signed-off-by: Brendan Lawlor Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 9c74808558c2be09271b254a1cdf835444cd8eef Author: Tomás Cohen Arazi Date: Tue Jul 14 14:52:50 2026 -0300 Bug 43077: Add encode_claims/decode_claims to Koha::Token This patch adds two methods to Koha::Token for encoding and decoding arbitrary claims as signed JWTs: - encode_claims($hashref) - encodes any hashref as a signed JWT - decode_claims($token) - decodes a JWT and returns the full claims Unlike the existing generate_jwt/decode_jwt methods (which only support a single 'id' string value), these methods support full claim structures including nested hashes and arrays. Both use the standard Koha secret (database password) for signing, reusing the existing _add_default_jwt_params internal function. This will be used by the upcoming Koha::Module::Policy classes, which will serialize per-module capability hashes as JWTs in API response headers. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/Koha/Token.t => SUCCESS: Tests pass 3. Tests cover: - Simple hashref encoding/decoding (string, numeric, boolean) - Complex nested structures (hashes, arrays) - JWT format validation 4. Sign off :-D Signed-off-by: David Nind Signed-off-by: Brendan Lawlor Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 33c09e5060c1885637edd18e310c828f58bc589c Author: Tomás Cohen Arazi Date: Fri Sep 4 15:30:52 2026 -0300 Bug 24401: (QA follow-up) Add POD for Koha::Token private helpers Koha::Token's private helpers (_add_default_csrf_params, _gen_csrf, _chk_csrf, _gen_rand, _add_default_jwt_params, _gen_jwt, _chk_jwt, _decode_jwt) had no POD, which trips the QA pod_coverage check on any patch that touches this file. Document each of them. No functional changes. Test plan: 1. Apply patch 2. Run the QA tools against the commit: $ ktd --shell k$ /kohadevbox/qa-test-tools/koha-qa.pl -c 1 => SUCCESS: Koha/Token.pm passes pod_coverage 3. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Signed-off-by: Tomás Cohen Arazi Signed-off-by: Brendan Lawlor Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit a701dc5fb7b4fcc49030c7e1c9d59b08e0a05243 Author: Tomás Cohen Arazi Date: Fri Sep 4 15:06:25 2026 -0300 Bug 24401: Align POST /checkins with the bug 42383 endpoint design Ports the main POST /checkins (Checkins#add) endpoint to the design developed on bug 42383, which is a strict superset of the previous implementation: - Enforce the updatecharges.writeoff permission for exempt_fine with an explicit 403 (error_code: no_permission_for_exempt_fine), instead of silently dropping the flag. - Reject supplying both item_id and external_id (error_code: mutually_exclusive_parameters), and rename the missing identifier error to missing_item_identifier. - Default library_id to the logged in library (the session library, or the x-koha-library header), matching AddReturn's own fallback so the availability dry-run and the checkin agree. Unknown libraries are rejected (400, invalid_parameter_value), and library_id follows the same rule as the x-koha-library header: with IndependentBranches, only superlibrarians can act on another library (403, library_not_allowed). - Reject items without a barcode (409, item_without_barcode): AddReturn works on barcodes, and an undefined barcode could match another item. - Support return_date (gated behind the SpecifyReturnDate preference, error_code: return_date_not_allowed) and dropbox_mode. A return_date that cannot be parsed is rejected (400, invalid_parameter_value) instead of causing a 500. - Return AddReturn's outcome messages: serialize the checkin object's object_messages into a `messages` array on the response, resolving the previous gap where ~25 outcome messages never reached API consumers. - Use lower_snake_case error codes (checkin_blocked, confirmation_required, etc.), consistent with the rest of the API, and include the item in the 412 confirmation response. - Mark both endpoints EXPERIMENTAL in the spec, and document that the 412 confirmation is a workflow gate, not an authorization control. The bug 42383 module-policy and bundle-verification hooks are intentionally left out here: they depend on framework not present on this branch and are outside the scope of the main checkin endpoint. Test plan: 1. Apply patch 2. Run the tests: $ ktd --shell k$ prove t/db_dependent/api/v1/checkins.t => SUCCESS: Tests pass! 3. Rebuild and validate the API spec: k$ yarn api:bundle k$ prove xt/api.t => SUCCESS: Tests pass! 4. As a user WITHOUT updatecharges.writeoff, POST /checkins with exempt_fine: true on an item with an outstanding overdue fine => SUCCESS: 403 no_permission_for_exempt_fine, the fine is not forgiven 5. Sign off :-D Assisted-by: Sonnet 4.6 (Anthropic) Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: Tomás Cohen Arazi Signed-off-by: Brendan Lawlor Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 45b5d315d54dbd7ddc92c79770a8bab9cc7c0b1f Author: Martin Renvoize Date: Thu Sep 3 13:24:55 2026 +0100 Bug 24401: (QA follow-up) Add token cross-context and expiry test coverage Cover the properties the QA review specifically raised about confirmation tokens: that a token minted for one item, or one confirmation set, does not validate against a different item or confirmation set (it doesn't - the context-object ids and sorted confirmation keys already scope _token_id correctly), and that an expired token (per the just-added TOKEN_EXPIRY_SECONDS/expires support) is rejected. Test plan: 1. prove t/Koha/Result/Availability.t => SUCCESS: 13 tests pass. Signed-off-by: Martin Renvoize Signed-off-by: Brendan Lawlor Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 86fde5e8b6faed0c584500d10496dc8bc45dbfc1 Author: Martin Renvoize Date: Thu Sep 3 13:18:30 2026 +0100 Bug 24401: (QA follow-up) Add expiry to confirmation tokens, log check_token failures Confirmation tokens minted by Koha::Result::Availability->as_token had no expiry - once generated for a given item/user/confirmation set, they remained valid indefinitely. These tokens are meant to be round-tripped within a single staff interaction (scan, see the confirmation prompt, confirm), not stored or reused later, so give them a short (5 minute) lifetime via Mojo::JWT's standard "exp" claim. Koha::Token::generate_jwt/check_jwt never exposed Mojo::JWT's native expires support, so add that through. While there, harden Koha::Token::_chk_jwt to catch decode failures (expired, tampered, or malformed tokens) instead of letting Mojo::JWT's exception propagate uncaught to callers - Koha::REST::V1::Checkouts's existing JWT confirmation flow calls check_jwt without an eval/try around it, so this closes a latent crash risk there too, not just for checkins. Both failures are logged via Koha::Logger (not warn, to avoid tripping Test::NoWarnings in unrelated test suites) so a "confirmation keeps failing" report leaves a diagnostic trail instead of just returning 0. Test plan: 1. prove t/Koha/Result/Availability.t t/db_dependent/api/v1/checkins.t t/db_dependent/api/v1/checkouts.t => SUCCESS: all pass. Signed-off-by: Martin Renvoize Signed-off-by: Brendan Lawlor Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 3d6bbf729ef9b405783b21bd025bdeb596b3d713 Author: Martin Renvoize Date: Thu Sep 3 13:12:10 2026 +0100 Bug 24401: (QA follow-up) Close exempt_fine permission gap, default library_id circ/returns.pl only allows exemptfine through to AddReturn when the operator holds 'updatecharges' => 'writeoff' - the comment there is explicit that this exists to stop an unauthorized operator forgiving overdue fines by tweaking form parameters. POST /checkins passed exempt_fine straight through with no such check, gated only by circulate_remaining_permissions, reopening exactly that hole via the API. Mirror the CGI guard: silently drop the flag for anyone lacking the permission, same as the staff interface does, rather than rejecting the whole checkin. Also default library_id to the logged in user's library (the same fallback AddReturn itself applies) on both endpoints when the caller doesn't supply one, so a GET /checkins/availability dry-run agrees with what a same-request POST /checkins would actually do. Finally, document (as a FIXME, not yet fixed) that add() never inspects AddReturn's $doreturn/$messages, so it always renders 200 even when the checkin didn't complete, and that the outcome messages Koha::Checkin->attach_messages builds never reach the API response. Also adds the missing GPL/copyright header this file was missing. Test plan: 1. prove t/db_dependent/api/v1/checkins.t => SUCCESS: passes. 2. As a user without 'updatecharges' => 'writeoff', POST /checkins with exempt_fine: true against an item with an outstanding overdue fine; confirm the fine is NOT forgiven. Signed-off-by: Martin Renvoize Signed-off-by: Brendan Lawlor Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit d5475bdf5e9760324ccb9171d4df8364c67f3a50 Author: Martin Renvoize Date: Thu Sep 3 13:10:14 2026 +0100 Bug 24401: (QA follow-up) Declare interface in checkin API response, stop hiding timestamp checkin.yaml sets additionalProperties: false but never declared the real 'interface' column that Koha::Checkin->to_api emits, so every successful POST /checkins response failed OpenAPI response validation and the endpoint returned a 500 for every caller. Declare it. Separately, Koha::Checkin::to_api_mapping mapped 'timestamp' to undef, which Koha::Object treats as "delete this field" - so the documented timestamp property could never actually appear in a response. There's no reason to hide it (it's the checkin's own date/time, not incidental audit metadata), so drop the override and let it serialize normally (Koha::Object's generic datetime handling already formats it as RFC3339). Test plan: 1. yarn build && restart_all 2. prove t/db_dependent/api/v1/checkins.t => SUCCESS: passes (previously failed with a 500 on every successful checkin). Signed-off-by: Martin Renvoize Signed-off-by: Brendan Lawlor Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 9d345f3e4d18047bd8d9c4fa744a5ccd6c61aefa Author: Tomás Cohen Arazi Date: Mon May 4 23:50:25 2026 -0300 Bug 24401: Add checkin REST API endpoint with confirmation flow Adds two new endpoints: - GET /checkins/availability - pre-check with JWT token - POST /checkins - perform check-in with optional confirmation The response is the Koha::Checkin object serialized via to_api with support for embedding related objects (item, checkout, library, hold, recall, transfer, restriction, claim, debits, credits, etc). Follows the same confirmation flow pattern as POST /checkouts: 1. Client calls availability endpoint to get blockers/confirms 2. If confirmations exist, a JWT token is returned 3. Client passes the token to the checkin endpoint to confirm Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ yarn api:bundle k$ prove t/db_dependent/api/v1/checkins.t => SUCCESS: Tests pass! 3. Run xt/ API validation: k$ prove xt/api.t => SUCCESS: Tests pass! 4. Sign off :-D Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Brendan Lawlor Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 4a5e06e88b1f7e54ba48ec22c46d0f989de3fa02 Author: Tomás Cohen Arazi Date: Mon May 4 23:50:13 2026 -0300 Bug 24401: Add token support to Koha::Result::Availability Adds as_token/check_token/to_api methods to Koha::Result::Availability for the confirmation flow pattern used by circulation endpoints. - as_token: generates a JWT from context objects + confirmation keys - check_token: validates a JWT (returns false on invalid tokens) - to_api: serializes blockers/confirms/warnings + token for API responses Introduces Koha::Item::Availability::Checkin::Result subclass that defines token_params as [item, user]. Updates Koha::Item::Availability::Checkin to use the Result subclass. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/Koha/Result/Availability.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Brendan Lawlor Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit d5650a15593b5ed2151ef5b485544124d6ef9fec Author: Paul Derscheid Date: Fri Nov 6 14:47:08 2026 +0100 Bug 43941: (QA follow-up) Test processing_fee with ItemHomeLibrary - Give the test item distinct home and holding libraries - Cover LostChargesControl ItemHomeLibrary with both HomeOrHoldingBranch values Test plan: 1. prove -v /kohadevbox/koha/t/db_dependent/Koha/Checkout.t 2. Tests pass Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: Paul Derscheid Signed-off-by: Pedro Amorim commit 85bb62c001fd6266f96fe3f9a8b85bfde9201f2a Author: Lucas Gass Date: Fri Oct 30 16:34:14 2026 +0000 Bug 43941: Add unit tests Signed-off-by: Anna Stalter Signed-off-by: Paul Derscheid Signed-off-by: Pedro Amorim commit c4d4bd2b69fc3af70d49e3b70168b367b9364b63 Author: Lucas Gass Date: Fri Oct 30 16:15:38 2026 +0000 Bug 43941: Add new method to Koha/Checkout to get the processing fee from circ rules To test: 1. APPLY PATCH, restart_all 2. Go to Administration - > Circulation and fine rules 3. Set up some "Default lost item fee policy" for different item types. 4. Checkout some of those configured item types to a patron 5. In an ISSUESLIP add: [% USE Price %] [% FOREACH c IN borrower.checkouts %] [% c.processing_fee | $Price %] [% END %] 6. Print the ISSUESLIP. You should correctly see the differently configured process fees on the slip 7. prove -v /kohadevbox/koha/t/db_dependent/Koha/Checkout.t 8. Tests should pass Signed-off-by: Anna Stalter Signed-off-by: Paul Derscheid Signed-off-by: Pedro Amorim commit 59268fb7dc4d1c4934d1188fcbd64ed4ab442669 Author: Kyle M Hall Date: Tue Oct 13 11:02:05 2026 -0400 Bug 43463: (QA follow-up) Use XML::LibXML instead of XML::Simple Signed-off-by: Kyle M Hall Signed-off-by: Paul Derscheid Signed-off-by: Pedro Amorim commit bcac635126454d015e50d75a7f40fc29eca173ad Author: Laura Escamilla Date: Thu Oct 8 09:30:09 2026 +0000 Bug 43463: Display SIP2 listener ports in system information **Test plan:** 1. Apply the patch. 2. Ensure SIP2 is configured with at least one listener in `SIPconfig.xml`. 3. Navigate to **About Koha → System information** in the staff interface. 4. Confirm that the **SIP2 configuration** section appears. 5. Verify that all configured SIP2 listener ports and their corresponding transport types are displayed correctly. 6. Confirm that the displayed values match those in `SIPconfig.xml`. 7. Confirm that the existing System information warnings continue to display correctly. 8. Sign off and have a great day :) Signed-off-by: Rae Schumann Signed-off-by: Kyle M Hall Signed-off-by: Paul Derscheid Signed-off-by: Pedro Amorim commit 10938f2b9482cd371988583b9ea87063fb031bc9 Author: Nick Clemens Date: Fri Sep 25 18:52:35 2026 +0000 Bug 41387: (QA follow-up) Additional POD Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim