diff --git a/installer/data/mysql/atomicupdate/bug_37757.pl b/installer/data/mysql/atomicupdate/bug_37757.pl
new file mode 100755
index 0000000000..28f75a2fe5
--- /dev/null
+++ b/installer/data/mysql/atomicupdate/bug_37757.pl
@@ -0,0 +1,20 @@
+use Modern::Perl;
+use Koha::Installer::Output qw(say_warning say_failure say_success say_info);
+
+return {
+ bug_number => "37757",
+ description => "More robust handling of EmailFieldPrimary syspref values",
+ up => sub {
+ my ($args) = @_;
+ my ( $dbh, $out ) = @$args{qw(dbh out)};
+
+ $dbh->do(
+ q{
+ UPDATE systempreferences
+ SET value=IF(value='OFF','',value),
+ options='|email|emailpro|B_email|cardnumber|MULTI'
+ WHERE variable='EmailFieldPrimary';
+ }
+ ) == 1 && say_success( $out, "Updated system preference 'EmailFieldPrimary'" );
+ },
+};
diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql
index b64242c791..6eac0c413d 100644
--- a/installer/data/mysql/mandatory/sysprefs.sql
+++ b/installer/data/mysql/mandatory/sysprefs.sql
@@ -233,7 +233,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('EmailAddressForPatronRegistrations', '', '', ' If you choose EmailAddressForPatronRegistrations you have to enter a valid email address: ', 'free'),
('EmailAddressForSuggestions','','',' If you choose EmailAddressForSuggestions you have to enter a valid email address: ','free'),
('EmailFieldPrecedence','email|emailpro|B_email','','Ordered list of patron email fields to use when AutoEmailPrimaryAddress is set to first valid','multiple'),
-('EmailFieldPrimary','OFF','email|emailpro|B_email|cardnumber|OFF|MULTI','Defines the default email address field where patron email notices are sent.','Choice'),
+('EmailFieldPrimary','','|email|emailpro|B_email|cardnumber|MULTI','Defines the default email address field where patron email notices are sent.','Choice'),
('EmailFieldSelection','','email|emailpro|B_email','Selection list of patron email fields to use whern AutoEmailPrimaryAddress is set to selected addresses','multiple'),
('emailLibrarianWhenHoldIsPlaced','0',NULL,'If ON, emails the librarian whenever a hold is placed','YesNo'),
('EmailOverduesNoEmail','1',NULL,'Send send overdues of patrons without email address to staff','YesNo'),
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
index 07564fcdba..21a1b37505 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
@@ -193,13 +193,13 @@ Patrons:
-
- "Use the patron's"
- pref: EmailFieldPrimary
- default: "OFF"
+ default: ""
choices:
email: primary email
emailpro: secondary email
B_email: alternate email
cardnumber: card number
- "OFF": first valid email address
+ "": first valid email address
"MULTI": selected addresses
- 'for sending out email notices.'
- '
NOTE: If set to "first valid", the order in which the email addresses are checked is set in EmailFieldPrecedence.'