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

CRM-21427 - Add form validation to make it clear we only allow a single website of each type #13097

Merged
merged 1 commit into from
Nov 15, 2018

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

The contact edit & inline contact edit silently don't save multiple websites of the same type - this triggers a validation error

Original = #12582
Before

On saving a contact with 2 'Work' websites only one will be retained

After

On saving a contact with 2 'Work' websites a validation error will be triggered

Technical Details

Adds form validation. The original PR made a slight tweak to the BAO which I left out as it felt like a separate thing. Discussion here is best place to find more #12582

Comments

Am treating this as a reviewer's PR & giving merge on pass. Original by @gboudrias had a style error

@civibot
Copy link

civibot bot commented Nov 15, 2018

(Standard links)

@jitendrapurohit
Copy link
Contributor

@eileenmcnaughton @gboudrias Is there any reason of why website is not allowed to behave in the same way like email or phone? Eg.

I can save 2 emails or phones with type = "work". But get this validation error for website.

Also, the "before" statement from the PR description -

On saving a contact with 2 'Work' websites only one will be retained

seems incorrect as when I revert this PR and try to save 2 website with type = work, both of them are saved for the contact.

image

@eileenmcnaughton
Copy link
Contributor Author

@jitendrapurohit arg i don't know - I only know it's been a long whackamole over many many versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants