Bug 9841

Summary: Improve the link from the "logged in as mysql-user"-warning
Product: Koha Reporter: Magnus Enger <magnus>
Component: AuthenticationAssignee: Magnus Enger <magnus>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: P5 - low CC: brendan, chris, dpavlin
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 9841 - Improve the link from the "logged in as mysql-user"-warning
Bug 9841 - Improve the link from the "logged in as mysql-user"-warning
[PASSED QA] Bug 9841 - Improve the link from the "logged in as mysql-user"-warning

Description Magnus Enger 2013-03-19 09:36:42 UTC
Bug 9008 introduced a nice warning message on the admin homepage for users logged in as the MySQL user. There is a link from the warning to create a patron, which looks like this:

/cgi-bin/koha/members/memberentry.pl?op=add

This takes me to a screen for adding an "Adult patron" (category code S), but when I save a patron it's actually saved with category code J, which is kind of weird... You'd probably want to create a "Librarian" patron, but since there is no way to know the category code that corresponds to "Librarian" in any given installation, I think it would be better if the link simply pointed to:

/cgi-bin/koha/members/memberentry.pl

where the desired category code can be chosen directly. 

There is also a small typo in the warning: "This a bad idea".
Comment 1 Magnus Enger 2013-03-19 09:45:06 UTC
Sorry, typo. I think the link should be this: 

/cgi-bin/koha/members/members-home.pl
Comment 2 Magnus Enger 2013-03-19 09:49:42 UTC Comment hidden (obsolete)
Comment 3 Brendan Gallagher 2013-03-19 10:08:25 UTC Comment hidden (obsolete)
Comment 4 Brendan Gallagher 2013-03-19 10:10:28 UTC
Signed off and test plan was great.  When clicking link - it dumped me to members-home where I could then choose which patron type I wanted.

-Brendan
Comment 5 Katrin Fischer 2013-03-19 11:00:44 UTC
Created attachment 16366 [details] [review]
[PASSED QA] Bug 9841 - Improve the link from the "logged in as mysql-user"-warning

Currently, the link from the "logged in as mysql-user"-warning goes to
add a patron in a seemingly random category code. This patch changes
the link to point to Home > Patrons, where a category for the new
patron can be chosen.

A small typo in the warning message is also corrected.

To test:
- Apply the patch
- Login as the MySQL user
- Check that the warning appears on the intranet home page
- Check that the typo in the first line is fixed: "This *is* a bad idea"
- Check that the link in the warning leads to Home > Patrons

Signed-off-by: Brendan <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All happy with this.
Comment 6 Jared Camins-Esakov 2013-03-20 00:56:22 UTC
This patch has been pushed to master.
Comment 7 Chris Cormack 2013-03-29 06:19:11 UTC
Pushed to 3.10.x will be in 3.10.5
Comment 8 Magnus Enger 2013-04-03 18:42:39 UTC
Works as intended (tested with packages built off current master).