[Bug 9045] New: Adding some parameters to export_borrowers.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Priority: P5 - low Change sponsored?: --- Bug ID: 9045 Assignee: gmcharlt@gmail.com Summary: Adding some parameters to export_borrowers.pl Severity: enhancement Classification: Unclassified OS: All Reporter: sophie.meynieux@biblibre.com Hardware: All Status: NEW Version: master Component: Command-line Utilities Product: Koha As suggested by Paul Poulain un Bug 8376, this patch adds a --where parameter to filter some kind of borrowers to export. Also adding a --separator parameter, usefull when the recipient of the export ask for a specific file format. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |8376 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 --- Comment #1 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- Created attachment 13362 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13362&action=edit Bug 9045 : Adding --where parameter to filter what kind of borrowers to export and --separator to choose a specific caracter for patron export -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 --- Comment #2 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- Created attachment 13363 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13363&action=edit Bug 9045 : Adding --where parameter to filter what kind of borrowers to export and --separator to choose a specific caracter for patron export -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 --- Comment #3 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- Forgot a warn, sent a new patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13362|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Patch complexity|--- |Small patch See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=8874 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13363|0 |1 is obsolete| | --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 13923 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13923&action=edit [SIGNED-OFF] Bug 9045 : Adding --where parameter to filter what kind of borrowers to export and --separator to choose a specific caracter for patron export Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Tested, works as advertised. Note, to use tab character as a separater, do this: -s $'\t' -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adrien.saurat@biblibre.com --- Comment #5 from Marc Véron <veron@veron.ch> --- *** Bug 8874 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com Assignee|gmcharlt@gmail.com |sophie.meynieux@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #6 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- QA Comment: Nice addition! Two points of attention: Looking for a cardnumber that does not exist produces: DBD::mysql::st fetchrow_array failed: fetch() without execute() at ./export_borrowers.pl line 112. Please check if your query still has result records. Note that you should already do that on line 91 (first fetchrow). This may already give no results and a uninit warning in the log. Documentational note: Using a condition on a character field requires using quotes like: ./export_borrowers.pl -s @ -where "surname='De Rooy'" I would suggest explaining this in the usage statement with a simple example (not using the previous one :) Just for the record: The where clause coming from the command line is not checked, so could be misused (sql injection). Note that does not block this patch; more command-line scripts in misc contain similar constructs. Failed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 --- Comment #7 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- Created attachment 16249 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16249&action=edit Bug 9045 followup : Adding test if results has some records and usage example for --where clause -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Sophie MEYNIEUX <sophie.meynieux@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #8 from Sophie MEYNIEUX <sophie.meynieux@biblibre.com> --- Follow-up patch to answer Marcel De Rooy requirements. If request has no results, script exits with a meaningful message -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #16249|0 |1 is obsolete| | --- Comment #9 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 16440 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16440&action=edit [SIGNED-OFF] Bug 9045 - Adding some parameters to export_borrowers.pl Followup : Adding test if results has some records and usage example for --where clause Signed-off-by: Owen Leonard <oleonard@myacpl.org> I infer from the bug comments that a proper test for this patch is to check how the script reacts if it returns no results with a --where clause, and to verify that there is a good usage example for the --where option. These are both true, so I think this passes. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de QA Contact|m.de.rooy@rijksmuseum.nl |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13923|0 |1 is obsolete| | Attachment #16440|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 16578 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16578&action=edit [PASSED QA] Bug 9045 : Adding --where parameter to filter what kind of borrowers to export and --separator to choose a specific caracter for patron export Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Tested, works as advertised. Note, to use tab character as a separater, do this: -s $'\t' Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Comments on second patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 16579 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16579&action=edit [PASSED QA] Bug 9045 - Adding some parameters to export_borrowers.pl Followup : Adding test if results has some records and usage example for --where clause Signed-off-by: Owen Leonard <oleonard@myacpl.org> I infer from the bug comments that a proper test for this patch is to check how the script reacts if it returns no results with a --where clause, and to verify that there is a good usage example for the --where option. These are both true, so I think this passes. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests and QA script pass. Tests done: - tested -s option with \; - tested -f surname -f borrowernumber to have multiple fields specified - tested -w with "borrowernumber > 100" and similar with and without results - if no results a message is shown - tested -h shows documentation for new options -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9045 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #12 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org