Bug 40739

Summary: Setting TransfersBlockCirc to 'Don't block' does not allow for scanning to continue
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: CirculationAssignee: Lucas Gass (lukeg) <lucas>
Status: Needs documenting --- QA Contact: Emily Lamancusa (emlam) <emily.lamancusa>
Severity: major    
Priority: P5 - low CC: emily.lamancusa, fridolin.somers, gmcharlt, kkosiec, kyle, lisette
Version: MainKeywords: regression
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This patch fixes a bug where setting TransfersBlockCirc to 'Don't block' did not allow scanning to continue after the modal pop-up was displayed.
Version(s) released in:
25.11.00,25.05.04
Circulation function:
Bug Depends on: 38714    
Bug Blocks:    
Attachments: Bug 40739: Use correct block/noblock class in item-transfer-modal
Bug 40739: Use correct block/noblock class in item-transfer-modal
Bug 40739: Use correct block/noblock class in item-transfer-modal

Description Lucas Gass (lukeg) 2025-09-02 14:16:23 UTC
To recreate: 

1. Set TransfersBlockCirc to 'Don't block'
2. Check in some items not from your library to initiate a transfer. 
3. See the modal pop-op, "Transfer to home library"
4. However, you cannot continue to scan the next item unless you first dismiss the modal.
Comment 1 Lucas Gass (lukeg) 2025-09-02 14:31:31 UTC
This seems to have been lost with Bug 38842.
Comment 2 Lucas Gass (lukeg) 2025-09-02 14:45:39 UTC
Created attachment 186051 [details] [review]
Bug 40739: Use correct block/noblock class in item-transfer-modal

To test:
1. Set TransfersBlockCirc to 'Don't block'
2. Check in some items not from your library to initiate a transfer.
3. See the modal pop-op, "Transfer to home library"
4. However, you cannot continue to scan the next item unless you first dismiss the modal.
5. APPLY PATCH
6. Try again, this time at step 4 the barcode input should have focus and you'll be able to scan the next item.
Comment 3 Lucas Gass (lukeg) 2025-09-02 14:46:25 UTC
Setting to major because this can impact workflows quite badly.
Comment 4 Kathleen 2025-09-02 17:39:52 UTC
This is definitely affecting our workflow for items returning home. Staff either have to click on the pop up or use "ALT + Y" to bypass the screen. Previously, we could bypass if we scanned another item.
Comment 5 Emily Lamancusa (emlam) 2025-09-03 15:28:40 UTC
Created attachment 186081 [details] [review]
Bug 40739: Use correct block/noblock class in item-transfer-modal

To test:
1. Set TransfersBlockCirc to 'Don't block'
2. Check in some items not from your library to initiate a transfer.
3. See the modal pop-op, "Transfer to home library"
4. However, you cannot continue to scan the next item unless you first dismiss the modal.
5. APPLY PATCH
6. Try again, this time at step 4 the barcode input should have focus and you'll be able to scan the next item.
Comment 6 Emily Lamancusa (emlam) 2025-09-03 15:52:34 UTC
Moving this straight to PQA; it's a trivial fix for a major regression.

I think the cause was 8e7f5556 (bug 38714), though:
    [% IF Koha.Preference('TransfersBlockCirc') %]
-       <div id="item-transfer-modal" class="modal modal-lg block audio-alert-action" data-bs-backdrop="static" data-bs-keyboard="false">
+       [% SET div_class='block' %]
    [% ELSE %]
-       <div id="item-transfer-modal" class="modal modal-lg noblock audio-alert-action">
+       [% SET div_class='noblock' %]
    [% END %]
+   <div id="item-transfer-modal" class="modal modal-lg block audio-alert-action" [% IF Koha.Preference('TransfersBlockCirc') %]data-bs-backdrop="static" data-bs-keyboard="false"[% END %]>
Comment 7 Emily Lamancusa (emlam) 2025-09-03 15:53:14 UTC
Created attachment 186099 [details] [review]
Bug 40739: Use correct block/noblock class in item-transfer-modal

To test:
1. Set TransfersBlockCirc to 'Don't block'
2. Check in some items not from your library to initiate a transfer.
3. See the modal pop-op, "Transfer to home library"
4. However, you cannot continue to scan the next item unless you first dismiss the modal.
5. APPLY PATCH
6. Try again, this time at step 4 the barcode input should have focus and you'll be able to scan the next item.

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 8 Emily Lamancusa (emlam) 2025-09-03 15:53:41 UTC
Thanks for catching that, Lucas! :)
Comment 9 Lucas Gass (lukeg) 2025-09-03 17:44:41 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 10 Paul Derscheid 2025-09-20 08:59:39 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 11 Fridolin Somers 2025-10-10 13:52:25 UTC
Bug 38714 not in 24.11.x