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

--- Comment #132 from Andrii Nugged <[email protected]> ---
Created attachment 212081
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212081&action=edit
Bug 38666: Preserve the retrieval queue across hold operations

Do not automatically mark a new closed stack request as waiting when
ReservesNeedReturns allows ordinary local holds to become waiting.
The item must first pass through retrieval.

Use an item membership subquery instead of a has-many reserves join in
filter_by_for_hold, so multiple holds do not multiply item rows.

Exclude current closed stack requests from bulk suspension. Keep bulk
resume inclusive so an already suspended hold can still be resumed.
Disabled behavior and existing hold classification are unchanged.

Test plan:
Before applying this follow-up, with the preceding CSR patches applied:
1. Enable EnableClosedStackRequests.
2. Set ReservesNeedReturns to Automatically.
3. Prepare a checked-in closed stack item without another hold.
4. Open its staff record's Closed stack requests view.
5. Select a patron, select the item, and click Place hold with pickup
   at the item's holding library.
6. Observe that the item is already Waiting, before retrieval.
7. In the OPAC, use a patron with an ordinary hold and a pending closed
   stack request.
8. Open Holds and click Suspend all holds.
9. Confirm Yes, suspend all holds. Observe that the closed stack request
   also becomes suspended and leaves its separate tab.

Apply this follow-up.

After applying this follow-up:
1. Repeat the placement flow with a fresh checked-in closed stack item.
2. Confirm it remains a closed stack request and is not Waiting.
3. Repeat Suspend all holds for an ordinary hold and a pending request.
4. Confirm only the ordinary hold is suspended; the closed stack request
   remains pending in its separate tab.
5. Resume all suspended holds and confirm ordinary holds can resume.

Automated regression also covers both item-level_itypes settings,
multiple holds per item, caller filters, ordinary holds, disabled mode,
and resuming previously suspended holds:
prove -v t/db_dependent/ClosedStackRequests.t

Co-Authored-By: Loontik <[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