[Bug 20580] New: create_superlibrarian.pl should accept parameters

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 20580] New: create_superlibrarian.pl should accept parameters

bugzilla-daemon
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: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
            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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20580] create_superlibrarian.pl should accept parameters

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580

Jonathan Druart <[hidden email]> 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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20580] create_superlibrarian.pl should accept parameters

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580

Jonathan Druart <[hidden email]> 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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20580] create_superlibrarian.pl should accept parameters

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580

--- Comment #1 from Jonathan Druart <[hidden email]> ---
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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20580] create_superlibrarian.pl should accept parameters

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[hidden email]-commun |[hidden email]-c
                   |ity.org                     |ommunity.org

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20580] create_superlibrarian.pl should accept parameters

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580

Jonathan Druart <[hidden email]> 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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20580] create_superlibrarian.pl should accept parameters

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580

M. Tompsett <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA
                 CC|                            |[hidden email]

--- Comment #2 from M. Tompsett <[hidden email]> ---
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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20580] create_superlibrarian.pl should accept parameters

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580

--- Comment #3 from Jonathan Druart <[hidden email]> ---
(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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20580] create_superlibrarian.pl should accept parameters

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Failed QA                   |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20580] create_superlibrarian.pl should accept parameters

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580

Marcel de Rooy <[hidden email]> 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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20580] create_superlibrarian.pl should accept parameters

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #74244|0                           |1
        is obsolete|                            |

--- Comment #4 from Marcel de Rooy <[hidden email]> ---
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 <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20580] create_superlibrarian.pl should accept parameters

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
         QA Contact|[hidden email]-communit |[hidden email]
                   |y.org                       |
             Status|Signed Off                  |Passed QA

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20580] create_superlibrarian.pl should accept parameters

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580

--- Comment #5 from Marcel de Rooy <[hidden email]> ---
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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 20580] create_superlibrarian.pl should accept parameters

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20580

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Passed QA                   |Pushed to Master

--- Comment #6 from Jonathan Druart <[hidden email]> ---
Pushed to master for 18.05, thanks to everybody involved!

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/