CRM-16557 - Fix contact dashboard to display assigned activities
authorColeman Watts <coleman@civicrm.org>
Tue, 26 May 2015 01:57:39 +0000 (21:57 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 26 May 2015 01:57:39 +0000 (21:57 -0400)
CRM/Activity/Form/Search.php
CRM/Activity/Page/UserDashboard.php

index 77c78c0708f04aafa168c3d336f857907b06c8f2..80324ef27a3af0ac56bf57a50e88c40b1d13a34f 100644 (file)
@@ -297,8 +297,8 @@ class CRM_Activity_Form_Search extends CRM_Core_Form_Search {
 
     $status = CRM_Utils_Request::retrieve('status', 'String', $this);
     if ($status) {
-      $this->_formValues['activity_status'] = $status;
-      $this->_defaults['activity_status'] = $status;
+      $this->_formValues['activity_status_id'] = $status;
+      $this->_defaults['activity_status_id'] = $status;
     }
 
     $survey = CRM_Utils_Request::retrieve('survey', 'Positive', CRM_Core_DAO::$_nullObject);
index 26299d503858208ff455c4bd95efa1afaadd909e..a6bada45869787210f77da12a3a4c5065586cc67 100644 (file)
@@ -55,7 +55,8 @@ class CRM_Activity_Page_UserDashboard extends CRM_Contact_Page_View_UserDashBoar
     $controller->reset();
     $controller->set('context', 'user');
     $controller->set('cid', $this->_contactId);
-    $controller->set('status', array(1 => 'on', 7 => 'on'));
+    // Limit to status "Scheduled" and "Available"
+    $controller->set('status', array('IN' => array(1, 7)));
     $controller->set('activity_role', 2);
     $controller->set('force', 1);
     $controller->process();