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

Add county id to reports/ allow group by on reports (by county id & custom fields)

    Details

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

      Description

      We have a requirement from a customer to be able to run a bunch of reports with the option to group by on custom fields & on county. I tried on pledge summary report & found it not too difficult - patch attached.

      I'd like to do this over a handful of reports - ie. pledge detail, book-keeping, activity & survey detail so would be good to get quick feedback if there are any issues.

      A few notes:

      1) If the clause generated by buildACLClause is being used anywhere I couldn't see it
      2) I'd like to make it so they can choose not to display contact_name (e.g. when aggregating all records by county). I couldn't figure out how
      3) it seems to me that maybe we should create a function like below to call from the various construct functions to make them more consistent.

      If you are happy with all this please assign back to me & I can commit this & ammend & commit the others.

      CRM_Report_Form::addAddressFields()

      { return array( 'civicrm_address' => array( 'dao' => 'CRM_Core_DAO_Address', 'fields' => array( 'street_address' => null, 'city' => null, 'postal_code' => null, 'state_province_id' => array( 'title' => ts( 'State/Province' ), ), 'country_id' => array( 'title' => ts( 'Country' ), 'default' => true ), 'county_id' => array( 'title' => ts( 'County' ), 'default' => false ), ), 'group_bys' => array( 'street_address' => null, 'city' => null, 'postal_code' => null, 'state_province_id' => array( 'title' => ts( 'State/Province' ), ), 'country_id' => array( 'title' => ts( 'Country' ), ), 'county_id' => array( 'title' => ts( 'County' ), ), ), 'grouping'=> 'contact-fields', ), }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: