Skip to content

Commit

Permalink
Merge pull request #1319 from Accenture/feature/1318-auto-enable-allo…
Browse files Browse the repository at this point in the history
…wchildren-on-folders-during-deployment-of-subfolders

Feature/1318 auto enable allowchildren on folders during deployment of subfolders
  • Loading branch information
JoernBerkefeld authored May 14, 2024
2 parents 16fb9ee + edcdffe commit fd9a363
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
8 changes: 4 additions & 4 deletions lib/Deployer.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,11 @@ class Deployer {
folderMetadata[`on-the-fly-${i}`] = {
Path: folder,
Name: folder.split('/').pop(),
Description: '',
// Description: '', // not setting this does not break the deployment and also could not override its existing value in case we need to run an update
ContentType: contentType,
IsActive: true,
IsEditable: true,
AllowChildren: true,
IsActive: true, // would be auto-updated for existing folders if needed
IsEditable: true, // would be auto-updated for existing folders if needed
AllowChildren: true, // would be auto-updated for existing folders if needed
_generated: true,
};
}
Expand Down
26 changes: 12 additions & 14 deletions lib/metadataTypes/Folder.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,12 @@ class Folder extends MetadataType {
);
if (
existingId &&
(metadata[metadataKey]._generated || // of generated, never "update"
!this.hasChangedGeneric(
cachedVersion,
metadata[metadataKey],
'Path',
true
))
!this.hasChangedGeneric(
cachedVersion,
metadata[metadataKey],
'Path',
true
)
) {
Util.logger.verbose(
` - skipping ${this.definition.type} ${
Expand All @@ -246,13 +245,12 @@ class Folder extends MetadataType {
existingId = cachedVersion?.ID;
if (
existingId &&
(metadata[metadataKey]._generated || // of generated, never "update"
!this.hasChangedGeneric(
cachedVersion,
metadata[metadataKey],
'Path',
true
))
!this.hasChangedGeneric(
cachedVersion,
metadata[metadataKey],
'Path',
true
)
) {
Util.logger.verbose(
` - skipping ${this.definition.type} ${
Expand Down

0 comments on commit fd9a363

Please sign in to comment.