Bug 33737

Summary: Add bookings to patron details
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: CirculationAssignee: Martin Renvoize <martin.renvoize>
Status: Pushed to main --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: esther.melander, gmcharlt, kyle.m.hall, lisette.scheer, m.de.rooy, marie.hedbom, martin.aubeut, testopia, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00
Bug Depends on: 29002    
Bug Blocks:    
Attachments: Bug 33737: Add bookings tab to patron details
Bug 33737: Fix patron bookings table display issues
Bug 33737: Link from patron bookings to biblio bookings
Bug 33737: Add bookings tab to patron details
Bug 33737: Fix patron bookings table display issues
Bug 33737: Link from patron bookings to biblio bookings
Bug 33737: Fix undefined variable issues
Bug 33737: Fix undefined variable issues
Bug 33737: Add bookings tab to patron details
Bug 33737: Fix patron bookings table display issues
Bug 33737: Link from patron bookings to biblio bookings
Bug 33737: Fix undefined variable issues
Bug 33737: Add bookings tab to patron details
Bug 33737: Fix patron bookings table display issues
Bug 33737: Link from patron bookings to biblio bookings
Bug 33737: Fix undefined variable issues
Bug 33737: Add bookings tab to patron details
Bug 33737: Fix patron bookings table display issues
Bug 33737: Link from patron bookings to biblio bookings
Bug 33737: Fix undefined variable issues
Bug 33737: (QA follow-up) Translatability
Bug 33737: (QA follow-up) Translatability
Bug 33737: (QA follow-up) Add missing column configuration

Description Martin Renvoize 2023-05-15 14:48:18 UTC
As part of the bookings workflow, we should add a "bookings" tab to the patron details page.
Comment 1 Esther Melander 2023-12-29 19:15:19 UTC
+1

There is no way to find a booking a patron has scheduled without knowing the title.
Comment 2 Martin Renvoize 2024-01-15 16:19:01 UTC
Created attachment 161045 [details] [review]
Bug 33737: Add bookings tab to patron details
Comment 3 Martin Renvoize 2024-01-15 16:19:03 UTC
Created attachment 161046 [details] [review]
Bug 33737: Fix patron bookings table display issues
Comment 4 Martin Renvoize 2024-01-15 16:19:06 UTC
Created attachment 161047 [details] [review]
Bug 33737: Link from patron bookings to biblio bookings
Comment 5 Martin Renvoize 2024-01-15 16:19:41 UTC
Rebased after splitting from original bug 29002 submission.
Comment 6 Martin AUBEUT 2024-01-23 09:43:26 UTC
The tab was there but when we tried to cancel the booking. it returns an error.
Comment 7 Victor Grousset/tuxayo 2024-01-23 09:44:25 UTC
Also a test plan is needed, we improvised but not knowing the feature, it was difficult
Comment 8 Martin Renvoize 2024-02-18 17:29:21 UTC
Created attachment 162253 [details] [review]
Bug 33737: Add bookings tab to patron details

This patch adds a new 'bookings' tab to the bottom of the members
details pages.  When a patron has any future or current bookings against
their record the tab will display the number of bookings in the tab name
and on clicking the tab a bookings table will display the current and
upcoming bookings.
Comment 9 Martin Renvoize 2024-02-18 17:29:23 UTC
Created attachment 162254 [details] [review]
Bug 33737: Fix patron bookings table display issues
Comment 10 Martin Renvoize 2024-02-18 17:29:26 UTC
Created attachment 162255 [details] [review]
Bug 33737: Link from patron bookings to biblio bookings
Comment 11 Martin Renvoize 2024-02-18 17:29:29 UTC
Created attachment 162256 [details] [review]
Bug 33737: Fix undefined variable issues

This patch resolves the undefined bookings_table variable issue reported
and also further fixes a subsequent undefined timeline bug that was
exposed by the original fix.
Comment 12 Martin Renvoize 2024-02-18 17:30:21 UTC
As an aside, we're using this in production with those customers at ptfs-e who are early adopters of bookings.
Comment 13 ByWater Sandboxes 2024-03-20 15:47:26 UTC
Created attachment 163557 [details] [review]
Bug 33737: Fix undefined variable issues

This patch resolves the undefined bookings_table variable issue reported
and also further fixes a subsequent undefined timeline bug that was
exposed by the original fix.

Signed-off-by: esther <esther@bywatersolutions.com>
Comment 14 Esther Melander 2024-03-20 15:48:30 UTC
My test plan:

1. Search catalog and find a record.
2. Make item on the record bookable.
3. Place booking
4. Navigate to patron account
5. See the bookings tab on the Patron Details page
6. See the item that was booked.

And it worked!
Comment 15 Martin Renvoize 2024-04-17 11:44:40 UTC
Created attachment 164994 [details] [review]
Bug 33737: Add bookings tab to patron details

This patch adds a new 'bookings' tab to the bottom of the members
details pages.  When a patron has any future or current bookings against
their record the tab will display the number of bookings in the tab name
and on clicking the tab a bookings table will display the current and
upcoming bookings.

Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Comment 16 Martin Renvoize 2024-04-17 11:44:43 UTC
Created attachment 164995 [details] [review]
Bug 33737: Fix patron bookings table display issues

Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Comment 17 Martin Renvoize 2024-04-17 11:44:46 UTC
Created attachment 164996 [details] [review]
Bug 33737: Link from patron bookings to biblio bookings

Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Comment 18 Martin Renvoize 2024-04-17 11:44:48 UTC
Created attachment 164997 [details] [review]
Bug 33737: Fix undefined variable issues

