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

--- Comment #1 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 192235
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192235&action=edit
Bug 41679: Fix overlapping modals when hold conflicts with stock rotation
transfer

When checking in an item that has both a hold and a stock rotation
repatriation transfer, both modals would appear simultaneously,
overlapping each other and making it impossible to interact with
either one properly.

This occurred because:
1. The hold modal showed when 'waiting' was set
2. The transfer modal condition checked for 'reserved' but not 'waiting'
3. Both modals had the "block" class, causing simultaneous display

This patch ensures holds take precedence over stock rotation transfers
by adding a check for the 'waiting' flag to the transfer modal condition.

When a hold is found, only the hold modal displays. The stock rotation
transfer can be handled at a subsequent check-in, which is appropriate
since holds are patron-facing and time-sensitive, while stock rotation
is an internal process that can be deferred.

Test plan:
1. Enable StockRotation system preference
2. Navigate to Cataloging->Stock rotation
3. Click '+ New rota' and fill out with any values
4. Click 'Manage->stages' for the Rota
5. Add a stage for Centerville for 1 day, and Midway for 1 day
6. Return to rotas
7. Click Manage->items for the rota
8. Add an item
9. Return to rotas
10. Click 'Activate'
11. On the command line run the stock rotation job:
    perl misc/cronjobs/stockrotation.pl -x
12. There should be one item for initiation
13. Run it again, there should be one stationary item
14. Place an item specific hold for the item, for pickup at Midway
15. Check the item in at Centerville, confirm transfer
16. Check the item in at Midway, confirm hold
17. Run the stock rotation job again:
    perl misc/cronjobs/stockrotation.pl -x
18. There should be one item for repatriation
19. Check in the item again at Midway
20. Before patch: Two overlapping modals appear (hold + transfer)
21. After patch: Only the hold modal appears
22. Confirm the hold - no transfer modal should appear
23. The stock rotation transfer will be handled at the next check-in

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to