Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.3.7
-
Component/s: Core CiviCRM, NYSS
-
Labels:None
-
Funding Source:Core Team Contract
Description
This issue is linked to NYSS http://senatedev.senate.state.ny.us/issues/show/3698
Please track time and record it there.
-------------
In the first step of the export process, IF the user selects the option to "merge same addresses", expose two select dropdowns where the users can choose how to handle the postal greeting and addressee values during export when the number of matching contacts is > 2, AND no household record is present.
EXAMPLE: John Doe, Jane Smith, and Pam Jackson live at the same address. Default behavior for merge is:
Addressee = "John Doe, Jane Smith, Pam Jackson"
Postal Greeting = "Dear John Doe, Jane Smith, Pam Jackson"
User can decide that for all rows represented > 2 merges, use selected static value instead:
Addressee = "Current Residents"
Postal Greeting = "Dear Neighbor"
=============
Implementation
=============
1. Create a new contactType (filter) choice for Add / Edit Option form when option group = Postal Greeting, Addressee, and Email Greeting. This is needed to store the merge contacts static strings that a site wants to use repeatedly (e.g. Dear Neighbor).
1.1 Admin_Form_Options::buildQuickForm - add an item to the array for contactOptions select field:
3 => ts('Multiple Contact Merge')
This will appear as another value in the Contact Type dropdown when adding or editing Postal Greeting, Addressee or Email Greeting options.
2. Export Form changes
When "Merge Same Address" is checked, two new fields should be injected inside the crm-content-mergeSameAddress div so their labels are left aligned with the checkbox. Add spacer below second dropdown to provide visual separation for "Merge Household...." checkbox.
2.1 Label: "Postal Greeting (merging > 2 contacts)"
Select options:
- "List of names" (this is the default behavior and s/b the default option, post value for this is option is empty string)
- Option value rows from postal_greeting option group where filter = 3.
"Other" (when selected, show text input field for user to type in a string for use in this export only - not saved)
2.2 Label: "Addressee (merging > 2 contacts)"
Select options:
- "List of names" (this is the default behavior and s/b the default option, post value for this is option is empty string)
- Option value rows from addressee option group where filter = 3.
"Other" (when selected, show text input field for user to type in a string for use in this export only - not saved)
3. Export Form Rule
If "Other" is selected in one of the dropdowns AND no value has been typed into the text field, set form error.
"Please enter a value for Postal Greeting (merging > 2 contacts), or select a pre-configured option from the list."
"Please enter a value for Addressee (merging > 2 contacts), or select a pre-configured option from the list."
4. Export Post Process
During export, if user selects something other than the default merge behavior, the selected OR typed in static strings will be used in all export rows where there are > 2 contacts being merged.