Skip to content
Snippets Groups Projects
Closed Can't filter by anything other than contribution status in Contribution Aggregate by Relationship CiviReport
  • View options
  • Can't filter by anything other than contribution status in Contribution Aggregate by Relationship CiviReport

  • View options
  • Closed Issue created by DaveD

    There's a hack(?) in the report to allow filtering by status: https://github.com/civicrm/civicrm-core/blob/08e8cd56136aed47f3c9e598c2d9f318d6c81977/CRM/Report/Form/Contribute/History.php#L432-L434

    and then the query uses it at https://github.com/civicrm/civicrm-core/blob/08e8cd56136aed47f3c9e598c2d9f318d6c81977/CRM/Report/Form/Contribute/History.php#L688-L690

    (Yes this report is in a file called History.php - I assume for historical reasons...)

    But choosing to filter by anything else doesn't apply the filter.

    1. Create two contributions for a person, with different financial types.
    2. Run the report and check the Aggregate Amount column and filter by one financial type.
    3. It still includes both contributions.

    There's an argument that this is "correct" in the sense described at #2707 (comment 62816), i.e. "Find contacts that match the criteria, THEN run the report on them", so that it's finding CONTACTS that have a contribution with that financial type, and then running the report and aggregating their contributions. But this report isn't a generic advanced search, it's specifically related to contributions, so I'd argue the contribution filters should apply to the contributions being included.

    I can see why this might be a little difficult in this report because it needs to build the rows separately to handle the relationships, so it doesn't just use the stock civireport framework to do the filtering. But maybe the "hack" could be made more generic.

    The report also gives an error User deprecated function: Formatting non-numeric values is no longer supported: ... Caller: CRM_Utils_Money::formatLocaleNumericRoundedByPrecision but that's separate. (Edit: Haha it seems I've noticed this before #2819 (closed))

    Edited by DaveD

    Linked items ... 0

  • Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading