Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
report folders have to be listed as reports in package.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
amtrack committed Jan 3, 2018
1 parent 8450845 commit e5c67d2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ module.exports.fromFetchResult = function(resultJSON) {

Manifest.prototype.toPackageXml = function(destructive) {
var self = this;
self.transformFolders();
if (destructive) {
self.apiVersion = null;
}
Expand Down Expand Up @@ -114,6 +115,18 @@ Manifest.prototype.unique = function() {
return self;
}

Manifest.prototype.transformFolders = function() {
var self = this;
self.manifestJSON = self.manifestJSON.map(function(item) {
if (Object.keys(folderBasedMetadataMap).indexOf(item.type) > -1) {
// DocumentFolder has to be listed as Document
item.type = folderBasedMetadataMap[item.type];
}
return item;
});
return self;
}

// TODO: in order to factory reset, the following metadata has to be disabled manually:
// * ApprovalProcess
// * WorkflowRule?
Expand Down

0 comments on commit e5c67d2

Please sign in to comment.