cividesk / com.cividesk.normalize Goto Github PK
View Code? Open in Web Editor NEWCiviCRM extension - Normalizes data prior to saving to database.
CiviCRM extension - Normalizes data prior to saving to database.
TwoMice and I will be adding a PR soon for NW, E, S, SW, etc and other 'compass directions' in the street address. If anyone can think of any other common exceptions for street address please chime in.
Seems like we'd need to add a list of standard all-caps directionals
like N, S, E, W, NE, etc., similar to what's done for other
exceptions around here:
https://github.com/cividesk/com.cividesk.normalize/blob/master/CRM/Utils/Normalize.php#L90
Just reporting that I got this when testing this extension on 5.2.x
Fatal error: require_once(): Failed opening required 'libphonenumber/PhoneNumberUtil.php' (include_path='/srv/www/fmc/fmc.fudev.co.nz/sites/all/civicrm/extensions/com.cividesk.normalize/:/srv/www/fmc/fmc.fudev.co.nz/sites/all/civicrm/extensions/nz.co.fuzion.civitoken/:/srv/www/fmc/fmc.fudev.co.nz/sites/all/civicrm/extensions/uk.co.vedaconsulting.mosaico/:/srv/www/fmc/fmc.fudev.co.nz/sites/all/civicrm/extensions/org.civicrm.flexmailer/:/srv/www/fmc/fmc.fudev.co.nz/sites/all/civicrm/extensions/org.civicrm.shoreditch/:/srv/www/fmc/fmc.fudev.co.nz/sites/all/civicrm/extensions/nz.co.fuzion.civixero/:/srv/www/fmc/fmc.fudev.co.nz/sites/all/civicrm/extensions/nz.co.fuzion.accountsync/:/srv/www/fmc/fmc.fudev.co.nz/sites/all/civicrm/extensions/nz.co.fuzion.fmcmembership/:/srv/www/fmc/fmc.fudev.co.nz/sites/all/civicrm/extensions/nz.co.fuzion.transactional/:/srv/www/fmc/fmc.fudev.co.nz/sites/all/civicrm/extensions/nz.co.fuzion.omnipaymultiprocessor/vendor/phpunit/phpunit-mock-objects:/srv/www/fmc/fmc.fudev.co.nz/sites/all/civicrm/ext in /srv/www/fmc/fmc.fudev.co.nz/sites/all/civicrm/extensions/com.cividesk.normalize/CRM/Utils/Normalize.php on line 25
An organization name like "joe's diner" becomes "Joe'S Diner". It works properly without the second word (e.g., "joe's" becomes "Joe's").
The code to handle delimiters when capitalizing names in CRM_Utils_Normalize::normalize_contact is cribbed from here: http://php.net/manual/en/function.ucwords.php#112795
However, this code is fundamentally broken. The foreach loop ensures that only the last delimiter in the $delimiters array matters.
I've tried thinking of ways to fix this code without changing the general approach - but I think the only real fix is to employ a clever preg_replace.
Notice: Undefined property: CRM_Admin_Form_Setting_Normalize::$_values in CRM_Admin_Form_Setting_Normalize->buildQuickForm() (line 92 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
Strict warning: Only variables should be passed by reference in CRM_Admin_Form_Setting_Normalize->postProcess() (line 175 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
Strict warning: Only variables should be passed by reference in CRM_Admin_Form_Setting_Normalize->postProcess() (line 175 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
Strict warning: Only variables should be passed by reference in CRM_Admin_Form_Setting_Normalize->postProcess() (line 175 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
Strict warning: Only variables should be passed by reference in CRM_Admin_Form_Setting_Normalize->postProcess() (line 175 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
Strict warning: Only variables should be passed by reference in CRM_Admin_Form_Setting_Normalize->postProcess() (line 175 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
Strict warning: Only variables should be passed by reference in CRM_Admin_Form_Setting_Normalize->postProcess() (line 175 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
Strict warning: Only variables should be passed by reference in CRM_Admin_Form_Setting_Normalize->postProcess() (line 175 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
Strict warning: Only variables should be passed by reference in CRM_Admin_Form_Setting_Normalize->postProcess() (line 175 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
Strict warning: Only variables should be passed by reference in CRM_Admin_Form_Setting_Normalize->postProcess() (line 175 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
Strict warning: Only variables should be passed by reference in CRM_Admin_Form_Setting_Normalize->postProcess() (line 175 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
Strict warning: Only variables should be passed by reference in CRM_Admin_Form_Setting_Normalize->postProcess() (line 175 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
Strict warning: Only variables should be passed by reference in CRM_Admin_Form_Setting_Normalize->postProcess() (line 175 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
Strict warning: Only variables should be passed by reference in CRM_Admin_Form_Setting_Normalize->postProcess() (line 175 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
Strict warning: Only variables should be passed by reference in CRM_Admin_Form_Setting_Normalize->postProcess() (line 175 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
Strict warning: Only variables should be passed by reference in CRM_Admin_Form_Setting_Normalize->postProcess() (line 175 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
Strict warning: Only variables should be passed by reference in CRM_Admin_Form_Setting_Normalize->postProcess() (line 175 of /var/www/powerbase/sites/all/extensions/normalize/CRM/Admin/Form/Setting/Normalize.php).
I have a client who would like to upgrade from 4.4 to 4.6 and is using this extension.
What tasks would be needed to do a 4.6 version off the top of your head? Is it likely to be quite simple? Do you have a timeframe when you are intending to release a 4.6 compatible version?
At the moment we format our contacts as follows:
Individuals: First name capitalised, last name uppercase
Organisations: All in uppercase
But so far we have been doing this formatting manually, which takes quite a lot of time, and want to change to a new formatting system where we capitalise the first letter of each word of all names. We thought the Civinormalise extension might help us do this but it doesn't seem to work to revert all uppercase names to sentence case.
Ie could it be used to correct an incorrect "state/province" entry?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.