Skip to content

Commit 188990e

Browse files
committed
Restricted members importer to ignore "products" column
refs https://github.com/TryGhost/Team/issues/1076 refs TryGhost/Ghost@fe754cc#diff-b67ecda91b5bd79c598e5c5a9ec2ccf28dbfab6a924b21352273865e07cd7ceaR57 - The "products" column has not been doing any logic anything since at least 5.20.0 (see refed commit). The concept of columns in the export file was mostly there for analytical/data filtering reasons - so the user could analyze their exports. CSV was never a good suite for relational data that "products" (or now tiers) represent - The "tiers" column will still be present in the exported CSV file, but there is not going to be any logic attached to it. - The only columns that can effect the "tiers" state of the member are: "complimentary_plan" (assign default tier to the member) and "stripe_customer_id" (pulls in subscription/tier data from Stripe)
1 parent d60a128 commit 188990e

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

packages/members-csv/lib/parse.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ module.exports = (path, headerMapping, defaultLabels = []) => {
2929
}
3030
}
3131

32-
if (header === 'products') {
33-
if (value && typeof value === 'string') {
34-
return value.split(',').map(name => ({name}));
35-
}
36-
}
37-
3832
if (header === 'subscribed') {
3933
return value.toLowerCase() !== 'false';
4034
}

packages/members-csv/test/unparse.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ [email protected],"banana, avocado"`;
8787
assert.equal(result, expected);
8888
});
8989

90-
it('handles the tiers to products property serialization', function () {
90+
it('handles the tiers property serialization', function () {
9191
const json = [{
9292
9393
tiers: [{

0 commit comments

Comments
 (0)