[Bug 24153] New: Add a confirm flag to the cleanup_database.pl cronjob
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Bug ID: 24153 Summary: Add a confirm flag to the cleanup_database.pl cronjob Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz That will allow to make it run in dry-run mode with a useful verbose output -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |24114, 24152 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24114 [Bug 24114] Remove warn statements from Koha::Patrons https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24152 [Bug 24152] Add the ability to purge pseudonymized data -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 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=24153 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 95980 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95980&action=edit Bug 24153: Add a confirm flag to cleanup_database How handy this will be, right? This patch will change the behavior of this script as the --confirm flag will now be required for effective changes. Without --confirm and with --verbose you will see what could have done the script in non dry-run mode. Test plan: Use different options of the script without the --confirm flag and have a look at the output. It now tells you what would have been deleted if the flag was passed. Now use the --confirm flag and confirm that the changes are now effective. Sponsored-by: Association KohaLa - https://koha-fr.org/ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Axelle Aix-Marseille Université <axelle.clarisse@univ-amu.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |axelle.clarisse@univ-amu.fr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95980|0 |1 is obsolete| | --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 97256 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97256&action=edit Bug 24153: Add a confirm flag to cleanup_database How handy this will be, right? This patch will change the behavior of this script as the --confirm flag will now be required for effective changes. Without --confirm and with --verbose you will see what could have done the script in non dry-run mode. Test plan: Use different options of the script without the --confirm flag and have a look at the output. It now tells you what would have been deleted if the flag was passed. Now use the --confirm flag and confirm that the changes are now effective. Sponsored-by: Association KohaLa - https://koha-fr.org/ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Koha Team University Lyon 3 <koha@univ-lyon3.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |koha@univ-lyon3.fr --- Comment #3 from Koha Team University Lyon 3 <koha@univ-lyon3.fr> --- I've tested for Association KohaLa. If you launch cleanup_database. pl without the --confirm flag, nothing is done, but with the confirm flag, it works. Sonia BOUIS -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #97256|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 101300 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101300&action=edit Bug 24153: Add a confirm flag to cleanup_database How handy this will be, right? This patch will change the behavior of this script as the --confirm flag will now be required for effective changes. Without --confirm and with --verbose you will see what could have done the script in non dry-run mode. Test plan: Use different options of the script without the --confirm flag and have a look at the output. It now tells you what would have been deleted if the flag was passed. Now use the --confirm flag and confirm that the changes are now effective. Sponsored-by: Association KohaLa - https://koha-fr.org/ Signed-off-by: Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr> -- You are receiving this mail because: You are watching all bug changes.
From what I understand this a breaking change. For instance, for users that run
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #5 from Julian Maurice <julian.maurice@biblibre.com> --- this script in a cronjob, it will suddenly stop working. If the need is to have a dry-run mode, why not add a --dry-run option instead ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Yes it will need to be advertised correctly in the release note. I think it makes sense to force the --confirm flag to effectively make the changes, it's what we do in most of the other scripts. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Jonathan Druart from comment #6)
Yes it will need to be advertised correctly in the release note. Can it be written now in "Text to go in the release notes" ? :-D
I think it makes sense to force the --confirm flag to effectively make the changes, it's what we do in most of the other scripts. I agree that it makes sense. This script removes data so we should prevent unwanted data loss. I just don't like breaking changes :-)
I kind of like the `git clean` approach which requires a flag (-n, -f or -i), which forces users to read the documentation first. Maybe we can have similar behavior for scripts that remove data (just a thought for future scripts, not blocking) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- Changing status to BLOCKED because of dependency on bug 24152, which is BLOCKED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Signed Off --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Julian Maurice from comment #8)
Changing status to BLOCKED because of dependency on bug 24152, which is BLOCKED
Rebased -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED 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=24153 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Failed QA --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- +# FIXME The output for dry-run mode needs to be improved Yes. Agreed. + $tokens->delete if $confirm; + say sprintf "Removed %s expired OAuth2 tokens", $count if $verbose; This might be confusing. Among other examples. * perl misc/cronjobs/cleanup_database.pl -m 10 -v Mail queue purge triggered for 10 days. Use of uninitialized value $count in concatenation (.) or string at misc/cronjobs/cleanup_database.pl line 293. messages were deleted from the mail queue. So uninitialized warning that we do not want. But this example could serve to illustrate that even the wrong count could have been printed. Look at: if ( $confirm ) { $sth->execute($mail) or die $dbh->errstr; $count = $sth->rows; } print "$count messages were deleted from the mail queue.\nDone with message_queue purge.\n" if $verbose; => Since the count is not set, it could well be the count of a former statement ! I do not think that this is ready for production. Since we do not really support testing for many options, I do not see why this patch is useful. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #10)
+# FIXME The output for dry-run mode needs to be improved Yes. Agreed.
The following line is: # But non trivial changes to C4::Members need to be done before. So cannot be done now.
+ $tokens->delete if $confirm; + say sprintf "Removed %s expired OAuth2 tokens", $count if $verbose; This might be confusing. Among other examples.
What do you mean, can you detail? Do you mean the message could be improved (use of conditional) in dry-run mode?
* perl misc/cronjobs/cleanup_database.pl -m 10 -v Mail queue purge triggered for 10 days. Use of uninitialized value $count in concatenation (.) or string at misc/cronjobs/cleanup_database.pl line 293. messages were deleted from the mail queue.
So uninitialized warning that we do not want. But this example could serve to illustrate that even the wrong count could have been printed. Look at: if ( $confirm ) { $sth->execute($mail) or die $dbh->errstr; $count = $sth->rows; } print "$count messages were deleted from the mail queue.\nDone with message_queue purge.\n" if $verbose; => Since the count is not set, it could well be the count of a former statement !
I fixed the warning.
I do not think that this is ready for production. Since we do not really support testing for many options, I do not see why this patch is useful.
I wrote it for the pseudonymized transactions. The idea was to rework a bit the whole script and introduce a common pattern. That's why I implemented filter_by_last_update and use it all over the script. We now have a base and a pattern to follow. It's not useful yet for all the options, but at least it is for few of them. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 106197 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106197&action=edit Bug 24153: Remove warning for message queue -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #11)
(In reply to Marcel de Rooy from comment #10)
+ $tokens->delete if $confirm; + say sprintf "Removed %s expired OAuth2 tokens", $count if $verbose; This might be confusing. Among other examples.
What do you mean, can you detail? Do you mean the message could be improved (use of conditional) in dry-run mode? Yeah, this holds in general. It might be confusing to say deleted when you are in dry run mode.
* perl misc/cronjobs/cleanup_database.pl -m 10 -v Mail queue purge triggered for 10 days. Use of uninitialized value $count in concatenation (.) or string at misc/cronjobs/cleanup_database.pl line 293. messages were deleted from the mail queue.
So uninitialized warning that we do not want. But this example could serve to illustrate that even the wrong count could have been printed. Look at: if ( $confirm ) { $sth->execute($mail) or die $dbh->errstr; $count = $sth->rows; } print "$count messages were deleted from the mail queue.\nDone with message_queue purge.\n" if $verbose; => Since the count is not set, it could well be the count of a former statement !
I fixed the warning.
Cool. But are you confident that it is the only location where it could happen? Block X filled $count. And block Y presents it as a result while it actually comes from X. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Another observation: We need to adjust the cron tab files and examples to add this flag. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 106252 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106252&action=edit Bug 24153: Improve verbose messages in dry-run mode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 106253 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106253&action=edit Bug 24153: Make sure $count will not be reused for another purpose The $count variable should be defined per block and set to 0 to avoid confusion. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 106254 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106254&action=edit Bug 24153: Add the confirm flag to the crontab calls -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Marcel, I think the last patches answer your different concerns. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #19 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Applying: Bug 24153: Add a confirm flag to cleanup_database Applying: Bug 24153: Remove warning for message queue Applying: Bug 24153: Improve verbose messages in dry-run mode error: sha1 information is lacking or useless (misc/cronjobs/cleanup_database.pl). error: could not build fake ancestor Patch failed at 0001 Bug 24153: Improve verbose messages in dry-run mode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #101300|0 |1 is obsolete| | Attachment #106197|0 |1 is obsolete| | Attachment #106252|0 |1 is obsolete| | Attachment #106253|0 |1 is obsolete| | Attachment #106254|0 |1 is obsolete| | --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 106327 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106327&action=edit Bug 24153: Add a confirm flag to cleanup_database How handy this will be, right? This patch will change the behavior of this script as the --confirm flag will now be required for effective changes. Without --confirm and with --verbose you will see what could have done the script in non dry-run mode. Test plan: Use different options of the script without the --confirm flag and have a look at the output. It now tells you what would have been deleted if the flag was passed. Now use the --confirm flag and confirm that the changes are now effective. Sponsored-by: Association KohaLa - https://koha-fr.org/ Signed-off-by: Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #21 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 106328 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106328&action=edit Bug 24153: Remove warning for message queue -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #22 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 106329 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106329&action=edit Bug 24153: Improve verbose messages in dry-run mode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #23 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 106330 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106330&action=edit Bug 24153: Make sure $count will not be reused for another purpose The $count variable should be defined per block and set to 0 to avoid confusion. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #24 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 106331 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106331&action=edit Bug 24153: Add the confirm flag to the crontab calls -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106327|0 |1 is obsolete| | Attachment #106328|0 |1 is obsolete| | Attachment #106329|0 |1 is obsolete| | Attachment #106330|0 |1 is obsolete| | Attachment #106331|0 |1 is obsolete| | --- Comment #25 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 106332 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106332&action=edit Bug 24153: Add a confirm flag to cleanup_database How handy this will be, right? This patch will change the behavior of this script as the --confirm flag will now be required for effective changes. Without --confirm and with --verbose you will see what could have done the script in non dry-run mode. Test plan: Use different options of the script without the --confirm flag and have a look at the output. It now tells you what would have been deleted if the flag was passed. Now use the --confirm flag and confirm that the changes are now effective. Sponsored-by: Association KohaLa - https://koha-fr.org/ Signed-off-by: Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #26 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 106333 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106333&action=edit Bug 24153: Remove warning for message queue -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #27 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 106334 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106334&action=edit Bug 24153: Improve verbose messages in dry-run mode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #28 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 106335 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106335&action=edit Bug 24153: Make sure $count will not be reused for another purpose The $count variable should be defined per block and set to 0 to avoid confusion. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #29 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 106336 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106336&action=edit Bug 24153: Add the confirm flag to the crontab calls -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #30 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Looks like I followed-up on top of a local branch which did not have the last patches from bug 24152. Sorry about that, the patches apply cleanly now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 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=24153 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=24153 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED --- Comment #31 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #30)
Looks like I followed-up on top of a local branch which did not have the last patches from bug 24152. Sorry about that, the patches apply cleanly now.
Yes, they apply. Having another look.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106332|0 |1 is obsolete| | --- Comment #32 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 106465 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106465&action=edit Bug 24153: Add a confirm flag to cleanup_database How handy this will be, right? This patch will change the behavior of this script as the --confirm flag will now be required for effective changes. Without --confirm and with --verbose you will see what could have done the script in non dry-run mode. Test plan: Use different options of the script without the --confirm flag and have a look at the output. It now tells you what would have been deleted if the flag was passed. Now use the --confirm flag and confirm that the changes are now effective. Sponsored-by: Association KohaLa - https://koha-fr.org/ Signed-off-by: Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr> 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=24153 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106333|0 |1 is obsolete| | --- Comment #33 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 106466 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106466&action=edit Bug 24153: Remove warning for message queue 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=24153 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106334|0 |1 is obsolete| | --- Comment #34 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 106467 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106467&action=edit Bug 24153: Improve verbose messages in dry-run mode 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=24153 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106335|0 |1 is obsolete| | --- Comment #35 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 106468 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106468&action=edit Bug 24153: Make sure $count will not be reused for another purpose The $count variable should be defined per block and set to 0 to avoid confusion. 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=24153 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106336|0 |1 is obsolete| | --- Comment #36 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 106469 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106469&action=edit Bug 24153: Add the confirm flag to the crontab calls 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=24153 --- Comment #37 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 106470 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106470&action=edit Bug 24153: (QA follow-up) Removing one redundant initialization line 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=24153 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 --- Comment #38 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Minor observation, no blocker: RemoveOldSessions (when you run with sessdays) Not executed in dry mode. So no numbers. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.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=24153 --- Comment #39 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, 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=24153 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #40 from Lucas Gass <lucas@bywatersolutions.com> --- Not backporting enhancement to 20.05.x series. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | Text to go in the| |This enhancement adds a release notes| |--confirm flag to the | |cleanup_database.pl | |cronjob, that allows a | |dry-run mode with a verbose | |output. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29076 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29076 [Bug 29076] cleanup_database.pl dies of passed zebraqueue and not confirm -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24153 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30914 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30914 [Bug 30914] cleanup_database.pl --transfers --old-reserves --confirm does not work. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org