Bug 37047 - Patron bookings are not visible from patrons checkout page
Summary: Patron bookings are not visible from patrons checkout page
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Sam Lau
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on: 33737
Blocks: 37141
  Show dependency treegraph
 
Reported: 2024-06-06 16:18 UTC by Kelly McElligott
Modified: 2024-06-21 13:25 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00


Attachments
Bug 37047: Make Patron Bookings table visible from Patrons Checkout page (6.75 KB, patch)
2024-06-11 16:42 UTC, Sam Lau
Details | Diff | Splinter Review
Bug 37047: Make Patron Bookings table visible from Patrons Checkout page (6.81 KB, patch)
2024-06-12 11:46 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 37047: Move bookings table JS table to its own file (12.03 KB, patch)
2024-06-12 11:46 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 37047: Make use of DRY bookings-table.js in moremember.tt (6.40 KB, patch)
2024-06-12 11:46 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 37047: Make Patron Bookings table visible from Patrons Checkout page (6.87 KB, patch)
2024-06-14 15:57 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 37047: Move bookings table JS table to its own file (12.10 KB, patch)
2024-06-14 15:57 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 37047: Make use of DRY bookings-table.js in moremember.tt (6.47 KB, patch)
2024-06-14 15:57 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 37047: (QA follow-up) Move non-bookings code back (8.45 KB, patch)
2024-06-14 15:57 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 37047: Make Patron Bookings table visible from Patrons Checkout page (6.87 KB, patch)
2024-06-20 09:55 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 37047: Move bookings table JS table to its own file (12.10 KB, patch)
2024-06-20 09:55 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 37047: Make use of DRY bookings-table.js in moremember.tt (6.47 KB, patch)
2024-06-20 09:55 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 37047: (QA follow-up) Move non-bookings code back (4.25 KB, patch)
2024-06-20 09:55 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 37047: (QA follow-up) Remove nesting of document ready function (9.41 KB, patch)
2024-06-20 09:55 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 37047: Make Patron Bookings table visible from Patrons Checkout page (6.87 KB, patch)
2024-06-21 13:07 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 37047: Move bookings table JS table to its own file (12.10 KB, patch)
2024-06-21 13:07 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 37047: Make use of DRY bookings-table.js in moremember.tt (6.47 KB, patch)
2024-06-21 13:07 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 37047: (QA follow-up) Move non-bookings code back (4.25 KB, patch)
2024-06-21 13:07 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 37047: (QA follow-up) Remove nesting of document ready function (9.41 KB, patch)
2024-06-21 13:08 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 37047: (QA follow-up) Fix translations (3.68 KB, patch)
2024-06-21 13:08 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kelly McElligott 2024-06-06 16:18:05 UTC
Testing on Main, the Patron Bookings tab appears on the Patron page, and will indicate if there is a number of bookings, but nothing appears if the tab is clicked. 

To test:
1. Create an item bookable.
2. Book an item for a patron.
3. Either click the patron's name from the booking or go to the patron's detail page.
4. See they have a Booking (1) in their tab. 
5. Click this tab, but nothing appears. 

Bug 33737 shows that should appear here.
Comment 1 Kelly McElligott 2024-06-06 16:25:24 UTC
The bookings does appear from the moremember detail page, but not from the circulation.pl page
Comment 2 Sam Lau 2024-06-11 16:42:45 UTC
Created attachment 167640 [details] [review]
Bug 37047: Make Patron Bookings table visible from Patrons Checkout page

This patch makes it so that the patron bookings table loads properly from teh checkout page. Previously, it was only loading correctly from the details page.

To test:
1. Create an item bookable.
2. Book an item for a patron.
3. Go to the patron's checkout page.
4. See they have a Booking (1) in their tab.
5. Click this tab, but nothing appears.
6. Apply patch, restart_all
7. See they still have a Booking (1) in their tab.
8. Click this tab, table loads as expected.
Comment 3 Pedro Amorim 2024-06-12 11:46:11 UTC
Created attachment 167650 [details] [review]
Bug 37047: Make Patron Bookings table visible from Patrons Checkout page

This patch makes it so that the patron bookings table loads properly from teh checkout page. Previously, it was only loading correctly from the details page.

