CRM-17395 - Activities report - filter by target contact
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Wed, 21 Oct 2015 11:45:10 +0000 (17:15 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Wed, 21 Oct 2015 11:45:10 +0000 (17:15 +0530)
CRM/Report/Form/Activity.php
tests/phpunit/WebTest/Activity/StandaloneAddTest.php

index 98ce9640cac3042a4cbddff5625d9110275263b3..49bdb737ae01043e79efb17e14962e9637626c31 100644 (file)
@@ -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),
index 911336ccf4b49c06636cf42f82787f6a43ed4eb1..324fc447f0d93bbbaf93f94022b4c427f1e7f774 100644 (file)
@@ -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() {