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

Several CiviContribute fields cause an error in Search Builder

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.7.19
    • Fix Version/s: None
    • Component/s: CiviCRM Search
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      Contribution fields that do not belong to the contribution table seem to cause an error when using the Search Builder. Examples:

      • Contribution -> End date for Premiums
      • Contribution -> Soft Credit For
      • Contribution -> Batch Name

      Simply using the fields results in an error page: "DB Error: no such field"

      Sample error in debug mode:

      Database Error Code: Unknown column 'civicrm_contribution.financial_type_id' in 'where clause', 1054

      It seems we are missing a JOIN clause somewhere, though I don't know where in the code this is generated.

      I assume the issue may be present with more than CiviContribute but I haven't found other problematic fields.

      This issue can be reproduced on the demo sites such as http://dmaster.demo.civicrm.org

      Steps to reproduce:

      1. Activate CiviContribute
      2. Go to Search Builder (civicrm/contact/search/builder)
      3. Select Contribution -> End date for premium -> Is not null
      4. Press search

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gboudrias Guillaume Boudrias
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: