Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Blocker
-
Resolution: Fixed/Completed
-
Affects Version/s: 2.2.7
-
Fix Version/s: 2.2.8
-
Component/s: CiviReport
-
Labels:None
Description
The line in CRM/Report/Form.php that generates the table aliases produces the aliase "case" for table civicrm_case, but "case" is a reserved word in SQL.
It's this line in preprocess():
$this->_columns[$tableName]['alias'] = substr( $tableName, 8 );
Suggest adding a suffix that couldn't possibly conflict, i.e.
$this->_columns[$tableName]['alias'] = substr( $tableName, 8 ) . '_civireport';
Since in this situation the aliases are not for human readability or ease of typing, it's not too important that it be a simple alias.