https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42383

--- Comment #37 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 209570
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209570&action=edit
Bug 42383: (QA follow-up) Restore legacy post-return processing in the checkin
API

QA testing (comments 9 and 10) found several things returns.pl did after
AddReturn that POST /checkins did not. This patch adds them:

- HoldsAutoFill: when a hold is found (and not already waiting) the hold
  is now filled on checkin, as returns.pl did, using
  Koha::Checkin->confirm_hold. A 'hold_auto_filled' message is added so
  the client can skip the hold modal.
- Wrong transfers: a new Koha::Checkin->replace_wrong_transfer replaces
  the transfer with one from the checkin library (replace =>
  'WrongTransfer', ignore_limits => 1) and links it to the checkin, so
  transfer_confirmation/transfer_cancellation work on it.
- Bundles: verified_bundle_barcodes is now processed. verify_bundle also
  sets datelastborrowed, records a return claim and charges the
  replacement fee (WhenLostChargeReplacementFee) for missing items, like
  returns.pl. 'bundle_missing_items' and 'bundle_unexpected_items'
  messages report the outcome. The patron is the one returned by
  AddReturn, as the stored checkout may already be anonymized.
- Koha::Checkin->cancel_hold honours forgive_hold_fees (it was accepted
  by the endpoint but ignored), charging the cancellation fee otherwise.
- The in_bundle message payload now carries the host biblio id and
  barcode, so the client can link to the host record.
- checkout.patron.checkouts+count can be embedded.
- The checkin module policy exposes dropbox_date and
  anonymous_patron_id, and recalls_enabled is now false when UseRecalls
  is 'off' (it was always true). Koha::Checkin->cancel_transfer had the
  same UseRecalls check.

Test plan:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ yarn api:bundle
  k$ restart_all
  k$ prove t/db_dependent/Koha/Checkin.t \
           t/db_dependent/api/v1/checkins.t \
           t/db_dependent/Koha/Module/Policy/Checkin.t \
           t/db_dependent/Circulation.t \
           xt/api.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Assisted-by: Opus 5.5 (Anthropic)
Signed-off-by: Brendan Lawlor <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to