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

--- Comment #215 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 211707
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211707&action=edit
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 <[email protected]>
Signed-off-by: Matt Blenkinsop <[email protected]>
Signed-off-by: Martin Renvoize <[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