Summary: | Import patrons script has a confirm switch that doesn't do anything | ||
---|---|---|---|
Product: | Koha | Reporter: | Kyle M Hall (khall) <kyle> |
Component: | Architecture, internals, and plumbing | Assignee: | Kyle M Hall (khall) <kyle> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | critical | ||
Priority: | P5 - low | CC: | andrew, caroline.cyr-la-rose, david, fridolin.somers, jonathan.druart, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This fixes the misc/import_patrons.pl script so that patrons are not imported unless the --confirm option is used. Currently, if the script is run without "--confirm" option it reports that it is "Running in dry-run mode, provide --confirm to apply the changes", however it imports the patrons anyway.
|
|
Version(s) released in: |
21.05.00,20.11.03,20.05.09,19.11.15
|
Circulation function: | |
Bug Depends on: | 12598 | ||
Bug Blocks: | |||
Attachments: |
Bug 27586: Import patrons script has a confirm switch that doesn't nothing!
Bug 27586: Import patrons script has a confirm switch that doesn't nothing! Bug 27586: Rollback should be before return statement Bug 27586: Import patrons script has a confirm switch that doesn't nothing! Bug 27586: Rollback should be before return statement |
Description
Kyle M Hall (khall)
2021-02-01 18:15:09 UTC
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 |