From e7b3275bb7c9b9012716294c3f2bc9e8d90c6b40 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Wed, 21 Oct 2015 17:15:10 +0530 Subject: [PATCH] CRM-17395 - Activities report - filter by target contact --- CRM/Report/Form/Activity.php | 1 + tests/phpunit/WebTest/Activity/StandaloneAddTest.php | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CRM/Report/Form/Activity.php b/CRM/Report/Form/Activity.php index 98ce9640ca..49bdb737ae 100644 --- a/CRM/Report/Form/Activity.php +++ b/CRM/Report/Form/Activity.php @@ -668,6 +668,7 @@ GROUP BY civicrm_activity_id $having {$this->_orderBy}"; // fixme: add when required $tempQuery = " ALTER TABLE civireport_activity_temp_target + MODIFY COLUMN civicrm_contact_contact_target_id VARCHAR(128), ADD COLUMN civicrm_contact_contact_assignee VARCHAR(128), ADD COLUMN civicrm_contact_contact_source VARCHAR(128), ADD COLUMN civicrm_contact_contact_assignee_id VARCHAR(128), diff --git a/tests/phpunit/WebTest/Activity/StandaloneAddTest.php b/tests/phpunit/WebTest/Activity/StandaloneAddTest.php index 911336ccf4..324fc447f0 100644 --- a/tests/phpunit/WebTest/Activity/StandaloneAddTest.php +++ b/tests/phpunit/WebTest/Activity/StandaloneAddTest.php @@ -162,6 +162,15 @@ class WebTest_Activity_StandaloneAddTest extends CiviSeleniumTestCase { ), "/label" ); + + //CRM-17395 -- Test Activity Report for Target Contact Filter + $this->openCiviPage('report/instance/3', 'reset=1', '_qf_Activity_submit'); + $this->click("//a[contains(text(),'Filters')]"); + $this->waitForElementPresent('contact_target_value'); + $this->select('activity_date_time_relative', '- any -'); + $this->type('contact_target_value', $firstName1); + $this->clickLink('_qf_Activity_submit'); + $this->assertElementContainsText("//table[@class='report-layout display']/tbody/tr//td[@class='crm-report-civicrm_contact_contact_target']/a", "Anderson, {$firstName1}"); } public function testAjaxCustomGroupLoad() { -- 2.25.1