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#1973 Fix Email & Phone storage issues in event location #18488

Merged
merged 1 commit into from
Sep 18, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Sep 16, 2020

Overview

Fixes a fairly old regression whereby updating event location fields doesn't work properly

Before

Email - Second field value cannot be saved on form submit.
To replicate -

Navigate to Event -> Location tab - https://dmaster.demo.civicrm.org/civicrm/event/manage/location?reset=1&action=update&id=3

Enter a value for the second email field and save. The second field is empty after the form is submitted. And Email2 value is displayed on the first email field

Phone: Every time the Location form is submitted, a new row is inserted in phone table even if it already exist.
To replicate -

Navigate to Event -> Location tab - https://dmaster.demo.civicrm.org/civicrm/event/manage/location?reset=1&action=update&id=3

Fill both the phone numbers and save.
Re-save the form without changing any value. 2 new duplicate rows have been inserted in civicrm_phone table.
This happens on every submission of the Location form.

After

Should update ok - hopefully without breaking @yashodha's use case from
#13534

Technical Details

I wanted to go further on the cleanup but the approach to do that depends on https://lab.civicrm.org/dev/core/-/issues/2044

Comments

https://lab.civicrm.org/dev/core/-/issues/1973

@civibot
Copy link

civibot bot commented Sep 16, 2020

(Standard links)

@jitendrapurohit
Copy link
Contributor

Have tested both the issues mentioned in https://lab.civicrm.org/dev/core/-/issues/1973. Thanks @eileenmcnaughton for the fix 👍. Email and Phones values are saved as expected after this patch.

@eileenmcnaughton
Copy link
Contributor Author

@colemanw

1 Outdated Show resolved Hide resolved
@colemanw
Copy link
Member

I'm happy with the code, test & review by @jitendrapurohit

@colemanw colemanw merged commit f5c801a into civicrm:master Sep 18, 2020
@eileenmcnaughton eileenmcnaughton deleted the loc_block branch September 18, 2020 01:00
@yashodha
Copy link
Contributor

@eileenmcnaughton looks good, thanks!

@eileenmcnaughton
Copy link
Contributor Author

@yashodha did you test your original issue is still fixed ? Might be worth it

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.

4 participants