Previous to Koha 3.22, it was possible to enter multiple comma separated email addresses in a patron's email field. This allowed a patron to opt to receive a copy of any given email in more than one address! Now the email validation disallows this, but there is no technical reason to disallow it as far as I am aware. The email validator should be updated to supported multiple comma separated email addresses in any given email field.
Our library teams used to have this functionality on a previous LMS and would like to see this enhancement. Test case on BibLibre Koha sandbox 04 (17.06) when adding more than one valid email address in the email, emailpro or B_email and separating using a comma, space or semicolon, the error message reads: Please enter a valid email address.
Created attachment 137270 [details] [review] Bug 16786: Cannot add multiple emails adresses in an email field The primary email field can allow more than one email adresses if those are separated by comma (,;) Test plan: 1) Home > Patrons 2) Create a new patron / Edit an existing patron 3) Part:'Contact information' > Field:'Primary email' : write at least 2 email adresses separated by comma 4) Try to save it... impossible 5) Apply patch and repeat 1) to 3) then save again 6) Now this field allows more than one email adress as long as there is comma separation
Created attachment 137274 [details] [review] Bug 16786: Cannot add multiple emails adresses in an email field The primary email field can allow more than one email adresses if those are separated by comma (,;) Test plan: 1) Home > Patrons 2) Create a new patron / Edit an existing patron 3) Part:'Contact information' > Field:'Primary email' : write at least 2 email adresses separated by comma 4) Try to save it... impossible 5) Apply patch and repeat 1) to 3) then save again 6) Now this field allows more than one email adress as long as there is comma separation
Created attachment 137275 [details] [review] Bug 16786: Cannot add multiple emails adresses in an email field The primary email field can allow more than one email adresses if those are separated by comma (,;) Test plan: 1) Home > Patrons 2) Create a new patron / Edit an existing patron 3) Part:'Contact information' > Field:'Primary email' : write at least 2 email adresses separated by comma 4) Try to save it... impossible 5) Apply patch and repeat 1) to 3) then save again 6) Now this field allows more than one email adress as long as there is comma separation Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
I'm pretty sure the change to validator-strings.inc isn't necessary.
(In reply to Kyle M Hall from comment #5) > I'm pretty sure the change to validator-strings.inc isn't necessary. You beat me to it! Will re-sign the new patch!
Created attachment 137276 [details] [review] Bug 16786: Cannot add multiple emails adresses in an email field The primary email field can allow more than one email adresses if those are separated by comma (,;) Test plan: 1) Home > Patrons 2) Create a new patron / Edit an existing patron 3) Part:'Contact information' > Field:'Primary email' : write at least 2 email adresses separated by comma 4) Try to save it... impossible 5) Apply patch and repeat 1) to 3) then save again 6) Now this field allows more than one email adress as long as there is comma separation Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(In reply to Kyle M Hall from comment #6) > (In reply to Kyle M Hall from comment #5) > > I'm pretty sure the change to validator-strings.inc isn't necessary. > > You beat me to it! Will re-sign the new patch! =D !
It's an interesting idea, although it could cause SSO problems, if the email field is a match point. Trying to think of other functionality that expects there to be a single value that can be checked using SQL operations without application-specific logic (ie breaking apart of the email addresses)...
See also bug 12802.
Ich Have a look at Koha::Email->is_valid : https://git.koha-community.org/Koha-community/Koha/src/commit/1f098a8c866fecce9fce4edf22f0e27486c59d11/Koha/Email.pm#L246 Looks like is does not allows actually several addresses.
I tried applying the patch and Primary email in a patron file still prevents me from entering two email addresses separated by a comma. I tried both in a sandbox and on my local installation.
I see the problem. The other way is to do 1 email = 1 field and so on ?
(In reply to Jérémy Breuillard from comment #13) > I see the problem. The other way is to do 1 email = 1 field and so on ? Aware of bug 12802?