From 273cf1c14f171a5d33d0af20d85ddb32fe62ac0f Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Mon, 8 Feb 2016 18:07:03 -0800 Subject: [PATCH] [Timeline] Fix columns exported --- .../timeline/src/actions/ExportTimelineAsCSVTask.js | 3 ++- platform/features/timeline/src/actions/MetadataColumn.js | 8 ++++---- .../features/timeline/src/actions/TimelineCSVExporter.js | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/platform/features/timeline/src/actions/ExportTimelineAsCSVTask.js b/platform/features/timeline/src/actions/ExportTimelineAsCSVTask.js index a854716367..77f0702497 100644 --- a/platform/features/timeline/src/actions/ExportTimelineAsCSVTask.js +++ b/platform/features/timeline/src/actions/ExportTimelineAsCSVTask.js @@ -53,7 +53,8 @@ define([ ); } - return new TimelineTraverser().buildObjectList() + return new TimelineTraverser(this.domainObject) + .buildObjectList() .then(doExport); }; diff --git a/platform/features/timeline/src/actions/MetadataColumn.js b/platform/features/timeline/src/actions/MetadataColumn.js index c798b229bc..64a0d5b2bb 100644 --- a/platform/features/timeline/src/actions/MetadataColumn.js +++ b/platform/features/timeline/src/actions/MetadataColumn.js @@ -24,17 +24,17 @@ define([], function () { "use strict"; - function MetadataColumn(property) { - this.property = property; + function MetadataColumn(propertyName) { + this.propertyName = propertyName; } MetadataColumn.prototype.name = function () { - return this.property.name; + return this.propertyName; }; MetadataColumn.prototype.value = function (domainObject) { var properties = domainObject.useCapability('metadata'), - name = this.property.name, + name = this.propertyName, property = properties.find(function (p) { return p.name === name; }); diff --git a/platform/features/timeline/src/actions/TimelineCSVExporter.js b/platform/features/timeline/src/actions/TimelineCSVExporter.js index 8364ab2c01..ed7bf2b953 100644 --- a/platform/features/timeline/src/actions/TimelineCSVExporter.js +++ b/platform/features/timeline/src/actions/TimelineCSVExporter.js @@ -64,7 +64,7 @@ define([ } for (i = 0; i < maxRelationships; i += 1) { - columns.push(new RelationshipColumn(i)); + columns.push(new ModeColumn(i)); } this.domainObjects = domainObjects;