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

Premium information not shown on contribution search result

    Details

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

      Description

      If a contribution record has premium information, it will not show up on the search result page. This can be reproduced very easily on the sandbox.

      It seems like the problem is with the name field. Both 'contribution type' and the 'product name' fields are named 'name' in the database. The query function is confused as to which 'name' to use.

      The DAO code is actually correct in mapping the product's 'name' field to 'product_name'. The problem is with the BAO code. In particular, two files need to be changed:

      CRM/Contribute/Selector/Search.php
      In the static $_properties array, change 'name' to 'product_name'

      CRM/Contribute/BAO/Query.php
      Inside the defaultReturnProperties function, change the $properties array function to use 'product_name' instead of 'name'

      That's pretty much all that's needed to fix this. The template is actually using the right field so no change is needed.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              jmadar Jason Madar
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 10 minutes
                10m
                Remaining:
                Remaining Estimate - 10 minutes
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified