-
-
Notifications
You must be signed in to change notification settings - Fork 817
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
[REF] Refactor location-related BAOs to use writeRecord
#25944
Conversation
(Standard links)
|
Address, IM, Phone, Website all work: I added entries to All looks good, other than the failing tests. |
Thanks @aydun did you happen to test Address custom data in the UI e.g. on "Edit Contact" or editing an address inline on the summary screen? |
Ok thanks @aydun that looks similar to the error tests are giving. I'll look into it. |
40326ba
to
63adbb8
Compare
Still fails for Event locations |
ff05303
to
ece327b
Compare
retest this please |
ece327b
to
909e0a6
Compare
writeRecord
writeRecord
@aydun I believe this is all working now :) |
@colemanw All looks good. Event locations show and save custom fields now. FWIW Event location custom fields don't show on the Event Information page. That's fine: someone might want them to, but then someone might not - that can be a problem for another day! This does what it set out to do which is to use Good to merge. |
Overview
Updates location BAOs (phone, im, website, email, open id, and address) to use
writeRecord
, noisily deprecate and stop using add/create functions.Technical Details
The most challenging was Address which had a lot of extra processing in the
add
function as well as a nonstandard extra$fixAddress
parameter. Extra processing has been moved to hooks andfixAddress
to its own function (actually it was already its own function, so never really needed to be a param!).The
Address::add
function also provided legacy support for custom data in the formatcustom_x => 'foo'
mixed into the $params whereas all other BAO create/add functions expect a single keycustom
. I've removed that extra bit and moved it to theAddress::legacyCreate
function which seemed fitting.