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

[Import] Remove silly param #23493

Merged
merged 1 commit into from
May 19, 2022
Merged

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented May 19, 2022

Overview

[Import] Remove silly param

I've finally solved the mystery of this parameter - the crux of this change is this

image

Before

$relationships is an array of available relationships - in format like
['5_a_b' => 'Employer Of']

It is metadata passed into the custom data function and the reason turns out to be to confirm that the sub-array within $params 'really really' is a relationship type sub-array. In actual fact I'm pretty sure the check to see if it is an array with a 'contact_type' key is enough to confirm it

It also handles the impossible situation where the key is the relationship label instead - maybe once that was possible

image

After

The additional check is now to see if the string ends in a_b or b_a instead

Technical Details

This is the custom data validation routine so not a place to check the validity of the relationship

Comments

@civibot
Copy link

civibot bot commented May 19, 2022

(Standard links)

@civibot civibot bot added the master label May 19, 2022
@colemanw colemanw merged commit 2df31a2 into civicrm:master May 19, 2022
@colemanw colemanw deleted the import_rel branch May 19, 2022 13:35
@colemanw
Copy link
Member

Down with sillyness!

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.

2 participants