[Bug 42859] New: Move transfer-resolution logic from returns.pl down into AddReturn
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42859 Bug ID: 42859 Summary: Move transfer-resolution logic from returns.pl down into AddReturn 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 Depends on: 42852, 42853, 42854, 42855, 42856, 42857, 42858 Blocks: 42851 Target Milestone: --- Split off from bug 42851. Final consolidation step. The logic that resolves a mis-routed transfer on check-in (cancel the stale in-transit row + create a corrected transfer to the original destination, and re-link holds) currently lives only in the staff check-in controller circ/returns.pl:554-578. Every other check-in entry point (SIP2, OPAC self check-in, OPAC self-checkout, inventory tool, automatic check-in) re-calls AddReturn directly and must each re-implement or ignore this handling - which is exactly how items get orphaned in transit (see dependent bugs). Once the per-interface behaviours are agreed on the dependent bugs, move the shared resolution into C4::Circulation::AddReturn (or a helper it calls) so all callers benefit from one DRY implementation, with per-interface presentation (screen messages, prompts, exceptions-bin routing) layered on top via the returned messages hash. This bug deliberately depends on the per-interface bugs so each use case is considered carefully before the logic is unified. Test plan: 1. Verify each dependent bug's agreed behaviour is preserved after the refactor. 2. Confirm AddReturn resolves mis-routed transfers regardless of caller. 3. Run t/db_dependent/Circulation*.t and SIP/transfer tests. 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 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42852 [Bug 42852] SIP2 self-check check-in does not resolve mis-routed transfers https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42853 [Bug 42853] OPAC self check-in does not resolve mis-routed transfers https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42854 [Bug 42854] OPAC self-checkout does not handle items that are in transit https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42855 [Bug 42855] Inventory tool check-in does not resolve mis-routed transfers https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42856 [Bug 42856] Automatic check-in does not resolve open transfers https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42857 [Bug 42857] AddReturn early returns skip transfer processing (wrong branch, withdrawn) https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42858 [Bug 42858] AddReturn does not handle Transfer->receive OnLoan exception gracefully -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org