CRM-21551 Add parameter to support skipping processing greetings when… #11405
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Add parameter to support skipping processing greetings when calling api contact.create
Before
Not possible to skip this often slow function when processing large batches.
After
Possible to skip greeting processing. Can be done later by scheduled job
Technical Details
We have a precedent for allowing intensive operations to be skipped when being called from the api - ie. currently geocoding and street parsing can be skipped and filled by offline jobs. There is a PR open to allow skipping the mystical and magical fixAddress function https://github.com/civicrm/civicrm-core/pull/11372/files and the processGreeting code is in a similar vein ie 1) expensive to run and 2) there is a job which can do it 'out of hours' if decided.
Adding another 'magic param' to the v3 api is not great but OTOH there is sufficient precedent IMHO