This patch resolves the undefined bookings_table variable issue reported
and also further fixes a subsequent undefined timeline bug that was
exposed by the original fix.

Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Comment 19 Martin Renvoize 2024-04-17 11:46:22 UTC
Just a rebase.. be nice to get this one in for the next release..
Comment 20 Marcel de Rooy 2024-05-10 08:27:16 UTC
Looking here. Seeing no test plans btw.
Comment 21 Marcel de Rooy 2024-05-10 09:18:45 UTC
Created attachment 166513 [details] [review]
Bug 33737: Add bookings tab to patron details

This patch adds a new 'bookings' tab to the bottom of the members
details pages.  When a patron has any future or current bookings against
their record the tab will display the number of bookings in the tab name
and on clicking the tab a bookings table will display the current and
upcoming bookings.

Signed-off-by: Esther Melander <esther@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 22 Marcel de Rooy 2024-05-10 09:18:48 UTC
Created attachment 166514 [details] [review]
Bug 33737: Fix patron bookings table display issues

Signed-off-by: Esther Melander <esther@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 23 Marcel de Rooy 2024-05-10 09:18:50 UTC
Created attachment 166515 [details] [review]
Bug 33737: Link from patron bookings to biblio bookings

Signed-off-by: Esther Melander <esther@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 24 Marcel de Rooy 2024-05-10 09:18:54 UTC
Created attachment 166516 [details] [review]
Bug 33737: Fix undefined variable issues

This patch resolves the undefined bookings_table variable issue reported
and also further fixes a subsequent undefined timeline bug that was
exposed by the original fix.

Signed-off-by: Esther Melander <esther@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 25 Marcel de Rooy 2024-05-10 09:22:20 UTC
QA Comment:

Ignoring this one line:
 WARN   Koha/Patron.pm
   WARN   tidiness
                The file is less tidy than before (bad/messy lines before: 293, now: 294)

The feature feels still bit experimental. Without test plans I had trouble finding my way here. And came across a few warnings and errors.
But the patches look good to me.
Comment 26 Katrin Fischer 2024-05-10 13:44:25 UTC
1) My booking doesn't show :(

I'll provide you a screenshot in Mattermost.


2) Translatability


koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
+                            "title": "Booking ID",
+                            "defaultContent": "Any item",

Please double fix all the title etc. in the new code there - I didn't copy all out.
Comment 27 Martin Renvoize 2024-05-10 14:15:49 UTC
Created attachment 166565 [details] [review]
Bug 33737: Add bookings tab to patron details

This patch adds a new 'bookings' tab to the bottom of the members
details pages.  When a patron has any future or current bookings against
their record the tab will display the number of bookings in the tab name
and on clicking the tab a bookings table will display the current and
upcoming bookings.

Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 28 Martin Renvoize 2024-05-10 14:15:52 UTC
Created attachment 166566 [details] [review]
Bug 33737: Fix patron bookings table display issues

Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 29 Martin Renvoize 2024-05-10 14:15:56 UTC
Created attachment 166567 [details] [review]
Bug 33737: Link from patron bookings to biblio bookings

Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 30 Martin Renvoize 2024-05-10 14:15:59 UTC
Created attachment 166568 [details] [review]
Bug 33737: Fix undefined variable issues

This patch resolves the undefined bookings_table variable issue reported
and also further fixes a subsequent undefined timeline bug that was
exposed by the original fix.

Signed-off-by: Esther Melander <esther@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 31 Martin Renvoize 2024-05-10 14:16:01 UTC
Created attachment 166570 [details] [review]
Bug 33737: (QA follow-up) Translatability

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 32 Martin Renvoize 2024-05-10 14:16:55 UTC
(In reply to Katrin Fischer from comment #26)
> 1) My booking doesn't show :(
> 
> I'll provide you a screenshot in Mattermost.

I can't replicate this.. it just works for me.

> 2) Translatability
> 
> 
> koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
> +                            "title": "Booking ID",
> +                            "defaultContent": "Any item",
> 
> Please double fix all the title etc. in the new code there - I didn't copy
> all out.

Follow-up included
Comment 33 Martin Renvoize 2024-05-10 14:17:55 UTC
Created attachment 166573 [details] [review]
Bug 33737: (QA follow-up) Translatability

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 34 Katrin Fischer 2024-05-10 14:41:36 UTC
Thx for the translation fixes, booking shows now.

Tiny thing:
On the bookings table, I can see the "configure" button, but I believe we have no table configuration on this table yet, so the button should not appear. Leaving additional_work_needed for now.
Comment 35 Katrin Fischer 2024-05-10 14:46:55 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 36 Martin Renvoize 2024-05-10 14:59:19 UTC
Created attachment 166577 [details] [review]
Bug 33737: (QA follow-up) Add missing column configuration

I somehow missed commiting the column configuration bits.
Comment 37 Katrin Fischer 2024-05-10 15:46:55 UTC
Pushed for 24.05!

Well done everyone, thank you!