-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
URL support for some params in event search #14477
Conversation
(Standard links)
|
ae13c79
to
d5c0750
Compare
a6d3dc0
to
5690c47
Compare
test this please |
5690c47
to
41e3fe6
Compare
@eileenmcnaughton I reckon all the search forms allow URL support for some params which may/may not be intuitive. Should we document all this somewhere (may be a related ticket) so that this is helpful for people without having to look into the code? |
@yashodha I guess it's a moving target - I think @monishdeb has been working on this a bit too & will continue to a bit - perhaps we just document the format it should work on - but say 'not all fields do & it might change between versions'? |
test this please |
I have done testing, this was the string I used.
|
@Stoob reset=1 is in most urls - don't know exactly why but it seems to matter Date format is a long string of numbers 20181908 or 20181908134500 Relative date format comes from the civicrm_option_value table - for me this (& most sites) this is the list. How do you feel about doing a docs PR Today this.day |
This adds url support for sort_name & participant_status_id & participant_register_date to event search civicrm/event/search?reset=1&sort_name=p&participant_status_id=1&participant_register_date_low=20180101
41e3fe6
to
6fbf3a3
Compare
I've just rebased this as we just merged a contribution search url defaults fix - would be good if someone could review so we can 'keep the changes together' |
test this please |
@eileenmcnaughton this seems to work mostly but i note that adding force=1 doesn't do what we want (maybe addressed in another PR). I also noticed that adding partipant_register_date_relative=this.day didn't work not using 1 instead of this.day that didn't work either |
@seamuslee001 OK - I think those are non- blocking - I did start to have some doubts about the relative part of it so maybe we'll re-test that |
@seamuslee001 ok to merge? |
I'm going to merge this as the url strings suggested seem to work, noting sorting out when force=1 is used and the _relative versions still need some work |
thanks @seamuslee001 |
Overview
URL support for some params in event search -
sort_name
participant_status_id
participant_register_date_low
participant_register_date_high
participant_register_date_relative
Date format is a string of numbers YmdHIS - e.g 20180101
Before
No url param support
After
URL support for some params
sort_name
participant_status_id
participant_register_date_low
participant_register_date_high
participant_register_date_relative
Date format is a string of numbers YmdHIS - e.g 20180101
civicrm/event/search?reset=1&sort_name=p&participant_status_id=1&participant_register_date_low=20180101
gives
Technical Details
Part of a generic approach that is not widely used as yet
Comments
Utilising this approach requires field standardisation & metadata fixing - which will eventually support a move away from quickform
Docs PR is here https://github.com/civicrm/civicrm-dev-docs/issues/624