Bug 35787

Summary: Remove Koha::Template::Plugin::Biblio::CanBook
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: Needs documenting --- QA Contact: Tomás Cohen Arazi <tomascohen>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, martin.renvoize, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
URL: https://github.com/PTFS-Europe/koha/tree/bug_35787
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00
Bug Depends on: 29002, 35782    
Bug Blocks: 35788    
Attachments: Bug 35787: Remove Koha::Template::Plugin::Biblio::CanBook
Bug 35787: Remove Koha::Template::Plugin::Biblio::CanBook
Bug 35787: Add unit test for filter_by_bookable

Description Jonathan Druart 2024-01-12 13:03:23 UTC
We can replace it with biblio.items.filter_by_bookable, no need to have this TT method.
Comment 1 Jonathan Druart 2024-01-12 13:05:50 UTC
Created attachment 160960 [details] [review]
Bug 35787: Remove Koha::Template::Plugin::Biblio::CanBook

We can replace it with biblio.items.filter_by_bookable, no need to have this TT method.

Additionally there was no test for it.

Test plan:
Make sure the Bookings tab on the left of the biblio detail page is
displayed when needed.

Note that there is also a "Place booking" button that should appear in
the toolbar.
Comment 2 Tomás Cohen Arazi 2024-01-15 13:27:00 UTC
Created attachment 161038 [details] [review]
Bug 35787: Remove Koha::Template::Plugin::Biblio::CanBook

We can replace it with biblio.items.filter_by_bookable, no need to have this TT method.

Additionally there was no test for it.

Test plan:
Make sure the Bookings tab on the left of the biblio detail page is
displayed when needed.

Note that there is also a "Place booking" button that should appear in
the toolbar.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Tomás Cohen Arazi 2024-01-15 13:28:31 UTC
Works as expected, QA script happy.

QA question: You considered this TT method too new for a dbrev? I'd agree, just mentioning in case it was an unintended miss.
Comment 4 Jonathan Druart 2024-01-15 15:04:21 UTC
(In reply to Tomás Cohen Arazi from comment #3)
> Works as expected, QA script happy.
> 
> QA question: You considered this TT method too new for a dbrev? I'd agree,
> just mentioning in case it was an unintended miss.

Yes, on purpose. I don't think we need one.
Comment 5 Martin Renvoize 2024-01-15 19:28:31 UTC
Agreed on the too new to warrant the db rev.. but I will submit the unit tests for filter_by_bookable first thing tomorrow.. I have them on a branch
Comment 6 Martin Renvoize 2024-01-16 09:49:23 UTC
Created attachment 161056 [details] [review]
Bug 35787: Add unit test for filter_by_bookable

Trivial test added for filter_by_bookable
Comment 7 Martin Renvoize 2024-03-11 08:11:49 UTC
Branch pushed https://github.com/PTFS-Europe/koha/tree/bug_35787
Comment 8 Katrin Fischer 2024-03-15 08:40:04 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 9 Fridolin Somers 2024-03-18 09:01:09 UTC
Enhancement not pushed to 23.11.x