Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-9508

Improve handling of report criteria in URLs and drill-down links

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.4.8, 4.0.8
    • Fix Version/s: 4.2.0
    • Component/s: CiviReport
    • Labels:
      None

      Description

      (See this forum post for a brief discussion: http://forum.civicrm.org/index.php/topic,22975.0.html)

      There are a few problems with filter criteria in some report, in cases where the user stipulates certain criteria and clicks "Preview", or when the user is linked to a report with a URL that includes filter criteria. Those criteria do affect the content of the report even though they're not saved, which is good. However:

      1. If the user then clicks a drill-down link that points to the same report with additional criteria, the original unsaved criteria are lost, so that the drill-down link is not actually drilling down into the data the user is viewing.
      2. Filter criteria passed in the URL cause all default filters to be ignored, which causes a relatively larger number of rows is displayed; when the user then clicks the "Preview" button or pager controls, the default criteria are also applied, so that the number of matching rows is suddenly less, even though the user didn't specifically change any criteria.
      3. In some reports, some criteria cannot be set by URL parameters, because the filters lack a valid 'type' property.

      This patch attempts to solve these issues in the following ways:
      1. Unsaved filter criteria (from URL parameters or in a report "Preview") are added to some drill-down links;
      2. Filter criteria passed by URL no longer cause default filter criteria to be ignored. Instead, criteria from URL parameters are combined with and override default filters.
      3. The default data type for report filters is "text".
      4. Some non-text report filters have been assigned a 'type' property.

        Attachments

          Activity

            People

            • Assignee:
              allenshaw Allen Shaw
              Reporter:
              allenshaw Allen Shaw
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: