[Bug 33871] New: Add where parameter to sitemap.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33871 Bug ID: 33871 Summary: Add where parameter to sitemap.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: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz Follow-up on 33870 -- 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=33871 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |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=33871 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33871 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 151879 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151879&action=edit Bug 33871: Use Koha object in Sitemapper, add optional filter Test plan: Run misc/cronjobs/sitemap.pl -where "biblionumber>X" (replace X by some clever value) Verify results by browsing sitemap files. 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=33871 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 151880 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151880&action=edit Bug 33871: Test where parameter in Sitemapper.t This makes it possible to remove the ugly global deletes at the start. Test plan: Run t/db_dependent/Sitemapper.t 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=33871 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |33870 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33870 [Bug 33870] Remove T::D::C from Sitemapper.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33871 --- Comment #3 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 153458 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153458&action=edit Bug 33871: Add try catch in case where parameter is not valid SQL Hi Marcel is this try catch a good idea or irrelevant and unecessary? Also, shoul we keep at least 1 test for ->run() (without params) in Sitemapper.t? The where param in Sitemapper->run is optional, I think should still test for ->run() -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33871 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Pedro Amorim from comment #3)
Created attachment 153458 [details] [review] Bug 33871: Add try catch in case where parameter is not valid SQL
Hi Marcel is this try catch a good idea or irrelevant and unecessary?
Also, shoul we keep at least 1 test for ->run() (without params) in Sitemapper.t? The where param in Sitemapper->run is optional, I think should still test for ->run()
Sounds good to me -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33871 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> ---
(In reply to Pedro Amorim from comment #3)
Created attachment 153458 [details] [review] [review] Bug 33871: Add try catch in case where parameter is not valid SQL
Hi Marcel is this try catch a good idea or irrelevant and unecessary?
On second thought I would not add it. Note that we are just writing to a file here while reading db records. The DBIx exception is not really expected.
Also, shoul we keep at least 1 test for ->run() (without params) in Sitemapper.t? The where param in Sitemapper->run is optional, I think should still test for ->run()
I will have a look. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33871 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=33871 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #153458|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33871 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> ---
Also, shoul we keep at least 1 test for ->run() (without params) in Sitemapper.t? The where param in Sitemapper->run is optional, I think should still test for ->run()
Strictly speaking perhaps yes. But looking at it, I think that we should be pragmatic. We would be testing if an empty where, i.e. a Koha objects search with empty parameters {} would return all records. To make the test perform on a larger database without deleting all records, would again need a mock on ->process. Probably too much complexity for a very small gain to confirm something that we know and it is tested elsewhere too.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33871 Pedro Amorim <pedro.amorim@ptfs-europe.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=33871 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #151879|0 |1 is obsolete| | --- Comment #7 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 153534 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153534&action=edit Bug 33871: Use Koha object in Sitemapper, add optional filter Test plan: Run misc/cronjobs/sitemap.pl -where "biblionumber>X" (replace X by some clever value) Verify results by browsing sitemap files. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Pedro Amorim <pedro.amorim@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=33871 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #151880|0 |1 is obsolete| | --- Comment #8 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 153535 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153535&action=edit Bug 33871: Test where parameter in Sitemapper.t This makes it possible to remove the ugly global deletes at the start. Test plan: Run t/db_dependent/Sitemapper.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Pedro Amorim <pedro.amorim@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=33871 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Pedro Amorim from comment #8)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Thx ! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33871 Jonathan Druart <jonathan.druart+koha@gmail.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=33871 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #153534|0 |1 is obsolete| | Attachment #153535|0 |1 is obsolete| | --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 155107 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155107&action=edit Bug 33871: Use Koha object in Sitemapper, add optional filter Test plan: Run misc/cronjobs/sitemap.pl -where "biblionumber>X" (replace X by some clever value) Verify results by browsing sitemap files. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33871 --- Comment #11 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 155108 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155108&action=edit Bug 33871: Test where parameter in Sitemapper.t This makes it possible to remove the ugly global deletes at the start. Test plan: Run t/db_dependent/Sitemapper.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33871 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.11.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=33871 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33871 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #13 from Fridolin Somers <fridolin.somers@biblibre.com> --- Not backported to 23.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org