To test:
1. Create an item bookable.
2. Book an item for a patron.
3. Go to the patron's checkout page.
4. See they have a Booking (1) in their tab.
5. Click this tab, but nothing appears.
6. Apply patch, restart_all
7. See they still have a Booking (1) in their tab.
8. Click this tab, table loads as expected.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 4 Pedro Amorim 2024-06-12 11:46:13 UTC
Created attachment 167651 [details] [review]
Bug 37047: Move bookings table JS table to its own file

For reusability

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 5 Pedro Amorim 2024-06-12 11:46:16 UTC
Created attachment 167652 [details] [review]
Bug 37047: Make use of DRY bookings-table.js in moremember.tt

Test plan:
No functionality change, follow the original test plan and make sure the
table is displayed correctly on both screens:
<intra>/cgi-bin/koha/circ/circulation.pl?borrowernumber=
<intra>/cgi-bin/koha/members/moremember.pl?borrowernumber=1

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 6 Martin Renvoize 2024-06-14 10:59:25 UTC
Comment on attachment 167651 [details] [review]
Bug 37047: Move bookings table JS table to its own file

Review of attachment 167651 [details] [review]:
-----------------------------------------------------------------

I really like where this is headed and it was always my intention to do this work so thanks for taking it on.

::: koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
@@ -1051,5 @@
> -            });
> -
> -            $("#view_guarantees_finesandcharges").on("click",function(){
> -                $('#guarantees_finesandcharges-tab').click();
> -            });

These info_digests, finesholdissues, restrictions and guarantees pieces are all unrelated to bookings.. I think they should be left out here.
Comment 7 Martin Renvoize 2024-06-14 13:36:38 UTC
Looking at DRYing this out further now.. it would be nice to use the same table js on the bookings management page too.
Comment 8 Martin Renvoize 2024-06-14 15:57:16 UTC
Created attachment 167742 [details] [review]
Bug 37047: Make Patron Bookings table visible from Patrons Checkout page

This patch makes it so that the patron bookings table loads properly from teh checkout page. Previously, it was only loading correctly from the details page.

To test:
1. Create an item bookable.
2. Book an item for a patron.
3. Go to the patron's checkout page.
4. See they have a Booking (1) in their tab.
5. Click this tab, but nothing appears.
6. Apply patch, restart_all
7. See they still have a Booking (1) in their tab.
8. Click this tab, table loads as expected.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Martin Renvoize 2024-06-14 15:57:19 UTC
Created attachment 167743 [details] [review]
Bug 37047: Move bookings table JS table to its own file

For reusability

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize 2024-06-14 15:57:22 UTC
Created attachment 167744 [details] [review]
Bug 37047: Make use of DRY bookings-table.js in moremember.tt

Test plan:
No functionality change, follow the original test plan and make sure the
table is displayed correctly on both screens:
<intra>/cgi-bin/koha/circ/circulation.pl?borrowernumber=
<intra>/cgi-bin/koha/members/moremember.pl?borrowernumber=1

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize 2024-06-14 15:57:24 UTC
Created attachment 167745 [details] [review]
Bug 37047: (QA follow-up) Move non-bookings code back

We inadvertantly adding a little more than just the bookings table js
into it's own asset. This patch moves that code back and also renames
the asset file to /tables/bookings.js from /bookings-table.js as is the
scheme we're attempting to follow now (see '/modals/').

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize 2024-06-14 15:58:03 UTC
Comment on attachment 167745 [details] [review]
Bug 37047: (QA follow-up) Move non-bookings code back

