Bug 35787 - Remove Koha::Template::Plugin::Biblio::CanBook
Summary: Remove Koha::Template::Plugin::Biblio::CanBook
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Tomás Cohen Arazi
URL: https://github.com/PTFS-Europe/koha/t...
Keywords:
Depends on: 29002 35782
Blocks: 35788
  Show dependency treegraph
 
Reported: 2024-01-12 13:03 UTC by Jonathan Druart
Modified: 2024-03-18 09:01 UTC (History)
3 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.05.00


Attachments
Bug 35787: Remove Koha::Template::Plugin::Biblio::CanBook (2.79 KB, patch)
2024-01-12 13:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 35787: Remove Koha::Template::Plugin::Biblio::CanBook (2.84 KB, patch)
2024-01-15 13:27 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 35787: Add unit test for filter_by_bookable (1.67 KB, patch)
2024-01-16 09:49 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 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