Contribution Detail report does not import filters passed on URL causing wrong data to be returned
Overview
You can click through from the Contribution Summary report to 'drill-down' into a group of contribution records, e.g. for a given month. This launches a Contribution Details report with the date filter on the URL query string. It shows the correct results, but it loads an empty form for the report. This means that when you submit the form, e.g. click View Results, or choose CSV download, it's not operating without that date filter.
This is a problem because people come through wanting a csv, say, of some segment of the data, but instead they get all contributions, ever(!) which is (a) wrong and (b) may crash the server (out of memory).
Reproduction steps
(this works with the sample data in civibuildkit)
- click: Reports » Contribution Reports
- click: Contribution Summary Report
- click Refresh Report to get some data to look at
- click a month in the report, note the number of contributions, e.g. N
- you should see a contribution detail report with N rows.
- click the View results button (or choose export CSV) - expecting to still see N rows...
- you will now see a contribution details report for all contributions; the filters passed through in (4) are lost.
Current behaviour
Filters not imported to form; cannot download CSV of correct results.
Expected behaviour
Filters should be imported into the form so that CSV download works.
Environment information
- CiviCRM: 5.47
- PHP: 7.4
Comments
I don't know whether other params can be passed into the report in the same way, and whether this bug also affects those, or whether it's just date.