https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41728 --- Comment #34 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197356 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197356&action=edit Bug 41728: (QA follow-up) Restore original execution order for Wrongbranch The refactoring changed the relative order of the Wrongbranch early return and several status-update operations. In the original AddReturn, the execution order was: 1. checkout/patron lookup 2. not-issued handling + RecordLocalUseOnReturn 3. withdrawn check (early return) 4. location_update_trigger 5. UpdateNotForLoanStatusOnCheckin 6. CanBookBeReturned / Wrongbranch check (early return) 7. BlockReturnOfLostItems After the refactoring, the Wrongbranch blocker returned early before steps 2, 4 and 5, causing three regressions: - RecordLocalUseOnReturn was not recorded for non-issued items scanned at the wrong branch - location_update_trigger was skipped for Wrongbranch returns - UpdateNotForLoanStatusOnCheckin was skipped for Wrongbranch returns Fix by splitting blocker handling into two phases: 1. BlockedWithdrawn: earliest early return, before status updates (matches original withdrawn check position) 2. Wrongbranch and BlockedLost: after RecordLocalUseOnReturn, location_update_trigger, and UpdateNotForLoanStatusOnCheckin (matches original CanBookBeReturned position) -- You are receiving this mail because: You are watching all bug changes.