Bug 39095

Summary: Clicking 'Cancel' for article requests in the OPAC patron account does not respond
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: Pushed to stable --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: major    
Priority: P5 - low CC: fridolin.somers
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00,24.11.06
Circulation function:
Bug Depends on: 32341    
Bug Blocks:    
Attachments: Bug 39095: Fix problems with article request deletion
Bug 39095: Fix problems with article request deletion
Bug 39095: Fix problems with article request deletion

Description Marcel de Rooy 2025-02-11 15:19:39 UTC
Seeing this under 22.11 and 23.11. Master looks the same btw.

The last column is dtr controlled. You must expand. At that moment the button Cancel appears under the table.
Clicking Cancel does not trigger the click event?
Comment 1 Owen Leonard 2025-02-14 16:05:54 UTC
Created attachment 178102 [details] [review]
Bug 39095: Fix problems with article request deletion

This patch fixes a number of issues with article request deletion in the
OPAC:
 - Cancel button should work when initially hidden by DataTables'
   responsive behavior.
 - Table row hiding upon deletion should work when DataTables'
   responsive behavior has created a secondary row to display the hidden
   columns.
- Tab and table caption article count should correctly update when a
  request is canceled.

To test, apply the patch and enable ArticleRequests if necessary. If
enabling ArticleRequests for the first time you may need to update your
circulation rules to allow article requests on some patrons or item
types.

- Log in to the OPAC and place several article requests.
- Go to your user summary page and open the article requests tab.
- Narrow your browser window until at least the last column is hidden by
  DataTables.
- Click the "+" button to show the hidden details, which should include
  the cancel button.
- Click the cancel button. After confirming the deletion the original
  row should be hidden along with the row shown by DataTables.
- The article request count in the article requests tab should now be
  updated to reflect the new number of requests.
- The same should be true of the article requests table heading.

Sponsored-by: Athens County Public Libraries
Comment 2 David Nind 2025-02-14 20:42:12 UTC
Created attachment 178120 [details] [review]
Bug 39095: Fix problems with article request deletion

This patch fixes a number of issues with article request deletion in the
OPAC:
 - Cancel button should work when initially hidden by DataTables'
   responsive behavior.
 - Table row hiding upon deletion should work when DataTables'
   responsive behavior has created a secondary row to display the hidden
   columns.
- Tab and table caption article count should correctly update when a
  request is canceled.

To test, apply the patch and enable ArticleRequests if necessary. If
enabling ArticleRequests for the first time you may need to update your
circulation rules to allow article requests on some patrons or item
types.

- Log in to the OPAC and place several article requests.
- Go to your user summary page and open the article requests tab.
- Narrow your browser window until at least the last column is hidden by
  DataTables.
- Click the "+" button to show the hidden details, which should include
  the cancel button.
- Click the cancel button. After confirming the deletion the original
  row should be hidden along with the row shown by DataTables.
- The article request count in the article requests tab should now be
  updated to reflect the new number of requests.
- The same should be true of the article requests table heading.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Marcel de Rooy 2025-02-17 08:28:02 UTC
Created attachment 178133 [details] [review]
Bug 39095: Fix problems with article request deletion

This patch fixes a number of issues with article request deletion in the
OPAC:
 - Cancel button should work when initially hidden by DataTables'
   responsive behavior.
 - Table row hiding upon deletion should work when DataTables'
   responsive behavior has created a secondary row to display the hidden
   columns.
- Tab and table caption article count should correctly update when a
  request is canceled.

To test, apply the patch and enable ArticleRequests if necessary. If
enabling ArticleRequests for the first time you may need to update your
circulation rules to allow article requests on some patrons or item
types.

- Log in to the OPAC and place several article requests.
- Go to your user summary page and open the article requests tab.
- Narrow your browser window until at least the last column is hidden by
  DataTables.
- Click the "+" button to show the hidden details, which should include
  the cancel button.
- Click the cancel button. After confirming the deletion the original
  row should be hidden along with the row shown by DataTables.
- The article request count in the article requests tab should now be
  updated to reflect the new number of requests.
- The same should be true of the article requests table heading.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2025-02-17 08:29:13 UTC
(In reply to Owen Leonard from comment #1)

Thx for this quick fix.
Comment 5 Katrin Fischer 2025-02-17 14:07:34 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 6 Fridolin Somers 2025-06-19 09:01:50 UTC
Pushed to 24.11.x for 24.11.06