Vtiger 6.4 Saved Mapping selection doesn't work for non-header CSV files
We are using a vtiger 6.4 fresh installed version and testing the import functionality for Project Task List.
After setting up how the CSV should be imported (using non-header CSV), we save the configuration as Saved Mapping.
Then, we try to import another file with the same format and use the "saved mapping" functionality, but it doesn't work. It seems that code only works with CSV files with Header. First, if there is no header, mapping is stored as numbers but code expects a String. And second, there is a shift in the index of the mapping.
We have modified the following file to make it work:
[root@mimarketing vtigercrm]# diff ./layouts/vlayout/modules/Import/resources/Import.js ../vtiger66/layouts/vlayout/modules/Import/resources/Import.js
325,326c325
< // mapping["'"+header+"'"] = mappingPair[1];
< mapping[header] = mappingPair[1];
---
> mapping["'"+header+"'"] = mappingPair[1];
336,337c335,336
< } else if(rowId-1 in mapping) {
< mappedFields.val(mapping[rowId-1]);
---
> } else if(rowId in mapping) {
> mappedFields.val($rowId);
405c404
< }
---
> }