[REF] [EXPORT] [TLA] Update handling of input fields so that the mapping format is accepted. #14792
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
Code cleanup on export - make it cleaner
Before
Confusing array format used
After
Sane array format used
Technical Details
Updates the export processor to accept the field mapping format from the civicrm_mapping_field table
The current situation is that a weird and wonderful format is used on the Mapping form quickform. This is converted to a sane format when saved to the civicrm_mapping_field table. However, the export processor currently expects the insane format - leading to complexity & lack of re-usablity.
This pr updates the workings of the export processor to use the sane format - as of this PR that are still received in the insane format but they are converted before they are actually used.
This sets us up to change the format received by the . function . & re-instate sanity (instate perhaps)
Comments
Although there is a lot of code in this PR it is very heavily tested. In fact every single change was made as part of stepping through a unit test because each changed line is specifically tested. We built up a lot of tests on this on the IM part of LeXIM over the last year