Bug 28043 - Some patron clubs operations don't work from later pages of results
Summary: Some patron clubs operations don't work from later pages of results
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 27749
  Show dependency treegraph
 
Reported: 2021-03-26 18:35 UTC by Owen Leonard
Modified: 2021-12-13 21:10 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.05,20.05.11
Circulation function:


Attachments
Bug 28043: Some patron clubs operations don't work from later pages of results (2.49 KB, patch)
2021-03-26 18:54 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28043: Some patron clubs operations don't work from later pages of results (2.53 KB, patch)
2021-03-27 08:15 UTC, Amit Gupta
Details | Diff | Splinter Review
Bug 28043: Some patron clubs operations don't work from later pages of results (2.59 KB, patch)
2021-03-27 14:08 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2021-03-26 18:35:11 UTC
On the patron clubs page, the clubs and club templates are each displayed in a paginated DataTable. JavaScript-driven controls in these tables don't work because the event handler doesn't take into account that the HTML elements may not be present in the initial page.
Comment 1 Owen Leonard 2021-03-26 18:54:09 UTC
Created attachment 118876 [details] [review]
Bug 28043: Some patron clubs operations don't work from later pages of results

This page changes the way event handlers are defined for some operations
on the patron clubs page. These changes make it possible for the
controls to work on multi-page tables of clubs.

To test, apply the patch and got to Tools -> Patron clubs.

- If necessary, add enough patron club templates and patron clubs that
  there are more than 10 of each.
- Click to the second page of club templates and try to delete a
  template. It should work correctly.
- Click to the second page of clubs and try to delete a club. It should
  work correctly.
- Add one or more patrons to a club (from the checkout or patron details
  page).
- Click to the second page of clubs and try the "Search to hold" menu
  item. It should redirect you to the search page.
- After entering a search, the results page should include "Place hold
  for <club>" links with each result.
Comment 2 Amit Gupta 2021-03-27 08:15:06 UTC
Created attachment 118883 [details] [review]
Bug 28043: Some patron clubs operations don't work from later  pages of results

To test, apply the patch and got to Tools -> Patron clubs.

- If necessary, add enough patron club templates and patron clubs that
  there are more than 10 of each.
- Click to the second page of club templates and try to delete a
  template. It should work correctly.
- Click to the second page of clubs and try to delete a club. It should
  work correctly.
- Add one or more patrons to a club (from the checkout or patron details
  page).
- Click to the second page of clubs and try the "Search to hold" menu
  item. It should redirect you to the search page.
- After entering a search, the results page should include "Place hold
  for <club>" links with each result.
Comment 3 Katrin Fischer 2021-03-27 14:08:19 UTC
Created attachment 118890 [details] [review]
Bug 28043: Some patron clubs operations don't work from later pages of results

This page changes the way event handlers are defined for some operations
on the patron clubs page. These changes make it possible for the
controls to work on multi-page tables of clubs.

To test, apply the patch and got to Tools -> Patron clubs.

- If necessary, add enough patron club templates and patron clubs that
  there are more than 10 of each.
- Click to the second page of club templates and try to delete a
  template. It should work correctly.
- Click to the second page of clubs and try to delete a club. It should
  work correctly.
- Add one or more patrons to a club (from the checkout or patron details
  page).
- Click to the second page of clubs and try the "Search to hold" menu
  item. It should redirect you to the search page.
- After entering a search, the results page should include "Place hold
  for <club>" links with each result.

Signed-off-by: Amit Gupta <amitddng135@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Jonathan Druart 2021-04-01 16:55:41 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 5 Fridolin Somers 2021-04-13 15:02:57 UTC
Pushed to 20.11.x for 20.11.05
Comment 6 Andrew Fuerste-Henry 2021-04-24 14:33:27 UTC
Pushed to 20.05.x for 20.05.11
Comment 7 Victor Grousset/tuxayo 2021-04-24 16:53:33 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.