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

Grant fields being retrieved by default when completely irrelevant

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6, 4.7
    • Fix Version/s: 4.6.17, 4.7
    • Component/s: None
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Core Team Funds

      Description

      If you do a contribution search - ie from the contribution search screen the query includes retrieving grant fields - even though these are not relevant (& have a performance cost). The sql includes "civicrm_grant.amount_requested as grant_amount_requested, civicrm_grant.amount_granted as grant_amount_granted, civicrm_grant.amount_total as grant_amount_total, civicrm_grant.application_received_date as grant_application_received_date , civicrm_grant.grant_report_received as grant_report_received, civicrm_grant.money_transfer_date as grant_money_transfer_date FROM civicrm_contact contact_a"

      This was added here - the commit doesn't have a JIRA ref in it and I'm unsure why it made sense to stop checking what component was being queried. We need to start being much more careful about making really frequent queries add fields and data that they don't need because it slows the system down for people

      https://github.com/civicrm/civicrm-core/commit/8ae90f855a4acf9d7dade1b846bf0b563ce97928#diff-f5e872367f13e067d643ef634b73ba14R55

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: