Bug 38060 - Bookings table does not render if tab opened from the URL
Summary: Bookings table does not render if tab opened from the URL
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Pedro Amorim
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on: 37047
Blocks:
  Show dependency treegraph
 
Reported: 2024-10-02 10:16 UTC by Pedro Amorim
Modified: 2024-10-23 17:18 UTC (History)
5 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:
24.11.00
Circulation function: bookings


Attachments
Bug 38060: Load bookings table on page load if tab href exists in URL hash (2.53 KB, patch)
2024-10-02 10:17 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38060: Load bookings table on page load if tab href exists in URL hash (2.74 KB, patch)
2024-10-02 10:27 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 38060: Load bookings table on page load if tab href exists in URL hash (2.80 KB, patch)
2024-10-03 20:38 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 38060: Load bookings table on page load if tab href exists in URL hash (2.86 KB, patch)
2024-10-22 14:03 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2024-10-02 10:16:19 UTC

    
Comment 1 Pedro Amorim 2024-10-02 10:17:08 UTC Comment hidden (obsolete)
Comment 2 Pedro Amorim 2024-10-02 10:27:26 UTC
Created attachment 172295 [details] [review]
Bug 38060: Load bookings table on page load if tab href exists in URL hash

Test plan, k-t-d or sandbox:
1) Start by making an item bookable. Visit a record's detail page:
<staff_url>/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=76
2) Make the first item (39999000003154) bookable by setting 'Bookable': Yes and click 'Update'
3) At the top of the page, you should now see a 'Place booking' button. Click that.
4) Select the patron: type 'koha' and pick 'koha (42)'. (This is borrowernumber 51).
5) Select booking dates, any date interval in the future. Click 'Submit'.
6) Attempt to access this patron's detail page with the bookings tab open:
<staff_url>/cgi-bin/koha/members/moremember.pl?borrowernumber=51#bookings_panel
7) Notice the tab opens, but the table does not render.
8) Attempt the same in the circulation page:
<staff_url>/cgi-bin/koha/circ/circulation.pl?borrowernumber=51#bookings_panel
9) Again, notice the tab opens, but the table does not render.
10) Apply patch. Repeat steps 6) and 8). Notice the table now renders.

Additional testing:
1) Place a hold for this patron and attempt to access the holds tab directly:
/cgi-bin/koha/circ/circulation.pl?borrowernumber=51#holds_panel
2) Notice it opens the tab and renders the table. This was already the case prior to this patch, this patch is only bringing the same behavior to the bookings tab for consistency.
Comment 3 Biblibre Sandboxes 2024-10-03 20:38:59 UTC
Created attachment 172373 [details] [review]
Bug 38060: Load bookings table on page load if tab href exists in URL hash

Test plan, k-t-d or sandbox:
1) Start by making an item bookable. Visit a record's detail page:
<staff_url>/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=76
2) Make the first item (39999000003154) bookable by setting 'Bookable': Yes and click 'Update'
3) At the top of the page, you should now see a 'Place booking' button. Click that.
4) Select the patron: type 'koha' and pick 'koha (42)'. (This is borrowernumber 51).
5) Select booking dates, any date interval in the future. Click 'Submit'.
6) Attempt to access this patron's detail page with the bookings tab open:
<staff_url>/cgi-bin/koha/members/moremember.pl?borrowernumber=51#bookings_panel
7) Notice the tab opens, but the table does not render.
8) Attempt the same in the circulation page:
<staff_url>/cgi-bin/koha/circ/circulation.pl?borrowernumber=51#bookings_panel
9) Again, notice the tab opens, but the table does not render.
10) Apply patch. Repeat steps 6) and 8). Notice the table now renders.

Additional testing:
1) Place a hold for this patron and attempt to access the holds tab directly:
/cgi-bin/koha/circ/circulation.pl?borrowernumber=51#holds_panel
2) Notice it opens the tab and renders the table. This was already the case prior to this patch, this patch is only bringing the same behavior to the bookings tab for consistency.

Signed-off-by: davedaghita <ddaghita@mckinneytexas.org>
Comment 4 davedaghita 2024-10-03 21:05:29 UTC
The booking panel URLs directing to the patron's account regenerate the bookings table showing their booked items in the bookings tab.
Comment 5 Martin Renvoize (ashimema) 2024-10-22 14:03:44 UTC
Created attachment 173153 [details] [review]
Bug 38060: Load bookings table on page load if tab href exists in URL hash

Test plan, k-t-d or sandbox:
1) Start by making an item bookable. Visit a record's detail page:
<staff_url>/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=76
2) Make the first item (39999000003154) bookable by setting 'Bookable': Yes and click 'Update'
3) At the top of the page, you should now see a 'Place booking' button. Click that.
4) Select the patron: type 'koha' and pick 'koha (42)'. (This is borrowernumber 51).
5) Select booking dates, any date interval in the future. Click 'Submit'.
6) Attempt to access this patron's detail page with the bookings tab open:
<staff_url>/cgi-bin/koha/members/moremember.pl?borrowernumber=51#bookings_panel
7) Notice the tab opens, but the table does not render.
8) Attempt the same in the circulation page:
<staff_url>/cgi-bin/koha/circ/circulation.pl?borrowernumber=51#bookings_panel
9) Again, notice the tab opens, but the table does not render.
10) Apply patch. Repeat steps 6) and 8). Notice the table now renders.

Additional testing:
1) Place a hold for this patron and attempt to access the holds tab directly:
/cgi-bin/koha/circ/circulation.pl?borrowernumber=51#holds_panel
2) Notice it opens the tab and renders the table. This was already the case prior to this patch, this patch is only bringing the same behavior to the bookings tab for consistency.

Signed-off-by: davedaghita <ddaghita@mckinneytexas.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize (ashimema) 2024-10-22 14:04:18 UTC
Thanks for the quick fix here Pedro, you beat me to it :)

All working and a clear improvement in code handling.

Passign QA
Comment 7 Katrin Fischer 2024-10-23 17:18:47 UTC
Pushed for 24.11!

Well done everyone, thank you!