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 - allow searches based on relationships #20558

Merged
merged 2 commits into from
Jun 8, 2021

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Jun 8, 2021

Overview

Allows searches to be based on relationships:

image

Before

Searches with Contact as an entity could add Related Contacts as a join, but the base table could not be relationship.

After

Searches can use Relationships as the base entity, and default action links are provided (view/edit/delete relationship)

Technical Details

This makes it possible to use a bridge entity for the base of a search (only if it is annotated @searchable primary|secondary)

It also ensures that fields needed for links are available in search displays (previously it ensured ID was returned but some links require other fields as well).

Comments

This gets us inches away from being able to replace the Relationships tab on the contact summary screen. If SearchKit and Afform were force-enabled on every install, I'd do it right now.

@civibot
Copy link

civibot bot commented Jun 8, 2021

(Standard links)

@civibot civibot bot added the master label Jun 8, 2021
@colemanw colemanw force-pushed the searchKitRelationships branch from 670014a to c507688 Compare June 8, 2021 18:56
This makes it possible to use a bridge entity for the base of a search
(only if it is annotated @searchable primary|secondary)

It also ensures that fields needed for links are available in search displays
(previously it ensured ID was returned but some links require other fields as well)
@colemanw
Copy link
Member Author

colemanw commented Jun 8, 2021

That would take some additional refactoring of the SearchKit Admin screen. But (and I think this is more important) the link builder works for SearchDisplays based on relationships.
image

@eileenmcnaughton
Copy link
Contributor

OK - I feel like ideally we should be able to add links to edit or view the relationship too - but I guess you are saying 'this is the scope of this change' - and it works within that scope

@eileenmcnaughton eileenmcnaughton merged commit 45a1407 into civicrm:master Jun 8, 2021
@eileenmcnaughton eileenmcnaughton deleted the searchKitRelationships branch June 8, 2021 22:16
@colemanw
Copy link
Member Author

colemanw commented Jun 8, 2021

Other than the links at the top of that menu?

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