[Bug 12919] New: It'd be nice to be able to automate collecting all records added and deleted from the catalogue
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 Bug ID: 12919 Summary: It'd be nice to be able to automate collecting all records added and deleted from the catalogue Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: new feature Priority: P5 - low Component: Command-line Utilities Assignee: gmcharlt@gmail.com Reporter: chris@bigballofwax.co.nz QA Contact: testopia@bugs.koha-community.org In NZ almost all libraries participate in the National Union Catalogue, which means that libraries have to update their holdings periodically. So we created a system that runs as a cronjob and will generate a list of records added or updated in the catalogue, and a list of isbn of deleted records. These can be run as cron jobs with the output being emailed to a person or thing. Although this was initially designed to support the needs of NZ libraries, it is general enough that it can be used by anyone. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 --- Comment #1 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 31589 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31589&action=edit Bug 12919 : Module to facilitate sending new (or updated or deleted) cataloguing records somewhere -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 31590 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31590&action=edit Bug 12919 : Cronjob to create and email new or updated MARC records To test 1/ Add some new records to your Koha 2/ if you are using koha from packages run sudo koha-shell <kohainstancename> otherwise export PERL5LIB=/path/to/koha export KOHA_CONF=/path/to/koha-conf.xml 3/ run perl misc/cronjobs/newly_added_records --days 1 --address your@email.goes.here --format marc 4/ Check your email and see if you got some marc records -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 31591 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31591&action=edit Bug 12919 : Script to grab and email deleted records To test 1/ Delete some records from your Koha (with isbns) OR mark all items attached to a biblio as lost 2/ if you are using koha from packages run sudo koha-shell <kohainstancename> otherwise export PERL5LIB=/path/to/koha export KOHA_CONF=/path/to/koha-conf.xml 3/ run perl misc/cronjobs/newly_added_records --days 1 --address your@email.goes.here --lost --format isbn 4/ Check your email and see if you got a list of isbn of deleted records -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 Chris Cormack <chris@bigballofwax.co.nz> 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=12919 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|It'd be nice to be able to |Automate collecting all |automate collecting all |records added and deleted |records added and deleted |from the catalogue |from the catalogue | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m Assignee|gmcharlt@gmail.com |chris@bigballofwax.co.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz --- Comment #4 from Liz Rea <liz@catalyst.net.nz> --- This is such a handy tool, it could really use a signoff. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com Status|Needs Signoff |Failed QA --- Comment #5 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- It works. Just a couple of things: 1) If you have no new or deleted records, an email is sent anyway with an empty Koha.mrc file 2) License needs to be updated FAIL misc/cronjobs/newly_deleted_records.pl OK critic FAIL forbidden patterns forbidden pattern: Koha is now under the GPLv3 license (line 9) OK pod OK valid FAIL misc/cronjobs/newly_added_records.pl OK critic FAIL forbidden patterns forbidden pattern: Koha is now under the GPLv3 license (line 9) OK pod OK valid -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31589|0 |1 is obsolete| | --- Comment #6 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 39260 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39260&action=edit [SIGNED-OFF] Bug 12919 : Module to facilitate sending new (or updated or deleted) cataloguing records somewhere Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31590|0 |1 is obsolete| | --- Comment #7 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 39261 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39261&action=edit [SIGNED-OFF] Bug 12919: Cronjob to create and email new or updated MARC records To test 1/ Add some new records to your Koha 2/ if you are using koha from packages run sudo koha-shell <kohainstancename> otherwise export PERL5LIB=/path/to/koha export KOHA_CONF=/path/to/koha-conf.xml 3/ run perl misc/cronjobs/newly_added_records --days 1 --address your@email.goes.here --format marc 4/ Check your email and see if you got some marc records Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31591|0 |1 is obsolete| | --- Comment #8 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 39262 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39262&action=edit [SIGNED-OFF] Bug 12919: Script to grab and email deleted records To test 1/ Delete some records from your Koha (with isbns) OR mark all items attached to a biblio as lost 2/ if you are using koha from packages run sudo koha-shell <kohainstancename> otherwise export PERL5LIB=/path/to/koha export KOHA_CONF=/path/to/koha-conf.xml 3/ run perl misc/cronjobs/newly_added_records --days 1 --address your@email.goes.here --lost --format isbn 4/ Check your email and see if you got a list of isbn of deleted records Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described, both patches A simple error on license, fixed in followup -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 --- Comment #9 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 39263 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39263&action=edit Bug 12929: (followup) fix license I fix it myself. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Signed Off |Failed QA --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Feature uses MIME::Lite but does not appear to add it to the dependencies list, can you please add that? Mime::Lite is already available as a package for Debian so I don't think it will be an issue for Koha packages. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #11 from Liz Rea <liz@catalyst.net.nz> --- Hi Kyle, I see this in Master in C4/Installer/PerlDependencies.pm: 37 'MIME::Lite' => { 38 'usage' => 'Core', 39 'required' => '1', 40 'min_ver' => '3' 41 }, Is this not what is necessary? What more is needed? Cheers, Liz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- QA comments: 1/ perltidy new files 2/ Use pod2usage in pl scripts 3/ Write tests for new subroutines 4/ Be consistent with subroutine names (export_newrecords => export_new_records) Marked as Failed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 --- Comment #13 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 40505 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40505&action=edit Bug 12919 - perltidy and consistent sub naming -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Liz Rea from comment #13)
Created attachment 40505 [details] [review] Bug 12919 - perltidy and consistent sub naming
Liz, could you confirm this one can leave the FQA queue? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |ASSIGNED --- Comment #15 from Liz Rea <liz@catalyst.net.nz> --- Nope, it still needs unit tests and pod2usage updates as well. Liz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Comment on attachment 39260 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39260 [SIGNED-OFF] Bug 12919 : Module to facilitate sending new (or updated or deleted) cataloguing records somewhere Review of attachment 39260: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=12919&attachment=39260) ----------------------------------------------------------------- Don't you think it would be better to sent the mail to the message queue and let the users define a template letter? ::: C4/RecordExporter.pm @@ +274,5 @@
+sub get_isbns { + my ($record) = @_; + + my $res = ''; + my @fields = $record->field('020');
This is MARC21 specific. You should use a subroutine from C4::Koha. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12919 --- Comment #17 from Liz Rea <liz@catalyst.net.nz> --- Making it use a letter template and the letter queue is a good idea, but a scope creep. Happy to make another bug for that once the dev itself goes in. Cheers, Liz -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org