[Bug 28001] New: delete_patrons.pl requires category but does not mention this in POD
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28001 Bug ID: 28001 Summary: delete_patrons.pl requires category but does not mention this in POD Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz You cannot run the script without category, the SQL fails - we should either fix this or note that category is mandatory in the script root@kohadevbox:koha(master)$ perl misc/cronjobs/delete_patrons.pl --expired_before =1910-01-01 C4::Members::GetBorrowersToExpunge(): DBI Exception: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') GROUP BY borrowers.borrowernumber ) xxx WHERE currentissue IS NULL' at line 12 [for Statement " SELECT * FROM ( SELECT borrowers.borrowernumber, MAX(old_issues.timestamp) AS latestissue, MAX(issues.timestamp) AS currentissue FROM borrowers JOIN categories USING (categorycode) LEFT JOIN ( SELECT guarantor_id FROM borrower_relationships WHERE guarantor_id IS NOT NULL AND guarantor_id <> 0 ) as tmp ON borrowers.borrowernumber=tmp.guarantor_id LEFT JOIN old_issues USING (borrowernumber) LEFT JOIN issues USING (borrowernumber) WHERE category_type <> 'S' AND ( borrowers.flags IS NULL OR borrowers.flags = 0 ) AND tmp.guarantor_id IS NULL AND dateexpiry < ? AND categorycode IN () GROUP BY borrowers.borrowernumber -- 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=28001 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26517 -- 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=28001 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no --- Comment #1 from Magnus Enger <magnus@libriotech.no> --- Is this error triggered if you do a "dry run" (without -c|--confirm)? I have been doing some dry runs on 20.05.08 and I have not seen this error. -- 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=28001 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27050 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27050 [Bug 27050] Allow multiple category_codes in delete_patrons.pl -- 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=28001 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Magnus Enger from comment #1)
Is this error triggered if you do a "dry run" (without -c|--confirm)? I have been doing some dry runs on 20.05.08 and I have not seen this error.
I believe caused by 27050 - so not affecting 20.05 -- 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=28001 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org Keywords| |rel_21_05_candidate -- 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=28001 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28001 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 119363 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119363&action=edit Bug 28001: (bug 27050 follow-up) Fix delete_patrons if no category passed GetBorrowersToExpunge must not crash if called with an empty patron category list Test plan: Call delete_patrons.pl with and without patron categories. The script must work as expected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28001 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=28001 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119363|0 |1 is obsolete| | --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 119387 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119387&action=edit Bug 28001: (bug 27050 follow-up) Fix delete_patrons if no category passed GetBorrowersToExpunge must not crash if called with an empty patron category list Test plan: Call delete_patrons.pl with and without patron categories. The script must work as expected Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28001 Nick Clemens <nick@bywatersolutions.com> 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=28001 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119387|0 |1 is obsolete| | --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 119650 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119650&action=edit Bug 28001: (bug 27050 follow-up) Fix delete_patrons if no category passed GetBorrowersToExpunge must not crash if called with an empty patron category list Test plan: Call delete_patrons.pl with and without patron categories. The script must work as expected Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28001 --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 119651 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119651&action=edit Bug 28001: (QA follow-up) Clarify messages and indicate test mode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28001 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|delete_patrons.pl requires |Fix delete_patrons.pl if no |category but does not |category is passed |mention this in POD | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28001 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.00 released in| | Status|Passed QA |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=28001 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28001 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_21_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28001 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED CC| |fridolin.somers@biblibre.co | |m --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 27050 not in 20.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org