[Bug 20436] New: Add ability to specify itemtypes for longoverdue.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Bug ID: 20436 Summary: Add ability to specify itemtypes for longoverdue.pl Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz It would be nice if we could filter long overdues based on itemtype the same way we can already filter based on borrower category code. -- 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=20436 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=20436 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 73026 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73026&action=edit Bug 20436 - Add ability to specify itemtypes for longoverdue.pl It would be nice if we could filter long overdues based on itemtype the same way we can already filter based on borrower category code. Test Plan: 1) Set up a number of overdues of various itemtypes 2) Run longoverdue.pl with --list-itemtypes to show itemtypes 3) Run longoverdue.pl with --itemtype to verify it only operates on that itemtype 4) Run longoverdue.pl with multiple --itemtype switches, verify it only operates on those itemtypes 5) Run longoverdue.pl with --skip-itemtype to verify it does not operate on that itemtype 6) Run longoverdue.pl with multiple --skip-itemtype switches, verify that it does not operate on those itemtypes -- 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=20436 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- 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=20436 Jesse Maseto <jesse@bywatersolutions.com> 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=20436 Jesse Maseto <jesse@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #73026|0 |1 is obsolete| | --- Comment #2 from Jesse Maseto <jesse@bywatersolutions.com> --- Created attachment 80984 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80984&action=edit Works like a charm! Thx Kyle Bug 20436 - Add ability to specify itemtypes for longoverdue.pl It would be nice if we could filter long overdues based on itemtype the same way we can already filter based on borrower category code. Test Plan: 1) Set up a number of overdues of various itemtypes 2) Run longoverdue.pl with --list-itemtypes to show itemtypes 3) Run longoverdue.pl with --itemtype to verify it only operates on that itemtype 4) Run longoverdue.pl with multiple --itemtype switches, verify it only operates on those itemtypes 5) Run longoverdue.pl with --skip-itemtype to verify it does not operate on that itemtype 6) Run longoverdue.pl with multiple --skip-itemtype switches, verify that it does not operate on those itemtypes Signed-off-by: Jesse Maseto <jesse@bywatersolution.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80984|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 81024 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81024&action=edit Bug 20436 - Add ability to specify itemtypes for longoverdue.pl It would be nice if we could filter long overdues based on itemtype the same way we can already filter based on borrower category code. Test Plan: 1) Set up a number of overdues of various itemtypes 2) Run longoverdue.pl with --list-itemtypes to show itemtypes 3) Run longoverdue.pl with --itemtype to verify it only operates on that itemtype 4) Run longoverdue.pl with multiple --itemtype switches, verify it only operates on those itemtypes 5) Run longoverdue.pl with --skip-itemtype to verify it does not operate on that itemtype 6) Run longoverdue.pl with multiple --skip-itemtype switches, verify that it does not operate on those itemtypes Signed-off-by: Jesse Maseto <jesse@bywatersolution.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Martha Fuerst <mfuerst@hmcpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mfuerst@hmcpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- * Commit title does not start with 'Bug XXXXX: ' - 62f2b5d QA: Looking here -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- + 'l|lost=s%' => \$lost, 'category=s' => $borrower_category, 'skip-category=s' => $skip_borrower_category, 'list-categories' => \$list_categories, + 'itemtype=s' => $itemtype, + 'skip-itemtype=s' => $skip_itemtype, + 'list-itemtypes' => \$list_itemtypes, This is a confusing mix of handling options. I think we should always pass a reference like name => \$option, but as you can see we already deviate from that here. But you are adding new cases. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Typo "The options --itemtype and --skip-itemtype are mually exclusive.\n" But I am not a native speaker, so I might be wrong? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- +=item B<--list-itemtypes> + +List itemtypes available for use by B<--itemtype> or +B<--skip-itemtype>, and exit. I am not a fan of such options. There are better ways to list them. One is already in and I would rather remove it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Changing status. Too much noise for me now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wizzyrea@gmail.com --- Comment #9 from Liz Rea <wizzyrea@gmail.com> --- Just noting that this still applies and only needs attention to QA concerns. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81024|0 |1 is obsolete| | --- Comment #10 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 86983 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=86983&action=edit Bug 20436: Add ability to specify itemtypes for longoverdue.pl It would be nice if we could filter long overdues based on itemtype the same way we can already filter based on borrower category code. Test Plan: 1) Set up a number of overdues of various itemtypes 2) Run longoverdue.pl with --list-itemtypes to show itemtypes 3) Run longoverdue.pl with --itemtype to verify it only operates on that itemtype 4) Run longoverdue.pl with multiple --itemtype switches, verify it only operates on those itemtypes 5) Run longoverdue.pl with --skip-itemtype to verify it does not operate on that itemtype 6) Run longoverdue.pl with multiple --skip-itemtype switches, verify that it does not operate on those itemtypes Signed-off-by: Jesse Maseto <jesse@bywatersolution.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 --- Comment #11 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 86984 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=86984&action=edit Bug 20436: (QA follow up) - reference and typo fixes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 --- Comment #12 from Liz Rea <wizzyrea@gmail.com> --- Fixed commit headlines on original patch, and addressed the reference and typo concerns. I leave the last one "+=item B<--list-itemtypes> + +List itemtypes available for use by B<--itemtype> or +B<--skip-itemtype>, and exit. I am not a fan of such options. There are better ways to list them. One is already in and I would rather remove it." for Kyle. Liz -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #86983|0 |1 is obsolete| | --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 89304 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89304&action=edit Bug 20436: Add ability to specify itemtypes for longoverdue.pl It would be nice if we could filter long overdues based on itemtype the same way we can already filter based on borrower category code. Test Plan: 1) Set up a number of overdues of various itemtypes 2) Run longoverdue.pl with --list-itemtypes to show itemtypes 3) Run longoverdue.pl with --itemtype to verify it only operates on that itemtype 4) Run longoverdue.pl with multiple --itemtype switches, verify it only operates on those itemtypes 5) Run longoverdue.pl with --skip-itemtype to verify it does not operate on that itemtype 6) Run longoverdue.pl with multiple --skip-itemtype switches, verify that it does not operate on those itemtypes Signed-off-by: Jesse Maseto <jesse@bywatersolution.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #86984|0 |1 is obsolete| | --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 89305 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89305&action=edit Bug 20436: (QA follow up) - reference and typo fixes Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Passing QA but frowning: + my @itemtypes = sort map { uc $_->[0] } @{ C4::Context->dbh->selectall_arrayref(q|SELECT itemtype FROM itemtypes|) }; +my @available_itemtypes = map { uc $_->[0] } @{ $dbh->selectall_arrayref(q|SELECT itemtype FROM itemtypes|) }; Old school SQL.. The earlier mention of --list-itemtypes is no blocker for me. Leaving final decision to RM ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com Keywords| |additional_work_needed --- Comment #16 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Marcel de Rooy from comment #15) This one can be done in a follow-up please Kyle? Pushing for now
Passing QA but frowning:
+ my @itemtypes = sort map { uc $_->[0] } @{ C4::Context->dbh->selectall_arrayref(q|SELECT itemtype FROM itemtypes|) };
+my @available_itemtypes = map { uc $_->[0] } @{ $dbh->selectall_arrayref(q|SELECT itemtype FROM itemtypes|) };
Old school SQL..
This seems okay to me, we should make a rule somewhere if we like this or not
The earlier mention of --list-itemtypes is no blocker for me. Leaving final decision to RM ;)
Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 --- Comment #17 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 89962 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89962&action=edit Bug 20436: (RM follow-up) Use Koha objects instead of mysql -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89962|0 |1 is obsolete| | --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 90040 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90040&action=edit Bug 20436: (RM follow-up) Use Koha objects instead of mysql Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #19 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- We could probably remove the ->search()-> part of the call, but at this point I think we should do that first thing next cycle. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #20 from Nick Clemens <nick@bywatersolutions.com> --- Last follow-up pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Version(s)| |19.05.00 released in| | Resolution|--- |FIXED --- Comment #21 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Enhancement will not be backported to 18.11.x series -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement increases release notes| |the granularity of the long | |overdue cronjob, allowing | |the library to exclude some | |itemtypes from the process, | |and/or define different | |parameters for a specific | |itemtype. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24105 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24105 [Bug 24105] Longoverdue gives error message when --itemtypes are specified -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20436 Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@collect | |o.ca -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org