01 Oct FHA Directory Cleanups
Here are items of housekeeping to be done once before directory is printed for residents’ review, and once again before final print copy is generated. All cleanup is to ensure the directory can be displayed and printed correctly, as expected. Corrections are needed because users are able to change their own information and may not understand the “meaning” of each field, although we’ve tried to make this clear on the change forms.
Cleanups I – Simple editing/input errors
- Remove leading and trailing spaces from all components of each user’s name (Salutation, first, middle and last names, and name suffix). Extraneous spaces can cause compare errors (last name) and formatting anomalies (all components). (Codeid: I.1)
- Remove trailing periods from all name components. This is a printing convention that saves space. (PHP Codeid: I.2)*
Cleanups II – Phone Numbers
Many people don’t understand the conventions for phone numbers and enter duplicate phone numbers. This cleanup eliminates duplication of data:
- If a listing has a household phone and no other phones, it is left alone
- If a listing has a household phone and any others (personal, cell, business) then any of the additional numbers that duplicate the home phone are eliminated, the household phone is left as is. (Codeid: II.0)*
For one-resident households:
If a listing has no home phone and
- a personal phone, the personal phone is moved to be the residence phone; (Codeid: II.1.1)*
- a business phone only, the business phone is moved to be the residence phone (Codeid: II.1.2)*
- a cell phone only, no change;
For multiple-resident households:
- If a household phone exists, personal phones that duplicate the household phone are eliminated. (Codeid: II.2.1)
- If no household phone exists, any duplicated personal phones will become the home phone, and eliminated as a personal phone. (Codeid: II.2.2)*
Cleanups III – Emails
For one-resident households:
Any personal email will be moved to become the household email and removed as a personal email (Codeid: III.1)*
For multiple-resident households:
- If a household email is given, and all personal emails are the same as the household email, the personal emails will be deleted. (Codeid: III.2.1)*
- If a household email is given and the household email is the same as any personal email, the household email is deleted. (Codeid: III.2.2)*
* – Codeids are referenced in the PHP code that automatically performs the cleanup, in /code/dirCleanup.php
, which is executed directly, not through a Joomla article. Strongly suggest executing this on a COPY of the NamesX and Lots table on dev before running it on the production site.