[Bug 35061] New: Add support to preserve patron category code when importing patrons with commandline script
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Bug ID: 35061 Summary: Add support to preserve patron category code when importing patrons with commandline script Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Installation and upgrade (command-line installer) Assignee: koha-bugs@lists.koha-community.org Reporter: aleisha@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |aleisha@catalyst.net.nz |ity.org | Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 --- Comment #1 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 157180 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157180&action=edit Bug 35061: Preserve categorycode when importing patrons This patch should preserve category codes when importing patrons using misc/import_patrons.pl Use case: /usr/share/koha/bin/import_patrons.pl --file patrons.csv --matchpoint userid --default branchcode=C --overwrite --preserve-categorycode --verbose --confirm To test, use a file with a column categorycode. Confirm that new patrons added from the spreadsheet by the file are added to the database with the correct category code. Confirm existing patrons that are overwritten receive the categorycode from the spreadsheet. Sponsored-by: Auckland University of Technology -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Installation and upgrade |Command-line Utilities |(command-line installer) | CC| |robin@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- The GUI already allows to write-protect any field of the patron record. I think this would be much more consistent and useful, if we had a parameter instead that allowed to pass a list of borrowers fields. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |phil@chetcolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #157180|0 |1 is obsolete| | --- Comment #3 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 171437 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171437&action=edit Bug 35061: Preserve categorycode when importing patrons This patch should preserve category codes when importing patrons using misc/import_patrons.pl Use case: /usr/share/koha/bin/import_patrons.pl --file patrons.csv --matchpoint userid --default branchcode=C --overwrite --preserve-categorycode --verbose --confirm To test, use a file with a column categorycode. Confirm that new patrons added from the spreadsheet by the file are added to the database with the correct category code. Confirm existing patrons that are overwritten receive the categorycode from the spreadsheet. Sponsored-by: Auckland University of Technology -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #2)
The GUI already allows to write-protect any field of the patron record. I think this would be much more consistent and useful, if we had a parameter instead that allowed to pass a list of borrowers fields.
I still think this to be true as we'd want to match the script as closely to what the GUI can as possible. Also we already have the "default" option that takes a list of fields. It would be more consistent. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- Automatic patch test results: â ï¸ The patch applies with fuzzy option (ignoring whitespace). This may indicate minor conflicts that need to be resolved. Details: Patch applies with fuzzy option (ignoring whitespace) This is an automated message from the patch testing system. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #2)
The GUI already allows to write-protect any field of the patron record. I think this would be much more consistent and useful, if we had a parameter instead that allowed to pass a list of borrowers fields.
I had originally posted this comment and now looking at the patch again I spotted this: 'pf|preserve-field=s' => \@preserve_fields, Is it possible the feature is already present and this patch no longer needed? =item B<-k|--preserve-field> Prevent specified patron fields for existing patrons from being overwritten But: it doesn't show up when -h is used. Maybe this just requires a documentation fix after all. @Aleisha, could you have a look too, please? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 201503 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201503&action=edit Bug 35061: Fix documentation for -pf|preserve-field in import_patrons.pl There was a mismatch between the documentation and the shortcut used in the code. This patch fixes the documentation so it matches the code: 'pf|preserve-field=s' => \@preserve_fields, =item B<-k|--preserve-field> Prevent specified patron fields for existing patrons from being overwritten So pf is the right shortcut. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |RESOLVED Resolution|--- |FIXED --- Comment #8 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Yes, it looks like preserve-fields will achieve this and work for categorycode. The only thing worth noting from a usage point of view is that the script still depends on the spreadsheet to have a valid categorycode, even if we are preserving categorycode (using the existing patron's categorycode). If there is no categorycode value in the spreadsheet or it is invalid, this will be considered a missing critical value and the row will be skipped. Very happy to accept the preserve-fields option as a solution for this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- Summary|Add support to preserve |Fix documentation for |patron category code when |--preserve-field in |importing patrons with |import_patrons.pl |commandline script | Status|RESOLVED |REOPENED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|aleisha@catalyst.net.nz |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171437|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |String patch --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Small fix that hopefully makes the feature easier to discover! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off QA Contact|testopia@bugs.koha-communit |aleisha@catalyst.net.nz |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201503|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 --- Comment #10 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 201621 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201621&action=edit Bug 35061: Fix documentation for -pf|preserve-field in import_patrons.pl There was a mismatch between the documentation and the shortcut used in the code. This patch fixes the documentation so it matches the code: 'pf|preserve-field=s' => \@preserve_fields, =item B<-k|--preserve-field> Prevent specified patron fields for existing patrons from being overwritten So pf is the right shortcut. Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Sponsorship status|Sponsored |--- --- Comment #11 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Tiny string fix, going straight to passed QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35061 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Aleisha Amohia from comment #11)
Tiny string fix, going straight to passed QA.
Thanks Aleisha :) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org