Skip to content

Only set User#commit_email with user input

Dan Jensen requested to merge 338636-only-set-commit-email-with-user-input into master

What does this MR do?

Previously the User profile form automatically set a value for User#commit_email. This would become the database value when the user submitted the form, whether the user was aware of this or not. That behavior was unnecessary, because the User model already assumes the commit_email is the primary email when not set. Further, this behavior complicated validation when the primary email is being changed. As a simple solution, this change introduces a blank option to the select dropdown, which is used by default. Now the database value will only change if the user changes it.

We are doing the same thing for User#notification_email in !68687 (merged). This is all part of a broader refactoring of User secondary emails.

Screenshots or Screencasts (strongly suggested)

Screen_Shot_2021-08-19_at_3.13.48_PM

Does this MR meet the acceptance criteria?

Conformity

Related to #338636

Edited by Dan Jensen

Merge request reports

Loading