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

CRM-20630: Modifying CRM_Activity_Form_Search to use URL parameters as search form values when passing force=1. #10957

Conversation

coldrunKacper
Copy link
Contributor

@coldrunKacper coldrunKacper commented Sep 8, 2017

Overview

This is a simplified version of #10418 and does affect Activity Search Form only.

It allows to pass URL parameters as Search Form values when using with 'force=1' parameter.

It does not affect any other classes than CRM_Activity_Form_Search and does not modify $_defaults class property.

Before

Is not possible to do Activity search using URL parameters even if we use 'force=1' parameter.
For example, doing a GET request with following URLs does not work:

/civicrm/activity/search?force=1&activity_type_id[]=9&cid=3

/civicrm/activity/search?force=1&activity_type_id[]=9&activity_date_relative=earlier.year&activity_date_low=1&activity_date_high=1

Below we try to search for "Tell a Friend" activities (activity type id = 9) and for specified amount of time. As search results we Activities of all types and dates.
Results don't fit search values passed in URL:
activity-search-results-without-patch

Also search criteria are not set the URL values:
activity-search-form-without-patch

After

It's possible to pass search criteria with URL parameters.

Search results reflect URL parameters:
activity-search-results-with-patch

Fields of Search Form are set to values passed in URL:
activity-search-form-with-patch


@eileenmcnaughton
Copy link
Contributor

Some combo of @totten / @colemanw / other commenters on original PR need to approve this

@colemanw colemanw merged commit 64dbfdb into civicrm:master Sep 10, 2017
@MegaphoneJon
Copy link
Contributor

It looks like this should be documented. @coldrunKacper are you able to submit a PR to the docs for this?

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.

5 participants