Bug 16786 - Cannot add multiple emails addresses in an email field
Summary: Cannot add multiple emails addresses in an email field
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal with 20 votes (vote)
Assignee: Jérémy Breuillard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-21 12:00 UTC by Kyle M Hall
Modified: 2023-03-27 14:47 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16786: Cannot add multiple emails adresses in an email field (2.48 KB, patch)
2022-07-07 12:21 UTC, Jérémy Breuillard
Details | Diff | Splinter Review
Bug 16786: Cannot add multiple emails adresses in an email field (1.75 KB, patch)
2022-07-07 12:44 UTC, Jérémy Breuillard
Details | Diff | Splinter Review
Bug 16786: Cannot add multiple emails adresses in an email field (2.54 KB, patch)
2022-07-07 12:48 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16786: Cannot add multiple emails adresses in an email field (1.81 KB, patch)
2022-07-07 12:50 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2016-06-21 12:00:29 UTC
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.
Comment 1 BASE Library Consortium 2019-07-22 13:04:33 UTC
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.
Comment 2 Jérémy Breuillard 2022-07-07 12:21:23 UTC Comment hidden (obsolete)
Comment 3 Jérémy Breuillard 2022-07-07 12:44:06 UTC
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
Comment 4 Kyle M Hall 2022-07-07 12:48:08 UTC
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>
Comment 5 Kyle M Hall 2022-07-07 12:48:53 UTC
I'm pretty sure the change to validator-strings.inc isn't necessary.
Comment 6 Kyle M Hall 2022-07-07 12:49:54 UTC
(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!
Comment 7 Kyle M Hall 2022-07-07 12:50:37 UTC
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>
Comment 8 Jérémy Breuillard 2022-07-07 12:56:33 UTC
(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 !
Comment 9 David Cook 2022-07-11 01:06:30 UTC
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)...
Comment 10 Jonathan Druart 2022-08-01 08:08:50 UTC
See also bug 12802.
Comment 11 Fridolin Somers 2022-08-13 08:35:05 UTC
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.
Comment 12 Caroline Cyr La Rose 2022-08-16 21:33:05 UTC
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.
Comment 13 Jérémy Breuillard 2022-08-18 10:24:06 UTC
I see the problem. The other way is to do 1 email = 1 field and so on ?
Comment 14 Jonathan Druart 2022-08-18 10:43:17 UTC
(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?