[Bug 20580] New: create_superlibrarian.pl should accept parameters
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580 Bug ID: 20580 Summary: create_superlibrarian.pl should accept parameters Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Blocks: 20489 create_superlibrarian.pl should not create a koha/koha (42) patron but accept parameters instead. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20489 [Bug 20489] Prevent DB user login -- 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=20580 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_18_05_candidate -- 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=20580 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=20580 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 74244 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74244&action=edit Bug 20580: Make create_superlibrarian.pl accept parameters So far this script does not accept parameters and create a koha/koha superlibrarian This patch makes it accept parameters to create a customized superlibrarian patrons. Test plan: Use the script with valid and invalid paramters and confirm that it works as expected. Note: A cryptic "Invalid parameter passed" error is raised when the categorycode is not valid. Better error handling must be provided but Koha::Exceptions seems to be enhancement (see related bug reports). -- 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=20580 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.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=20580 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=20590 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |mtompset@hotmail.com --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- reset_all kshell ./misc/devel/create_superlibrarian.pl --user admin --password admin --branchcode CPL --categorycode S --cardnumber SEE_THIS_BREAKS A new user is added, but the userid isn't admin. In my test case it was 4. Ran it 2 more times: 5 and 6. This case needs to be reported and/or prevented. If the userid exists, perhaps a nice warning and either die, or spit out the new userid. Otherwise, it works great in "normal" circumstances. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to M. Tompsett from comment #2)
reset_all kshell ./misc/devel/create_superlibrarian.pl --user admin --password admin --branchcode CPL --categorycode S --cardnumber SEE_THIS_BREAKS
A new user is added, but the userid isn't admin. In my test case it was 4. Ran it 2 more times: 5 and 6. This case needs to be reported and/or prevented. If the userid exists, perhaps a nice warning and either die, or spit out the new userid.
Otherwise, it works great in "normal" circumstances.
--userid you mean? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off 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=20580 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #74244|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 74597 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74597&action=edit Bug 20580: Make create_superlibrarian.pl accept parameters So far this script does not accept parameters and create a koha/koha superlibrarian This patch makes it accept parameters to create a customized superlibrarian patrons. Test plan: Use the script with valid and invalid paramters and confirm that it works as expected. Note: A cryptic "Invalid parameter passed" error is raised when the categorycode is not valid. Better error handling must be provided but Koha::Exceptions seems to be enhancement (see related bug reports). 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=20580 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Combined SO+QA I agree that error checking could be improved ;) But what we have now is better than koha/koha/42. Still a bit ugly: DBD::mysql::st execute failed: Duplicate entry '4' for key 'cardnumber' DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails Use of uninitialized value in sprintf at /usr/share/koha/devclone/Koha/Exceptions/Exception.pm line 19. Invalid parameter passed, branchcode= does not exist Also note that it is possible to add superlibrarians that are not staff members. This is also possible via the interface. So no blocker. But maybe we should not allow staff permissions for non-staff categories on a new report?? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 18.05, 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=20580 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_18_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21855 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21855 | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org