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

Membership Contribution Detail report not working with ACLs in place

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.4
    • Fix Version/s: 4.5
    • Component/s: CiviReport
    • Labels:
      None

      Description

      At the moment the contributiondetail report for membership isn't working when ACLs are being used.

      on Line 630 of /CRM/Form/Member/ContributionDetail.php it should read $fillTemp = "
      INSERT INTO civireport_membership_contribution_detail (contribution_id, contact_id, membership_id)
      SELECT contribution.id, {$this->_aliases['civicrm_contact']}.id, m.id
      FROM civicrm_contribution contribution
      INNER JOIN civicrm_contact {$this->_aliases['civicrm_contact']}
      ON {$this->_aliases['civicrm_contact']}.id = contribution.contact_id AND contribution.is_test = 0
      {$this->_aclFrom}
      LEFT JOIN civicrm_membership_payment mp
      ON contribution.id = mp.contribution_id
      LEFT JOIN civicrm_membership m
      ON mp.membership_id = m.id AND m.is_test = 0 ";

      Not fillTemp = "
      INSERT INTO civireport_membership_contribution_detail (contribution_id, contact_id, membership_id)
      SELECT contribution.id, contact.id, m.id
      FROM civicrm_contribution contribution
      INNER JOIN civicrm_contact contact
      ON contact.id = contribution.contact_id AND contribution.is_test = 0
      {$this->_aclFrom}
      LEFT JOIN civicrm_membership_payment mp
      ON contribution.id = mp.contribution_id
      LEFT JOIN civicrm_membership m
      ON mp.membership_id = m.id AND m.is_test = 0 ";

      Otherwise it produces the error message DB error no such field 'contact_civireport.id'. This is because the civicrm_contact alias is wrong. However this doesn't completely solve the problem as there is still an issue in the sql that produces the line 2329 in /CRM/Form/Report/Form.php

        Attachments

          Activity

            People

            • Assignee:
              jitendra.purohit Jitendra Purohit
              Reporter:
              seamuslee Seamus Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: