Fixes custom column names not being automatically matched on step 2 of
import
This commit is contained in:
@@ -633,12 +633,12 @@ define(
|
|||||||
columnId = 'email';
|
columnId = 'email';
|
||||||
} else if (subscribers.header) {
|
} else if (subscribers.header) {
|
||||||
var headerName = subscribers.header[i],
|
var headerName = subscribers.header[i],
|
||||||
header_name_match = mailpoetColumns.map(function (el) {
|
headerNameMatch = mailpoetColumns.map(function (el) {
|
||||||
return el.id;
|
return el.name;
|
||||||
}).indexOf(headerName);
|
}).indexOf(headerName);
|
||||||
// set column type using header
|
// set column type using header
|
||||||
if (header_name_match !== -1) {
|
if (headerNameMatch !== -1) {
|
||||||
columnId = headerName;
|
columnId = mailpoetColumns[headerNameMatch].id;
|
||||||
}// set column type using header name
|
}// set column type using header name
|
||||||
else if (headerName) {
|
else if (headerName) {
|
||||||
if (/first|first name|given name/i.test(headerName)) {
|
if (/first|first name|given name/i.test(headerName)) {
|
||||||
@@ -648,11 +648,6 @@ define(
|
|||||||
} else if (/status/i.test(headerName)) {
|
} else if (/status/i.test(headerName)) {
|
||||||
columnId = 'status';
|
columnId = 'status';
|
||||||
}
|
}
|
||||||
/*else if (/subscribed|subscription/i.test(headerName)) {
|
|
||||||
columnId = 'confirmed_at';
|
|
||||||
} else if (/ip/i.test(headerName)) {
|
|
||||||
columnId = 'confirmed_ip';
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// make sure the column id has not been previously selected
|
// make sure the column id has not been previously selected
|
||||||
|
Reference in New Issue
Block a user