[Bug 12716] New: Import patrons form should have drop-downs for some values
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 Bug ID: 12716 Summary: Import patrons form should have drop-downs for some values Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Categorycode and branches should be selectable drop downs. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 30557 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30557&action=edit Bug 12716: Allow the import patrons form have drop-downs and datepickers To reproduce: - Go to Tools > Import patrons - Notice branchcode and categorycode don't have dropdown menus with valid options. - Notice dateofbirth, dateenrolled and dateexpiry don't have date-pickers - Notice each input field is labeled with the column name instead of a proper description. To test: - Apply the patch, go to Tools > Import patrons - Notice branchcode and categorycode have dropdown menus with valid options, and by default the empty value is selected. - Notice that if you go into the dateofbirth, dateenrolled and dateexpiry fields, a nice date picker widget appears. - Notice each field is labeled with the field description, and that the column name is conveniently shown at the right of the input field. Important: test switching the ExtendedPatronAttributes syspref, and verify that if enabled, the patron_attributes field appears, and also the checkbox selector controlling the extended patron attributes import behaviour shows too. Bonus points: Verify that on a different language, the descriptions get translated, and the column names show correctly Regards To+ -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 30558 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30558&action=edit Bug 12716: unit tests for GetColumnDefs The introduced function gets tested. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |sandboxes@biblibre.com --- Comment #3 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Patch tested with a sandbox, by Aleisha <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30557|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30558|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 --- Comment #4 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 30728 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30728&action=edit Bug 12716: Allow the import patrons form have drop-downs and datepickers To reproduce: - Go to Tools > Import patrons - Notice branchcode and categorycode don't have dropdown menus with valid options. - Notice dateofbirth, dateenrolled and dateexpiry don't have date-pickers - Notice each input field is labeled with the column name instead of a proper description. To test: - Apply the patch, go to Tools > Import patrons - Notice branchcode and categorycode have dropdown menus with valid options, and by default the empty value is selected. - Notice that if you go into the dateofbirth, dateenrolled and dateexpiry fields, a nice date picker widget appears. - Notice each field is labeled with the field description, and that the column name is conveniently shown at the right of the input field. Important: test switching the ExtendedPatronAttributes syspref, and verify that if enabled, the patron_attributes field appears, and also the checkbox selector controlling the extended patron attributes import behaviour shows too. Bonus points: Verify that on a different language, the descriptions get translated, and the column names show correctly Regards To+ Signed-off-by: Aleisha <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 --- Comment #5 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 30729 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30729&action=edit Bug 12716: unit tests for GetColumnDefs The introduced function gets tested. Signed-off-by: Aleisha <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Comment on attachment 30728 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30728 Bug 12716: Allow the import patrons form have drop-downs and datepickers Review of attachment 30728: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=12716&attachment=30728) ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt @@ +3,5 @@
<title>Koha › Tools › Import patrons [% IF ( uploadborrowers ) %]› Results[% END %]</title> [% INCLUDE 'doc-head-close.inc' %] <style type="text/css"> + .yui-u fieldset.rows .widelabel { width: 12em; } + label.description { width: 20em; }
I'd like this a bit better in the staff CSS file, so people could overwrite it with OpacUserCSS - different language might need more or less space there. But not a blocker. @@ +133,5 @@
+ <option value="" selected="selected"></option> + [% FOREACH branch IN branches %] + <option value="[% branch.branchcode %]"> + [% branch.branchname %]</option> + [% END %]
I think you could have used the TT plugin for branches here :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30728|0 |1 is obsolete| | Attachment #30729|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 30816 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30816&action=edit [PASSED QA] Bug 12716: Allow the import patrons form have drop-downs and datepickers To reproduce: - Go to Tools > Import patrons - Notice branchcode and categorycode don't have dropdown menus with valid options. - Notice dateofbirth, dateenrolled and dateexpiry don't have date-pickers - Notice each input field is labeled with the column name instead of a proper description. To test: - Apply the patch, go to Tools > Import patrons - Notice branchcode and categorycode have dropdown menus with valid options, and by default the empty value is selected. - Notice that if you go into the dateofbirth, dateenrolled and dateexpiry fields, a nice date picker widget appears. - Notice each field is labeled with the field description, and that the column name is conveniently shown at the right of the input field. Important: test switching the ExtendedPatronAttributes syspref, and verify that if enabled, the patron_attributes field appears, and also the checkbox selector controlling the extended patron attributes import behaviour shows too. Bonus points: Verify that on a different language, the descriptions get translated, and the column names show correctly Regards To+ Signed-off-by: Aleisha <aleishaamohia@hotmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes tests and QA script. Works as described, no regressions found. Dates are output in ISO/database format, this is ok. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 30817 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30817&action=edit [PASSED QA] Bug 12716: unit tests for GetColumnDefs The introduced function gets tested. Signed-off-by: Aleisha <aleishaamohia@hotmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 Jacek Ablewicz <abl@biblos.pk.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |abl@biblos.pk.edu.pl --- Comment #10 from Jacek Ablewicz <abl@biblos.pk.edu.pl> --- It may be something specific to my test setup, but I've just tried to test-import ~30k patron records with lots and lots of extended attributes - there are no errors reported, but none of those attributes are getting added to the database. I guess that removal of this code part: -if ($extended) { - push @columnkeys, 'patron_attributes'; -} around line 65 in tools/import_borrowers.pl possibly does have some unforseen side effects, resulting in all extended attributes being ignored during import? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Jaceck, I don't think it is related to that specifically, but please fill a bug so we dig a bit. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Jacek, could you add an example line with the syntax you used in the import file too? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 --- Comment #13 from Jacek Ablewicz <abl@biblos.pk.edu.pl> --- (In reply to Katrin Fischer from comment #12)
Jacek, could you add an example line with the syntax you used in the import file too?
While I encountered this when trying to import patrons with somewhat more complex entries in 'patron_attibutes' CSV field, eg.: """DPCODE:PK-B"",""HISCHANNR:B/000123; E/000123; ^/000123"",""KNTPAP:BPK"",""KNTPAP:BWM"",""PESEL:1234567890"",""SHOW_BCODE:1""" extended atributes import seems to be broken as well for more trivial cases - I did some tests in clean master with simpler 'patron_attributes'; same outcome. Also, on the practical side, re-adding aforementioned 'if' solved the problem, at least for me ;). This script (tools/import_patrons.pl) is not exactly the easiest one to analyze comprehensivelly, but it seems that 'patron_attributes' was artifically added to @columnkeys as pseudo-colum name (= a kludge, as there is no such column in borrowers table); when that pseudo column is no longer in @columnkeys, apparently extended attributes are not being picked up at all from the relevant CSV field (?). Follow up & proposed patch: in Bug 12859. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 Jacek Ablewicz <abl@biblos.pk.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=12859 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jacek Ablewicz from comment #13)
This script (tools/import_patrons.pl) is not exactly the easiest one to analyze comprehensivelly, but it seems that 'patron_attributes' was artifically added to @columnkeys as pseudo-colum name (= a kludge, as there is no such column in borrowers table); when that pseudo column is no longer in @columnkeys, apparently extended attributes are not being picked up at all from the relevant CSV field (?).
Follow up & proposed patch: in Bug 12859.
Well done Jaceck! Thanks a lot! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12918 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12929 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12716 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12859 See Also|http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=12859 | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org