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

SearchKit - Remove confusing extra joins between Contact & Related Contacts #23655

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Jun 1, 2022

Overview

The option to use RelationshipCache as a base entity was added in #23066 but a side-effect was the addition of some confusing extra join options. This fixes the side-effect.

Before

Selecting Contact as the base entity, there are 3 joins available to "Contact Related Contact"
image

After

Only one join available to related contacts.
image

…ipCache

The option to use RelationshipCache as a base entity was added in civicrm#23066
but a side-effect was the addition of some confusing extra join options.

Before: Selecting Contact as the base entity, there are 3 joins available to "Contact Related Contact"
After: Only one join available to related contacts.
@civibot
Copy link

civibot bot commented Jun 1, 2022

(Standard links)

@civibot civibot bot added the master label Jun 1, 2022
@awestuk
Copy link
Contributor

awestuk commented Jun 3, 2022

I think this patch removes 'Case Related Contacts' from Case Searches, which presumably it shouldn't...?

@colemanw
Copy link
Member Author

colemanw commented Jun 4, 2022

@awestuk it's still there:
image

@awestuk
Copy link
Contributor

awestuk commented Jun 4, 2022

Hrm, I can reliably make Case Related Contacts appear and disappear by applying this patch and clearing the cache. Maybe it's fixed in something subsequent.

@colemanw
Copy link
Member Author

colemanw commented Jun 5, 2022

Oops, my screenshot was taken without the patch.
I see what you mean... but that doesn't actually belong there. Like the extra "Contact Related Contacts", it's confusing because it doesn't actually do what it says it does, it's a link to the Relationship Cache table, which we don't want, not a link through to the Contact table.
That's something we should add though.

@eileenmcnaughton
Copy link
Contributor

Ok - this seems like how it was intended to work

@eileenmcnaughton eileenmcnaughton merged commit 2dc8991 into civicrm:master Jun 9, 2022
@eileenmcnaughton eileenmcnaughton deleted the searchKitFixJoinAgain branch June 9, 2022 01:32
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