Bug 35787 - Remove Koha::Template::Plugin::Biblio::CanBook
Summary: Remove Koha::Template::Plugin::Biblio::CanBook
Status: Passed QA
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:
Keywords:
Depends on: 29002 35782
Blocks: 35788
  Show dependency treegraph
 
Reported: 2024-01-12 13:03 UTC by Jonathan Druart
Modified: 2024-02-20 17:42 UTC (History)
2 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:


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