Commit d6d6102a authored by jaapjansma's avatar jaapjansma
Browse files

Fixed issue with activity and actions on only the found record or all records

parent 53ec4075
......@@ -269,6 +269,8 @@ abstract class CRM_DataprocessorSearch_Form_AbstractSearch extends CRM_Dataproce
'data' => $record,
);
$ids[] = $row['id'];
} else {
$ids[] = $row['id'];
}
$rows[] = $row;
......
......@@ -8,6 +8,15 @@ use CRM_Dataprocessor_ExtensionUtil as E;
class CRM_DataprocessorSearch_Form_ActivitySearch extends CRM_DataprocessorSearch_Form_AbstractSearch {
/**
* The params that are sent to the query.
*
* @var array
*/
protected $_queryParams;
protected $activity_ids;
/**
* Returns the name of the default Entity
......@@ -99,4 +108,29 @@ class CRM_DataprocessorSearch_Form_ActivitySearch extends CRM_DataprocessorSearc
return $this->_taskList;
}
/**
* Return altered rows
*
* Save the ids into the queryParams value. So that when an action is done on the selected record
* or on all records, the queryParams will hold all the activity ids so that in the next step only the selected record, or the first
* 50 records are populated.
*
* @param array $rows
* @param array $ids
*
*/
protected function alterRows(&$rows, $ids) {
$this->activity_ids = $ids;
$this->_queryParams[0] = array(
'activity_id',
'=',
array(
'IN' => $this->activity_ids,
),
0,
0
);
$this->controller->set('queryParams', $this->_queryParams);
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment