Bug 34891

Summary: View restrictions button (patrons page) doesn't link to tab
Product: Koha Reporter: David Nind <david>
Component: PatronsAssignee: Owen Leonard <oleonard>
Status: RESOLVED FIXED QA Contact: Emily Lamancusa <emily.lamancusa>
Severity: minor    
Priority: P5 - low CC: emily.lamancusa, fridolin.somers, gmcharlt, kyle.m.hall, matt.blenkinsop
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:
23.11.00,23.05.05
Bug Depends on: 33528    
Bug Blocks:    
Attachments: Bug 34891: Correct link on view restrictions button
Bug 34891: Correct link on view restrictions button
Bug 34891: Correct link on view restrictions button

Description David Nind 2023-09-22 16:27:33 UTC
When there are restrictions on a patron's account, the 'View restrictions' button that appears after the list of restrictions doesn't scroll you down to the restrictions tab (on either the check out or details tab).

To replicate:
1. For any patron, add a restriction (Patrons > [patron] > Check out or Details tab > Add manual restriction).
2. The restriction is now listed at the top of the page, with a 'View restrictions' button.
3. Note that if you click the 'View restrictions' button:
  - It opens the Restrictions tab,
  - But doesn't scroll down the page to the actual tab
4. This is more evident on the details section of the patron account.
Comment 1 Owen Leonard 2023-09-22 16:39:48 UTC
Created attachment 156116 [details] [review]
Bug 34891: Correct link on view restrictions button

This patch updates the button which appears on the circulation page
when a patron is restricted. Before this patch, clicking the button
would activate the restrictions tab but wouldn't scroll the page to make
the tab visible.

To test, apply the patch and check out to a patron who has one or more
restrictions.

- There should be a message on the page, "Restricted since..."
- Click the "View restrictions" button.
- The page should jump down so that the tabs are visible and the
  restrictions tab should be active.
- Test on the patron details page too.
Comment 2 David Nind 2023-09-22 16:47:15 UTC
Created attachment 156119 [details] [review]
Bug 34891: Correct link on view restrictions button

This patch updates the button which appears on the circulation page
when a patron is restricted. Before this patch, clicking the button
would activate the restrictions tab but wouldn't scroll the page to make
the tab visible.

To test, apply the patch and check out to a patron who has one or more
restrictions.

- There should be a message on the page, "Restricted since..."
- Click the "View restrictions" button.
- The page should jump down so that the tabs are visible and the
  restrictions tab should be active.
- Test on the patron details page too.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Emily Lamancusa 2023-09-28 19:10:52 UTC
Created attachment 156339 [details] [review]
Bug 34891: Correct link on view restrictions button

This patch updates the button which appears on the circulation page
when a patron is restricted. Before this patch, clicking the button
would activate the restrictions tab but wouldn't scroll the page to make
the tab visible.

To test, apply the patch and check out to a patron who has one or more
restrictions.

- There should be a message on the page, "Restricted since..."
- Click the "View restrictions" button.
- The page should jump down so that the tabs are visible and the
  restrictions tab should be active.
- Test on the patron details page too.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 4 Emily Lamancusa 2023-09-28 19:13:24 UTC
Trivial patch, nice fix, QA script is happy. Passing QA.
Comment 5 Tomás Cohen Arazi 2023-10-04 13:44:58 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 6 Fridolin Somers 2023-10-06 00:29:19 UTC
Pushed to 23.05.x for 23.05.05
Comment 7 Matt Blenkinsop 2023-10-17 17:21:45 UTC
Dependency missing for 22.11.x - not backporting