terminal42 / contao-leads

Leads extension for Contao Open Source CMS; Store and manage form data with ease!
GNU Lesser General Public License v3.0
36 stars 24 forks source link

Fix wrong header value assignments #89

Closed dmolineus closed 4 years ago

dmolineus commented 4 years ago

The current implementation of the data export might produce invalid header value assignments. It happens for following scenario:

  1. The lead data export is configured with a custom export (fields)
  2. The form fields changed after first data sets were stored (New fields are added)
  3. There is no lead containing the new form fields

To avoid the issue this PR does two things:

This PR threats the configured export fields as the determining configuration. Having an invisible field configured in the export configuration might be a valid use case if older records does contain the data for such fields.

aschempp commented 4 years ago

Thanks!