Summary: | Add Koha::Items->filter_by_checked_out | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Architecture, internals, and plumbing | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | jonathan.druart, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 38686: Unit tests
Bug 38686: Add Koha::Items->filter_by_checked_out() Bug 38686: Unit tests Bug 38686: Add Koha::Items->filter_by_checked_out() |
Description
Tomás Cohen Arazi (tcohen)
2024-12-12 13:17:45 UTC
Created attachment 175396 [details] [review] Bug 38686: Unit tests Created attachment 175398 [details] [review] Bug 38686: Add Koha::Items->filter_by_checked_out() This patch adds a method for filtering `Koha::Items` resultsets by keeping only those items that currently checked out. Usage: ```perl if ( $biblio->items->filter_by_checked_out()->count ) { # do your stuff } ``` To test: 1. Apply this patches 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Items.t => SUCCESS: Tests pass 3. Sign off :-D Created attachment 175763 [details] [review] Bug 38686: Unit tests Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Created attachment 175764 [details] [review] Bug 38686: Add Koha::Items->filter_by_checked_out() This patch adds a method for filtering `Koha::Items` resultsets by keeping only those items that currently checked out. Usage: ```perl if ( $biblio->items->filter_by_checked_out()->count ) { # do your stuff } ``` To test: 1. Apply this patches 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Items.t => SUCCESS: Tests pass 3. Sign off :-D Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> (In reply to Jonathan Druart from comment #5) > Will be implemented on bug 37334. > > *** This bug has been marked as a duplicate of bug 37334 *** I liked my tests more :-P Please add them there then. It's not pushed yet! |