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

CRM_Report_Form::selectTables() ignores filters for "null" and "not null"

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.4.8
    • Fix Version/s: 4.1.0
    • Component/s: CiviReport
    • Labels:
      None

      Description

      The method CRM_Report_Form::selectTables() is supposed to build and return an array of tables used in the report, based on the Report Criteria settings. Currently, when checking report filters for tables that might be required, this method only counts the table if the filter has a defined value. This works fine for most filters, but the "null" and "not null" filters will never have a filter value; thus the tables they're associated with are not returned by this method.

      This patch fixes the bug by counting a table as required if any of the three conditions is true: 1) the filter has a value, OR 2) the filter is "null", OR 3) the filter is "not null".

        Attachments

        1. Form.php.patch
          0.8 kB
          Allen Shaw
        2. Form.php.patch
          0.8 kB
          Allen Shaw

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: