Contribution Detail Report: cannot sort by Contribution Status, when filter "Contribution OR Soft Credit = Both"
I found that this odd combination of criteria will crash the Contribution Detail report:
- Sort: Contribution Status
- Filters: Contribution OR Soft Credit? = Both
This will result in a fatal error: "The used SELECT statements have a different number of columns".
More specifically:
CREATE TEMPORARY TABLE civireport_contribution_detail_temp3 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
(SELECT * FROM civicrm_tmp_e_dflt_2be28f58f1295cc154076c2ded818b52)
UNION ALL
(SELECT * FROM civireport_contribution_detail_temp2)
where temp1
has civicrm_contribution_contribution_status_id
, but temp2
does not.
I don't think it's a recent regression. I tested in CiviCRM 5.12 (master) and 5.8.