[Bug 38549] New: Make create_superlibrarian.pl script accept a name parameter
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38549 Bug ID: 38549 Summary: Make create_superlibrarian.pl script accept a name parameter Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: aleisha@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz As reported in Bug 37368, patron searches break if there are patrons with no firstname AND no surname. We often use the create_superlibrarian.pl script to create Koha admin users. Sometimes we forget to edit the patron record and add a firstname/surname. That's now causing these errors as seen in Bug 37368. create_superlibrarian.pl should accept firstname and surname parameters and require at least one of either. -- 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=38549 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |37368 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37368 [Bug 37368] Patron searches break when surname and firstname are set to NULL -- 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=38549 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38549 --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- When name not provided we may use uppercase userid My 2c -- 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=38549 Aleisha Amohia <aleisha@catalyst.net.nz> 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=38549 --- Comment #2 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 186350 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186350&action=edit Bug 38549: Provide surname for create_superlibrarian.pl Interestingly this script already had a $surname variable, just never accepted a parameter for it. This enhancement enables the user to supply a surname parameter when creating a superlibrarian user via the commandline create_superlibrarian.pl script. Koha patrons MUST have a name, so if no surname is provided, the userid will be used for the surname instead. To test: 1. Apply the patch and restart services 2. Attempt to create a superlibrarian with no surname provided. In KTD: misc/devel/create_superlibrarian.pl --userid test --cardnumber test --password XXXX --branchcode CPL --categorycode S 3. Search for your patron in Koha. Confirm the surname was automatically set to the userid 'test' 4. Attempt to create a superlibrarian, this time provide a surname that is different from the userid so easy to tell apart. In KTD: misc/devel/create_superlibrarian.pl --userid test1 --cardnumber test1 --password XXXX --branchcode CPL --categorycode S --surname testsurname 5. Search for your patron in Koha. Confirm the surname was set correctly using the given surname. Sponsored-by: Catalyst IT -- 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=38549 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement enables release notes| |the user to supply a | |surname parameter when | |creating a superlibrarian | |user via the commandline | |create_superlibrarian.pl | |script. Koha patrons MUST | |have a name, so if no | |surname is provided, the | |userid will be used for the | |surname instead. Patch complexity|--- |Small patch Assignee|koha-bugs@lists.koha-commun |aleisha@catalyst.net.nz |ity.org | Change sponsored?|--- |Sponsored -- 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=38549 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This enhancement enables |This enhancement enables release notes|the user to supply a |the user to supply a |surname parameter when |surname parameter when |creating a superlibrarian |creating a superlibrarian |user via the commandline |user via the commandline |create_superlibrarian.pl |script |script. Koha patrons MUST |create_superlibrarian.pl. |have a name, so if no |Koha patrons MUST have a |surname is provided, the |name, so if no surname is |userid will be used for the |provided, the userid will |surname instead. |be used for the surname | |instead. --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- 1) QA checks - pass! 2) Code review - nothing spotted 3) Testing - all works as expected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38549 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38549 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186350|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 192077 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192077&action=edit Bug 38549: Provide surname for create_superlibrarian.pl Interestingly this script already had a $surname variable, just never accepted a parameter for it. This enhancement enables the user to supply a surname parameter when creating a superlibrarian user via the commandline create_superlibrarian.pl script. Koha patrons MUST have a name, so if no surname is provided, the userid will be used for the surname instead. To test: 1. Apply the patch and restart services 2. Attempt to create a superlibrarian with no surname provided. In KTD: misc/devel/create_superlibrarian.pl --userid test --cardnumber test --password XXXX --branchcode CPL --categorycode S 3. Search for your patron in Koha. Confirm the surname was automatically set to the userid 'test' 4. Attempt to create a superlibrarian, this time provide a surname that is different from the userid so easy to tell apart. In KTD: misc/devel/create_superlibrarian.pl --userid test1 --cardnumber test1 --password XXXX --branchcode CPL --categorycode S --surname testsurname 5. Search for your patron in Koha. Confirm the surname was set correctly using the given surname. Sponsored-by: Catalyst IT Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38549 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=38549 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192077|0 |1 is obsolete| | --- Comment #5 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 193113 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193113&action=edit Bug 38549: Provide surname for create_superlibrarian.pl Interestingly this script already had a $surname variable, just never accepted a parameter for it. This enhancement enables the user to supply a surname parameter when creating a superlibrarian user via the commandline create_superlibrarian.pl script. Koha patrons MUST have a name, so if no surname is provided, the userid will be used for the surname instead. To test: 1. Apply the patch and restart services 2. Attempt to create a superlibrarian with no surname provided. In KTD: misc/devel/create_superlibrarian.pl --userid test --cardnumber test --password XXXX --branchcode CPL --categorycode S 3. Search for your patron in Koha. Confirm the surname was automatically set to the userid 'test' 4. Attempt to create a superlibrarian, this time provide a surname that is different from the userid so easy to tell apart. In KTD: misc/devel/create_superlibrarian.pl --userid test1 --cardnumber test1 --password XXXX --branchcode CPL --categorycode S --surname testsurname 5. Search for your patron in Koha. Confirm the surname was set correctly using the given surname. Sponsored-by: Catalyst IT Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38549 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |lucas@bywatersolutions.com |y.org | CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38549 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38549 --- Comment #6 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38549 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|26.05.00 |26.05.00,25.11.04 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38549 --- Comment #7 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38549 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Laura.escamilla@bywatersolu | |tions.com Status|Pushed to stable |Needs documenting --- Comment #8 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Not backported to 25.05.x as this is an enhancement but I’m happy to revisit if needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org