When using UNIMARC_sync_date_created_with_marc_biblio.pl script with CataloguingLog on, you get a modification log on all catalog. Script should not call ModBiblio() when dates are already synchronized.
Created attachment 12598 [details] [review] Proposed patch Proposed patch
Script now does not call ModBiblio() when dates are already synchronized. And many more : + help usage with -h + verbose option to print several infos (count biblios, which biblio has been modified, ...) + manages DEBUG env var to print even more + 'where' option to limit process to some biblios (usefull to test and to run incremental modifications) + 099$c and 099$d are default values but you can specify what fields you use for date created and date last modified (works with control fields < 010) + test mode : if 'run' option is missing, script still shows which biblio would have been modified
Created attachment 13016 [details] [review] Proposed patch (revised) Patch revised. Control fields (<10) where not created if missing.
I made some tests with a standard and non-standard unimarc configuration. It is working properly (the right fields and subfields are edited in the records). Ex for a non-standard configuration: UNIMARC_sync_date_created_with_marc_biblio.pl -v -run -c 099b -m 099c I also tested the where option. It is working too (if the SQL limitation contains several words, you need to put into " ") Ex : UNIMARC_sync_date_created_with_marc_biblio.pl -v --where "biblionumber between 1 and 4" => "Number of concerned biblios: 4" So I sign off. Mathieu Saby Rennes 2 University
(In reply to comment #4) > > So I sign off. > > Mathieu Saby > Rennes 2 University Mathieu, will you please add you sign-off to the patch? i might have to pass on this QA, i no not have a UNIMARC koha configured Marcel, could you QA this one?
Created attachment 13339 [details] [review] Proposed patch (revised) Is it ok for you ? (This is my first sign off in BZ...) Mathieu Saby
(In reply to comment #6) > Created attachment 13339 [details] [review] > Proposed patch (revised) > > Is it ok for you ? (This is my first sign off in BZ...) Yes, the signoff is OK (and, to answer here the PM you sent me = you should really use git-bz, it's a wonderful tool. Really !)
QA comment: * no string changes * passes koha-qa.pl (the script reports forbidden patterns FAIL The patch introduces a forbidden pattern: merge marker (=======) (49) that is wrong, the ==== are included in a warn, and perfectly valid. Will report the problem to QA team * UNIMARC only script & maintainance only script, no side effect risk passed QA
Created attachment 13548 [details] [review] Bug 8844: UNIMARC_sync_date_created_with_marc_biblio.pl creates a modification log Signed-off by : Mathieu Saby <mathieu.saby@univ-rennes2.fr> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This patch has been pushed to master. I did not test it personally because I did not have an explanation of what the script does. Since it is a UNIMARC-only script that has been tested by several UNIMARC users, I decided to push it anyway so that it was available for inclusion in 3.10, per Paul's request.
(In reply to comment #8) > * passes koha-qa.pl (the script reports forbidden patterns FAIL > The patch introduces a forbidden pattern: merge marker (=======) (49) I will remember this point for future patches. I agree that merge markers should be avoided, even in a warn.
(In reply to comment #10) > This patch has been pushed to master. I did not test it personally because I > did not have an explanation of what the script does. Since it is a > UNIMARC-only script that has been tested by several UNIMARC users, I decided > to push it anyway so that it was available for inclusion in 3.10, per Paul's > request. Thanks Jared. The purpose of this script in a few words : When creating/saving a biblio, fields datecreated and timestamp will be completed by database engine with current date/timestamp. In UNIMARC, we want MARC datas 090$c and 090$d to be synchronized with biblio.datecreated and biblio.timestamp. But this synchronization does only exist form MARC to database. This script synchronizes database to MARC for biblio.datecreated and biblio.timestamp. It is usually configured in a daily cron.
Patch pushed to branch 3.10.x