Bug 13655 - Can't save organisation type patron without entering userid/password
Summary: Can't save organisation type patron without entering userid/password
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Jonathan Druart
QA Contact: Josef Moravec
URL:
Keywords:
Depends on: 19936
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-02 16:45 UTC by Katrin Fischer
Modified: 2019-10-14 19:56 UTC (History)
10 users (show)

See Also:
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 13655: Allow creation of organisations without entering userid (1.38 KB, patch)
2018-04-12 16:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13655: Allow creation of organisations without entering userid (1.42 KB, patch)
2018-04-15 09:41 UTC, Katrin Fischer
Details | Diff | Splinter Review
Screencast (747.24 KB, image/gif)
2018-06-20 19:40 UTC, Josef Moravec
Details
Bug 13655: Same fix for partial edit (1.37 KB, patch)
2018-06-21 15:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13655: Allow creation of organisations without entering userid (1.48 KB, patch)
2018-06-22 06:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 13655: Same fix for partial edit (1.42 KB, patch)
2018-06-22 06:18 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 13655: Allow creation of organisations without entering userid (1.54 KB, patch)
2018-06-22 07:05 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 13655: Same fix for partial edit (1.48 KB, patch)
2018-06-22 07:05 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2015-02-02 16:45:00 UTC
Ran into another problem here - if you leave the password/userid empty on creating a new organisation type patron, you get an error message. Koha should be able to create a userid for organisation patrons (no firstname) too or leave it empty (ILL libraries etc. don't need a login).
Comment 1 Katrin Fischer 2018-02-25 22:21:10 UTC
Koha should automatically generate a valid username on saving the patron. For organisations this currently fails and you are forced to manually enter a username.

To test:
- Add a new patron of a patron category marked as 'organisation'.
- Enter a name and cardnumber for the patron and try to save.
- You will see an error message:


The following fields are wrong. Please fix them.

    Username/password already exists.

- Verify you can only save the patron after manually entering a userid.
Comment 2 Josef Moravec 2018-02-26 07:12:26 UTC
I realize, it really confuses librarians, raising importance.
Comment 3 Katrin Fischer 2018-04-12 12:25:31 UTC
Still present when testing with bug 19936. Solution should build on the new code.
Comment 4 Jonathan Druart 2018-04-12 16:43:28 UTC
Created attachment 74114 [details] [review]
Bug 13655: Allow creation of organisations without entering userid

See comment 1 of the bug report for defails of the issue.

Test plan:
Good luck (you will need to test all combinations (category type eq and
ne 'I'), then quick edition and partial edit)
Comment 5 Jonathan Druart 2018-04-12 16:44:08 UTC
Let's try this?
Comment 6 Katrin Fischer 2018-04-15 09:41:04 UTC
Created attachment 74192 [details] [review]
Bug 13655: Allow creation of organisations without entering userid

See comment 1 of the bug report for defails of the issue.

Test plan:
Good luck (you will need to test all combinations (category type eq and
ne 'I'), then quick edition and partial edit)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2018-04-15 09:42:09 UTC
Appears to works well, marking signed off.
Comment 8 Josef Moravec 2018-04-16 14:06:13 UTC
When partially editing an organization patron and clean field username, it is expected the username will be regenerated (as when do full edit, or full and partial edit of normal patron), but the username is leaved unchanged!
Comment 9 Katrin Fischer 2018-04-16 21:28:14 UTC
I can't reproduce this problem, can you double check?

This is what I tried:

1) patch applied, restart all, etc.
2) find a patron with a organisation type category
3) use edit link below 'library use'
4) empty username
5) save
6) username is generated
Comment 10 Jonathan Druart 2018-06-20 16:52:41 UTC
ping Josef?
Comment 11 Josef Moravec 2018-06-20 19:40:47 UTC
Created attachment 76219 [details]
Screencast

Sorry, for delay. This is what I mean
Comment 12 Jonathan Druart 2018-06-21 15:29:53 UTC
Created attachment 76239 [details] [review]
Bug 13655: Same fix for partial edit

Test plan:
- Create an organisation with surname='xxx'
userid will be autogenerated with 'xxx''
- Edit the surname with 'yyy'
userid will be unchanged, 'xxx'
- Parial edit and blank userid
userid will be autogenerated with 'yyy'
Comment 13 Jonathan Druart 2018-06-21 15:31:03 UTC
Indeed, thanks Josef!
Comment 14 Katrin Fischer 2018-06-22 06:17:58 UTC
Created attachment 76250 [details] [review]
Bug 13655: Allow creation of organisations without entering userid

See comment 1 of the bug report for defails of the issue.

Test plan:
Good luck (you will need to test all combinations (category type eq and
ne 'I'), then quick edition and partial edit)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 15 Katrin Fischer 2018-06-22 06:18:02 UTC
Created attachment 76251 [details] [review]
Bug 13655: Same fix for partial edit

Test plan:
- Create an organisation with surname='xxx'
userid will be autogenerated with 'xxx''
- Edit the surname with 'yyy'
userid will be unchanged, 'xxx'
- Parial edit and blank userid
userid will be autogenerated with 'yyy'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Katrin Fischer 2018-06-22 06:18:26 UTC
Retested! Josef, can you take another look for QA?
Comment 17 Josef Moravec 2018-06-22 07:05:25 UTC
Created attachment 76253 [details] [review]
Bug 13655: Allow creation of organisations without entering userid

See comment 1 of the bug report for defails of the issue.

Test plan:
Good luck (you will need to test all combinations (category type eq and
ne 'I'), then quick edition and partial edit)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 18 Josef Moravec 2018-06-22 07:05:29 UTC
Created attachment 76254 [details] [review]
Bug 13655: Same fix for partial edit

Test plan:
- Create an organisation with surname='xxx'
userid will be autogenerated with 'xxx''
- Edit the surname with 'yyy'
userid will be unchanged, 'xxx'
- Parial edit and blank userid
userid will be autogenerated with 'yyy'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 19 Nick Clemens (kidclamp) 2018-06-22 13:50:17 UTC
Awesome work all!

Pushed to master for 18.11.x
Comment 20 Martin Renvoize (ashimema) 2018-06-25 17:27:11 UTC
Pushed to 18.05.x for 18.05.02
Comment 21 Fridolin Somers 2018-06-28 07:04:53 UTC
Depends on Bug 19936 not in 17.11.x