Download & Extend

Validation function to warn when column headings have changed

Project:User Import
Version:6.x-1.2
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Maybe this is by design, but it seems like a bug to me. If I capture field mappings using Saved Settings for an import that has a header row, my expectation is that when I re-use those Saved Settings for a subsequent import of a file that has the same headings but in a different order, my Saved Settings will still match correctly. That isn't the case. The captured mappings are applied numerically, regardless of the values in the header row. The values in the header row are ignored.

Comments

#1

Don't forget that data columns also match to Drupal fields when there is no headings, the only way to do that is by column order.

I feel that this is too much of an edge case, if the data file is provided with different order of columns, then it's also likely to have different labels for those headings, or certain columns ommited.

What might be useful is a validation function to check that if headings are used in the import template that the same headings are also in the file being imported. With a warning message being displayed if they are not.

#2

The mappings are not expanded by default when Saved Settings are used, so unless the user explicitly checks, unintended mappings could easily be processed.

The validation function to warn when column headings are different seems to me like a sufficient solution.

#3

Title:Saved Settings map incorrectly when header row field order is changed» Validation function to warn when column headings have changed
Category:bug report» feature request

Changing the title and category of this issue.

nobody click here