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

Towards consistency for displaying test entities. Stop hiding test entities on some dashboards #23724

Merged
merged 1 commit into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions CRM/Activity/Form/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,6 @@ public function postProcess(): void {
$this->_formValues = CRM_Contact_BAO_SavedSearch::getFormValues($this->_ssID);
}

// We don't show test records in summaries or dashboards
if (empty($this->_formValues['activity_test']) && $this->_force) {
$this->_formValues['activity_test'] = 0;
}

$this->_queryParams = CRM_Contact_BAO_Query::convertFormValues($this->_formValues);

$this->set('queryParams', $this->_queryParams);
Expand Down
5 changes: 0 additions & 5 deletions CRM/Contribute/Form/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,6 @@ public function postProcess() {
// @todo - stop changing formValues - respect submitted form values, change a working array.
$this->fixFormValues();

// We don't show test records in summaries or dashboards
if (empty($this->_formValues['contribution_test']) && $this->_force && !empty($this->_context) && $this->_context === 'dashboard') {
// @todo - stop changing formValues - respect submitted form values, change a working array.
$this->_formValues['contribution_test'] = 0;
}
// We don't show template records in summaries or dashboards
if (empty($this->_formValues['is_template']) && $this->_force && !empty($this->_context) && ($this->_context === 'dashboard' || $this->_context === 'contribution')) {
// @todo - stop changing formValues - respect submitted form values, change a working array.
Expand Down
5 changes: 0 additions & 5 deletions CRM/Event/Form/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,6 @@ private function submit($formValues) {
$this->_formValues = CRM_Contact_BAO_SavedSearch::getFormValues($this->_ssID);
}

// We don't show test records in summaries or dashboards
if (empty($this->_formValues['participant_test']) && $this->_force) {
$this->_formValues["participant_test"] = 0;
}

$this->_queryParams = CRM_Contact_BAO_Query::convertFormValues($this->_formValues, 0, FALSE, NULL, ['event_id']);

$this->set('queryParams', $this->_queryParams);
Expand Down
5 changes: 0 additions & 5 deletions CRM/Member/Form/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,6 @@ public function postProcess() {

$this->fixFormValues();

// We don't show test records in summaries or dashboards
if (empty($this->_formValues['member_test']) && $this->_force) {
$this->_formValues["member_test"] = 0;
}

$this->_queryParams = CRM_Contact_BAO_Query::convertFormValues($this->_formValues, 0, FALSE, NULL, $this->entityReferenceFields);

$this->set('queryParams', $this->_queryParams);
Expand Down
5 changes: 0 additions & 5 deletions CRM/Pledge/Form/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,6 @@ public function postProcess() {

$this->fixFormValues();

// We don't show test records in summaries or dashboards
if (empty($this->_formValues['pledge_test']) && $this->_force) {
$this->_formValues["pledge_test"] = 0;
}

foreach (['pledge_amount_low', 'pledge_amount_high'] as $f) {
if (isset($this->_formValues[$f])) {
$this->_formValues[$f] = CRM_Utils_Rule::cleanMoney($this->_formValues[$f]);
Expand Down
6 changes: 6 additions & 0 deletions CRM/Pledge/Selector/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,12 @@ public function &getRows($action, $offset, $rowCount, $sort, $output = NULL) {

while ($result->fetch()) {
$row = [];

// Ignore rows where we dont have an id.
if (empty($result->pledge_id)) {
continue;
}

// the columns we are interested in
foreach (self::$_properties as $property) {
if (isset($result->$property)) {
Expand Down