$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);
$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();