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 - Take search filters from the url when viewing a standalone display #19713

Merged
merged 2 commits into from
Mar 5, 2021

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Mar 2, 2021

Overview

This passes through all query params from the url fragment as search filters to the display.

Before

Query params ignored

After

Query params passed to search filters.

@civibot
Copy link

civibot bot commented Mar 2, 2021

(Standard links)

@civibot civibot bot added the master label Mar 2, 2021
@eileenmcnaughton
Copy link
Contributor

@colemanw I'm not sure how to construct a url to test this

@eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton
Copy link
Contributor

OK this works - I can also filter by fields that are NOT specified in the saved search in any way

https://dmaster.localhost:32353/civicrm/search#/display/alive/lpa?last_name=Ivanov

But AFAIK it's not until we have a form that you could access anything that your permissions would not normally permit (configuration dependent)

@totten @seamuslee001 also

@colemanw colemanw marked this pull request as draft March 2, 2021 22:29
@eileenmcnaughton eileenmcnaughton marked this pull request as ready for review March 4, 2021 04:01
@eileenmcnaughton
Copy link
Contributor

@colemanw I did some more testing on this and hit something else we should probably consider

The only way I could filter by gender is link this

image

But I suspect that filtering by gender_id as a number would be wanted. I'm OK with this being merged if we are committed to supporting that url format (& we can consider enhancing to include gender_id / gender_id:name after

@colemanw colemanw force-pushed the searchDisplayParams branch from 979474f to a475441 Compare March 4, 2021 17:58
@colemanw
Copy link
Member Author

colemanw commented Mar 4, 2021

@eileenmcnaughton I've pushed up an additional change to allow variations on the field suffix, so that if e.g. gender_id:label is in the SELECT clause you can pass url args gender_id:label=Male or gender_id:name=M or gender_id=2 interchangeably.

@eileenmcnaughton
Copy link
Contributor

@colemanw that's better - I'm a bit tempted to move this to the rc because it only just moved out and I started doing a bit of documenting yesterday and it might be easier if this were in ( the stuff I did yesterday triggered a 'published' email but I can't see it yet)

@eileenmcnaughton
Copy link
Contributor

oh - found the link to my efforts so far https://docs.civicrm.org/user/en/latest/the-user-interface/search-kit/

@eileenmcnaughton
Copy link
Contributor

looks like the formatting is pretty wonky atm

colemanw added 2 commits March 4, 2021 15:45
…e searchDisplay

This passes through all query params from the url fragment as search filters to the display.
@colemanw colemanw force-pushed the searchDisplayParams branch from a475441 to 2f41f0f Compare March 4, 2021 20:46
@colemanw colemanw changed the base branch from master to 5.36 March 4, 2021 20:46
@civibot civibot bot added 5.36 and removed master labels Mar 4, 2021
@colemanw
Copy link
Member Author

colemanw commented Mar 4, 2021

Ok @eileenmcnaughton I've changed the base. Agree this is suitable for merging into the RC.

@colemanw colemanw merged commit 5747164 into civicrm:5.36 Mar 5, 2021
@colemanw colemanw deleted the searchDisplayParams branch March 5, 2021 02:45
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