compucorp / uk.co.compucorp.civicrm.pivotreport

CiviCRM Pivot table reporting solution
Other
8 stars 13 forks source link

GS-130: Add Specific Custom Fields to Prospects Report and Customize Labels #114

Closed MiyaNoctem closed 6 years ago

MiyaNoctem commented 6 years ago

Overview

GS have requested that we add four additional fields to the prospect pivot report, and that we re-name a couple of others. This poses the problem of doing this changes specific to Greenhouse Sport's installation,

Field name updates

New fields to add to report

Before

There was no way to add custom fields per installation to prospect report, nor a way to customize field labels used on the pivot report.

After

Implemented the possibility to add a json configuration file per Data entity (Activity, Membership, Case, Contribution, Prospect) to modify its behaviour, by configuring field label mappings to alter field labels and to add specific client custom fields to prospects report.

Technical Details

This is a sample file that achives the customizations required by Greenhouse:

{
  "field_labels": {
    "Prospect Client Type": "Contact Type",
    "Prospect Client Subtype": "Org Type"
  },
  "custom_fields": {
    "client": {
      "Contact_Type_Supplier": {
        "entity": "Contact",
        "group": "GS_Relationship_Type",
        "name": "Contact_Type_Supplier"
      },
      "Contact_Type_Donor": {
        "entity": "Contact",
        "group": "GS_Relationship_Type",
        "name": "Contact_Type_Donor"
      },
      "Contact_Type_Education": {
        "entity": "Contact",
        "group": "GS_Relationship_Type",
        "name": "Contact_Type_Education"
      },
      "Contact_Type_Gov": {
        "entity": "Contact",
        "group": "GS_Relationship_Type",
        "name": "Contact_Type_Gov"
      }
    }
  }
}

Comments

Discussed approach with Ellen, asking if we should think of making this manageable via an admin interface and storing settings on database instead, but the decision was made to just include a settings file, as this ticket is quite urgent for the client and there is no current need to be able to manage this. We could however build on this in the future, to implement manageable customized labels and fields to be included on the report, if we find it is a welcome addition to the extension.