[Bug 42857] New: AddReturn early returns skip transfer processing (wrong branch, withdrawn)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42857 Bug ID: 42857 Summary: AddReturn early returns skip transfer processing (wrong branch, withdrawn) Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com Blocks: 42851 Target Milestone: --- Split off from bug 42851. AddReturn has early-return paths that fire BEFORE the transfer-receive block at C4/Circulation.pm:2553: - "Return not allowed at this branch" (CanBookBeReturned fails) returns at C4/Circulation.pm:2435. - Withdrawn item with BlockReturnOfWithdrawnItems returns at C4/Circulation.pm:2362. If an in-transit item is scanned at such a branch, the transfer is never touched and the row is orphaned on the "Transfers to receive" report. Proposed approach: an item arriving at its transfer destination should override the check-in block. More generally, transfer processing should run (or at least be evaluated) even on these blocked-return paths, so an active transfer is correctly received/resolved before the block is applied. Test plan: 1. Set up a circulation rule / withdrawn-block that blocks return at branch B. 2. Transfer an item to B (in transit). 3. Check it in at B. 4. Before: return blocked, transfer left in transit. 5. After: arrival at the destination is honoured and the transfer is received. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42851 [Bug 42851] [OMNIBUS] Items left stuck in transit when checked in outside the staff returns page -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42857 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42859 Patch complexity|--- |Small patch Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk Comma delimited| |OpenFifth list of Sponsors| |<https://openfifth.co.uk> Sponsorship status|--- |Sponsored Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42859 [Bug 42859] Move transfer-resolution logic from returns.pl down into AddReturn -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42857 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 200498 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200498&action=edit Bug 42857: Honour arriving transfers when check-in is otherwise blocked AddReturn() has two early-return paths that fire before the transfer receive block: a withdrawn item under BlockReturnOfWithdrawnItems, and a return refused by CanBookBeReturned (AllowReturnToBranch rules). When an in-transit item arrives at its transfer destination via one of these paths, the transfer was never received and lingered forever on the 'Transfers to receive' report. This patch fetches the active transfer once, up front, and computes whether this check-in completes a transfer (tobranch eq branch, the same condition the receive block uses). That condition now overrides both early returns, so flow falls through to the existing receive logic and the transfer is correctly received. The transfer is reused in the receive block, removing a duplicate lookup. Test plan: 1. Set AllowReturnToBranch=homebranch. 2. Transfer an item to a branch that is not its homebranch (in transit). 3. Check it in at that destination branch. 4. Without the patch: check-in refused (Wrongbranch), transfer left open. With the patch: transfer received, TransferArrived reported. 5. Repeat with BlockReturnOfWithdrawnItems=1 and a withdrawn item. 6. prove t/db_dependent/Circulation/Returns.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42857 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org