Review of attachment 167745 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/js/bookings-table.js
@@ -1,1 @@
> -$(document).ready(function () {

This double nesting of document ready looks a little suspicious.
Comment 13 Martin Renvoize 2024-06-19 09:58:30 UTC
Testing now whether the nesting can be removed and all continue to work, then I'll PQA this one. Thanks guys.
Comment 14 Martin Renvoize 2024-06-20 09:55:24 UTC
Created attachment 167924 [details] [review]
Bug 37047: Make Patron Bookings table visible from Patrons Checkout page

This patch makes it so that the patron bookings table loads properly from teh checkout page. Previously, it was only loading correctly from the details page.

To test:
1. Create an item bookable.
2. Book an item for a patron.
3. Go to the patron's checkout page.
4. See they have a Booking (1) in their tab.
5. Click this tab, but nothing appears.
6. Apply patch, restart_all
7. See they still have a Booking (1) in their tab.
8. Click this tab, table loads as expected.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 15 Martin Renvoize 2024-06-20 09:55:27 UTC
Created attachment 167925 [details] [review]
Bug 37047: Move bookings table JS table to its own file

For reusability

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 16 Martin Renvoize 2024-06-20 09:55:30 UTC
Created attachment 167926 [details] [review]
Bug 37047: Make use of DRY bookings-table.js in moremember.tt

Test plan:
No functionality change, follow the original test plan and make sure the
table is displayed correctly on both screens:
<intra>/cgi-bin/koha/circ/circulation.pl?borrowernumber=
<intra>/cgi-bin/koha/members/moremember.pl?borrowernumber=1

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 17 Martin Renvoize 2024-06-20 09:55:33 UTC
Created attachment 167927 [details] [review]
Bug 37047: (QA follow-up) Move non-bookings code back

We inadvertantly adding a little more than just the bookings table js
into it's own asset. This patch moves that code back and also renames
the asset file to /tables/bookings.js from /bookings-table.js as is the
scheme we're attempting to follow now (see '/modals/').

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 18 Martin Renvoize 2024-06-20 09:55:36 UTC
Created attachment 167928 [details] [review]
Bug 37047: (QA follow-up) Remove nesting of document ready function

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 19 Martin Renvoize 2024-06-20 09:56:02 UTC
All working well including with QA follow-ups.

Passing QA
Comment 20 Katrin Fischer 2024-06-21 12:15:52 UTC
OK, 2 things here:

1) This one is new for me, so I need a little pointer maybe:

 FAIL	koha-tmpl/intranet-tmpl/prog/js/tables/bookings.js
   FAIL	  Tidiness
		File is not tidy, please run `yarn run prettier --trailing-comma es5 --arrow-parens avoid --write /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/js/tables/bookings.js`

2) Translatability

Some JavaScript code was moved from .tt to .js - we now need to adjust the translation "markers" to double underscore ( _() to __())

Exemplae: title: _("Booking ID"),

Please follow-up!
Comment 21 Martin Renvoize 2024-06-21 13:07:49 UTC
Created attachment 167958 [details] [review]
Bug 37047: Make Patron Bookings table visible from Patrons Checkout page

This patch makes it so that the patron bookings table loads properly from teh checkout page. Previously, it was only loading correctly from the details page.

To test:
1. Create an item bookable.
2. Book an item for a patron.
3. Go to the patron's checkout page.
4. See they have a Booking (1) in their tab.
5. Click this tab, but nothing appears.
6. Apply patch, restart_all
7. See they still have a Booking (1) in their tab.
8. Click this tab, table loads as expected.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 22 Martin Renvoize 2024-06-21 13:07:52 UTC
Created attachment 167959 [details] [review]
Bug 37047: Move bookings table JS table to its own file

For reusability

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 23 Martin Renvoize 2024-06-21 13:07:54 UTC
Created attachment 167960 [details] [review]
Bug 37047: Make use of DRY bookings-table.js in moremember.tt

Test plan:
No functionality change, follow the original test plan and make sure the
table is displayed correctly on both screens:
<intra>/cgi-bin/koha/circ/circulation.pl?borrowernumber=
<intra>/cgi-bin/koha/members/moremember.pl?borrowernumber=1

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 24 Martin Renvoize 2024-06-21 13:07:57 UTC
Created attachment 167961 [details] [review]
Bug 37047: (QA follow-up) Move non-bookings code back

We inadvertantly adding a little more than just the bookings table js
into it's own asset. This patch moves that code back and also renames
the asset file to /tables/bookings.js from /bookings-table.js as is the
scheme we're attempting to follow now (see '/modals/').

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 25 Martin Renvoize 2024-06-21 13:08:00 UTC
Created attachment 167962 [details] [review]
Bug 37047: (QA follow-up) Remove nesting of document ready function

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 26 Martin Renvoize 2024-06-21 13:08:02 UTC
Created attachment 167963 [details] [review]
Bug 37047: (QA follow-up) Fix translations
Comment 27 Katrin Fischer 2024-06-21 13:18:30 UTC
Thanks for the quick follow-up!
Comment 28 Katrin Fischer 2024-06-21 13:25:13 UTC
Pushed for 24.11!

Well done everyone, thank you!