[Bug 38686] New: Add Koha::Items->filter_by_checked_out
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38686 Bug ID: 38686 Summary: Add Koha::Items->filter_by_checked_out Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org I wrote this method in an attempt to fix a behavior that wasn't exactly as I understood in the first place. So not sure I'll use it. Putting it here in case it helps some other dev and deserves to be in the codebase. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38686 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38686 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 175396 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175396&action=edit Bug 38686: Unit tests -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38686 --- Comment #2 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 175398 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175398&action=edit 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 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38686 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38686 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38686 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175396|0 |1 is obsolete| | Attachment #175398|0 |1 is obsolete| | --- Comment #3 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 175763 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175763&action=edit Bug 38686: Unit tests Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38686 --- Comment #4 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 175764 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175764&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38686 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |RESOLVED Resolution|--- |DUPLICATE CC| |jonathan.druart@gmail.com --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- Will be implemented on bug 37334. *** This bug has been marked as a duplicate of bug 37334 *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38686 --- Comment #6 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38686 --- Comment #7 from Jonathan Druart <jonathan.druart@gmail.com> --- Please add them there then. It's not pushed yet! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org