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 aggregate columns to be links #22356

Merged
merged 1 commit into from
Jan 4, 2022

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Jan 3, 2022

Overview

Allows aggregate columns to be rendered as a link in SearchKit Displays

Before

Aggregate columns were excluded from being shown as links in search Displays.

After

That's overly strict. They can't have autogenerated links, but they can have custom link paths.

Technical Details

Calculating a value for an autogenerated link is complex for aggregated fields, but it's still easy to use a set path.

Previously aggregate columns were excluded from being shown as links.
That's overly strict. They can't have autogenerated links, but they can
have custom links.
@civibot civibot bot added the master label Jan 3, 2022
@civibot
Copy link

civibot bot commented Jan 3, 2022

(Standard links)

@eileenmcnaughton
Copy link
Contributor

Just in testing I note that if you change to group by first name (for example) the contact fields - but NOT the custom fields are converted to 'list' and I can still do edit-in-place on the custom (it edits the first one)

image

Specifically on the intended change .... I can add the link....

image

But it doesn't render as a link (right hand column)

image

@colemanw
Copy link
Member Author

colemanw commented Jan 4, 2022

@eileenmcnaughton I think the problem is with trying to use an aggregate token in your link. I'm pretty sure a regular link would render. Can you test once again?
We can look at the problem aggregating custom fields separately.

@eileenmcnaughton
Copy link
Contributor

@colemanw ok - that does work - FYI - it would be pretty useful to be use a list of contact IDs in a url - but at the moment you can select it & then it breaks the link which should either work or be blocked (although I'm Ok with you merging this if it's easier to manage your commits that way)

@colemanw
Copy link
Member Author

colemanw commented Jan 4, 2022

Ok

@colemanw colemanw merged commit ed5524a into civicrm:master Jan 4, 2022
@colemanw colemanw deleted the searchKitLinks branch January 4, 2022 23:05
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