If the script misc/import_patrons.pl is run without "--confirm" it reports that is "running in dry-run mode" but it is not!
Created attachment 116179 [details] [review] Bug 27586: Import patrons script has a confirm switch that doesn't nothing! If the script misc/import_patrons.pl is run without "--confirm" it reports that it is "running in dry-run mode" but it is not! Test Plan: 1) Import a CSV of patrons using import_patrons.pm *without* the --confirm parameter 2) Note that it does actually import the patrons 3) Apply this patch 4) Note that this time the patrons are not actually imported 5) Import again with --confirm 6) Note that the patrons were actually imported this time!
Created attachment 116338 [details] [review] Bug 27586: Import patrons script has a confirm switch that doesn't nothing! If the script misc/import_patrons.pl is run without "--confirm" it reports that it is "running in dry-run mode" but it is not! Test Plan: 1) Import a CSV of patrons using import_patrons.pm *without* the --confirm parameter 2) Note that it does actually import the patrons 3) Apply this patch 4) Note that this time the patrons are not actually imported 5) Import again with --confirm 6) Note that the patrons were actually imported this time! Signed-off-by: David Nind <david@davidnind.com>
Testing notes (koha-testing-docker): - created a CSV file with sample data using the Starter CSV file from Tools > Patrons and circulation > Import patrons - commands to run the import: . misc/import_patrons.pl --file /kohadevbox/koha/patron-sample-import.csv --matchpoint cardnumber -v . misc/import_patrons.pl --file /kohadevbox/koha/patron-sample-import.csv --matchpoint cardnumber -v --confirm
Created attachment 116390 [details] [review] Bug 27586: Rollback should be before return statement
Created attachment 116452 [details] [review] Bug 27586: Import patrons script has a confirm switch that doesn't nothing! If the script misc/import_patrons.pl is run without "--confirm" it reports that it is "running in dry-run mode" but it is not! Test Plan: 1) Import a CSV of patrons using import_patrons.pm *without* the --confirm parameter 2) Note that it does actually import the patrons 3) Apply this patch 4) Note that this time the patrons are not actually imported 5) Import again with --confirm 6) Note that the patrons were actually imported this time! Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 116453 [details] [review] Bug 27586: Rollback should be before return statement Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.03
Backported: Pushed to 19.11.x branch for 19.11.15