Bug 36701

Summary: Adjust hold confirmation to avoid showing empty div
Product: Koha Reporter: Emily Lamancusa <emily.lamancusa>
Component: TemplatesAssignee: Emily Lamancusa <emily.lamancusa>
Status: Pushed to main --- QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00
Bug Depends on: 33174    
Bug Blocks:    
Attachments: Bug 36701: Adjust confirmation to hide empty div
Bug 36701: Adjust confirmation to hide empty div
Bug 36701: Adjust confirmation to hide empty div

Description Emily Lamancusa 2024-04-25 18:57:48 UTC
Bug 33174 added a warning when cancelling multiple holds from request.pl, clearly indicating how many holds would be cancelled. The added div is empty when directly cancelling a single hold (by clicking the FA trash can icon next to it), so it makes sense to hide it in that case.
Comment 1 Emily Lamancusa 2024-04-25 19:03:00 UTC
Created attachment 165580 [details] [review]
Bug 36701: Adjust confirmation to hide empty div

To test:
1. Place a hold on any bib record
2. Cancel the hold by clicking the trash can icon next to it
--> Note that there is an empty red page section in the modal
3. Apply patch and refresh the page
4. Repeat steps 1-2
--> No empty red page section
5. Confirm that the test plan from bug 33174 still works
Comment 2 Lucas Gass 2024-04-25 19:07:47 UTC
Thanks Emily! Previous experience has told me that the hidden attribute doesn't always work well with jQuery's show() and hide() methods. 

I think it might be better to use style="display:none;" here. What do you think?
Comment 3 Emily Lamancusa 2024-04-25 19:24:12 UTC
Thanks for the tip, Lucas! That's good to know. I'll amend my patch.
Comment 4 Emily Lamancusa 2024-04-25 19:25:28 UTC
Created attachment 165583 [details] [review]
Bug 36701: Adjust confirmation to hide empty div

To test:
1. Place a hold on any bib record
2. Cancel the hold by clicking the trash can icon next to it
--> Note that there is an empty red page section in the modal
3. Apply patch and refresh the page
4. Repeat steps 1-2
--> No empty red page section
5. Confirm that the test plan from bug 33174 still works
Comment 5 Lucas Gass 2024-04-25 20:04:09 UTC
Created attachment 165588 [details] [review]
Bug 36701: Adjust confirmation to hide empty div

To test:
1. Place a hold on any bib record
2. Cancel the hold by clicking the trash can icon next to it
--> Note that there is an empty red page section in the modal
3. Apply patch and refresh the page
4. Repeat steps 1-2
--> No empty red page section
5. Confirm that the test plan from bug 33174 still works

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 6 Lucas Gass 2024-04-25 20:05:23 UTC
This looks good, fixes an obvious problem, QA scripts are happy. I feel good marking this one straight to PQA.
Comment 7 Emily Lamancusa 2024-05-08 13:42:31 UTC
Thanks, Lucas! Did you mean to set this to PQA? (it's still at Signed Off)
Comment 8 Lucas Gass 2024-05-08 14:06:55 UTC
(In reply to Emily Lamancusa from comment #7)
> Thanks, Lucas! Did you mean to set this to PQA? (it's still at Signed Off)

Thanks Emily, I did mean to set that to PQA. :)
Comment 9 Katrin Fischer 2024-05-08 16:25:17 UTC
Pushed for 24.05!

Well done everyone, thank you!