Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/core#4284 Allow deletion of primary email inline on contact #26198

Merged

Conversation

larssandergreen
Copy link
Contributor

Overview

It's odd that you can't delete a primary email inline on view contact.

Before

Primary email cannot be deleted. If you clear the email field, you can save if there is no secondary email, but if there is you must switch the primary from the empty row to the new email before saving or else you'll get a form error.

After

Primary email can be deleted. If there are other emails, the next one is set to primary. If there are no other emails, a new empty row is added (with primary already selected).

@civibot
Copy link

civibot bot commented May 11, 2023

No issue was found matching the number given in the pull request title. Please check the issue number.

@civibot
Copy link

civibot bot commented May 11, 2023

(Standard links)

@civibot civibot bot added the master label May 11, 2023
@colemanw
Copy link
Member

Code looks good to me.
@ufundo can you do a quick r-run to test this?

@ufundo
Copy link
Contributor

ufundo commented May 18, 2023

I can look at this tomorrow 👍

@ufundo
Copy link
Contributor

ufundo commented May 19, 2023

Works for me on Firefox and Chrome, resolving an issue I've had a million times. Thanks @larssandergreen 🙌 !

Not a blocker but the next thing that would make it even better would be if it preferred not 'on-hold' emails when selecting a new primary.

( IE in this situation the on hold email is made primary if the primary is deleted, when presumably the 3rd email is preferred

image

Maybe we could sort on-hold emails to the bottom generally... but one for another day I think!
)

@colemanw colemanw merged commit b70eae6 into civicrm:master May 19, 2023
@colemanw
Copy link
Member

Thanks for the review @ufundo and good work @larssandergreen!

@larssandergreen
Copy link
Contributor Author

Thanks @ufundo and @colemanw. I did think about the on hold situation here, but decided it was, as you say, for another day.

@larssandergreen larssandergreen deleted the allow-deletion-of-primary-emails branch May 24, 2023 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants