Repository: Accenture/sfmc-devtools
Pull request #731 (2023-02-13 08:57:39)

Hotfix 4.3.3
release


Patch:
diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml
index faca9d1b..cccde533 100644
--- a/.github/ISSUE_TEMPLATE/bug.yml
+++ b/.github/ISSUE_TEMPLATE/bug.yml
@@ -39,6 +39,7 @@ body:
           label: Version
           description: What version of our software are you running? (mcdev --version)
           options:
+              - 4.3.3
               - 4.3.2
               - 4.3.1
               - 4.3.0
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 95f26995..1412a88c 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,19 +1,5 @@
 # PR details
 
-## What is the purpose of this pull request? (put an "X" next to an item)
-
-_Please delete options that are not relevant._
-
-- [ ] Documentation update
-- [ ] Bugfix
-- [ ] New metadata support
-- [ ] Enhanced metadata
-- [ ] Add a CLI option
-- [ ] Add something to the core
-- [ ] Technical debt removed
-- [ ] Dependencies added / updated
-- [ ] Other, please explain:
-
 ## What changes did you make? (Give an overview)
 
 ...
diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml
index 7baf307f..980729c4 100644
--- a/.github/pr-labeler.yml
+++ b/.github/pr-labeler.yml
@@ -1,3 +1,3 @@
 enhancement: ['feature/*', 'feat/*']
-bug: ['bugfix/*', 'bug/*', 'fix/*']
+bug: ['bugfix/*', 'bug/*', 'fix/*', 'hotfix/*']
 chore: ['chore/*', 'task/*']
diff --git a/.github/workflows/close_issues_on_merge.yml b/.github/workflows/close_issues_on_merge.yml
index fcdaa1c5..a94bcb36 100644
--- a/.github/workflows/close_issues_on_merge.yml
+++ b/.github/workflows/close_issues_on_merge.yml
@@ -5,6 +5,7 @@ on:
     types: [closed]
     branches:
       - develop
+      - hotfix
 
 jobs:
   closeIssueOnPrMergeTrigger:
diff --git a/.github/workflows/code-analysis.yml b/.github/workflows/code-analysis.yml
index 384d2164..05a1145a 100644
--- a/.github/workflows/code-analysis.yml
+++ b/.github/workflows/code-analysis.yml
@@ -13,10 +13,10 @@ name: 'CodeAnalysis'
 
 on:
     push:
-        branches: [main, develop]
+        branches: [main, develop, hotfix]
     pull_request:
         # The branches below must be a subset of the branches above
-        branches: [main, develop]
+        branches: [main, develop, hotfix]
 
 jobs:
     analyzeAndTest:
diff --git a/lib/Deployer.js b/lib/Deployer.js
index 03b96055..1173f7d1 100644
--- a/lib/Deployer.js
+++ b/lib/Deployer.js
@@ -333,7 +333,13 @@ class Deployer {
         const folderMetadata = {};
         const allowedDeFolderContentTypes = ['dataextension', 'shared_dataextension'];
         for (const metadataType of metadataTypeArr) {
-            if (!MetadataTypeInfo[metadataType].definition.dependencies.includes('folder')) {
+            // check if folder or folder-like metadata type is in dependencies
+            if (
+                !MetadataTypeInfo[metadataType].definition.dependencies.includes('folder') &&
+                !MetadataTypeInfo[metadataType].definition.dependencies.some((dep) =>
+                    dep.startsWith('folder-')
+                )
+            ) {
                 Util.logger.debug(` ☇ skipping ${metadataType} folders: folder not a dependency`);
                 continue;
             }
diff --git a/lib/metadataTypes/Automation.js b/lib/metadataTypes/Automation.js
index cc031c2d..eb79ff70 100644
--- a/lib/metadataTypes/Automation.js
+++ b/lib/metadataTypes/Automation.js
@@ -419,6 +419,14 @@ class Automation extends MetadataType {
                     }
                     if (schedule !== null) {
                         try {
+                            // remove the fields that are not needed for the schedule but only for CLI output
+                            const schedule_StartDateTime = schedule._StartDateTime;
+                            delete schedule._StartDateTime;
+                            const schedule_interval = schedule._interval;
+                            delete schedule._interval;
+                            const schedule_timezoneString = schedule._timezoneString;
+                            delete schedule._timezoneString;
+                            // start the automation
                             await this.client.soap.schedule(
                                 'Automation',
                                 schedule,
@@ -431,17 +439,17 @@ class Automation extends MetadataType {
                                 {}
                             );
                             const intervalString =
-                                (schedule._interval > 1 ? `${schedule._interval} ` : '') +
+                                (schedule_interval > 1 ? `${schedule_interval} ` : '') +
                                 (schedule.RecurrenceType === 'Daily'
                                     ? 'Day'
                                     : schedule.RecurrenceType.slice(0, -2) +
-                                      (schedule._interval > 1 ? 's' : ''));
+                                      (schedule_interval > 1 ? 's' : ''));
                             Util.logger.warn(
                                 ` - scheduled automation '${
                                     originalMetadata[key].name
                                 }' deployed Active: runs every ${intervalString} starting ${
-                                    schedule._StartDateTime.split('T').join(' ').split('.')[0]
-                                } ${schedule._timezoneString}`
+                                    schedule_StartDateTime.split('T').join(' ').split('.')[0]
+                                } ${schedule_timezoneString}`
                             );
                         } catch (ex) {
                             Util.logger.error(
@@ -673,9 +681,7 @@ class Automation extends MetadataType {
             ? 'ByDay'
             : 'Interval';
         schedule.Recurrence[keyStem + 'lyRecurrencePatternType'] = patternType;
-        schedule.Recurrence['$'] = {
-            'xsi:type': keyStem + 'lyRecurrence',
-        };
+        schedule.Recurrence['@_xsi:type'] = keyStem + 'lyRecurrence';
         schedule.RecurrenceType = keyStem + 'ly';
         if (keyStem === 'Dai') {
             schedule.Recurrence['DayInterval'] = recurHelper.INTERVAL;
diff --git a/package-lock.json b/package-lock.json
index 4e5d7b7b..c35802e9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
     "name": "mcdev",
-    "version": "4.3.2",
+    "version": "4.3.3",
     "lockfileVersion": 2,
     "requires": true,
     "packages": {
         "": {
             "name": "mcdev",
-            "version": "4.3.2",
+            "version": "4.3.3",
             "license": "MIT",
             "dependencies": {
                 "beauty-amp-core": "0.3.7",
diff --git a/package.json b/package.json
index f50b1c9c..960e0b28 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
     "name": "mcdev",
-    "version": "4.3.2",
+    "version": "4.3.3",
     "description": "Accenture Salesforce Marketing Cloud DevTools",
     "author": "Accenture: joern.berkefeld, douglas.midgley, robert.zimmermann, maciej.barnas",
     "license": "MIT",


Test patch:
diff --git a/test/mockRoot/.mcdevrc.json b/test/mockRoot/.mcdevrc.json
index 8700a78e..16dfe728 100644
--- a/test/mockRoot/.mcdevrc.json
+++ b/test/mockRoot/.mcdevrc.json
@@ -74,5 +74,5 @@
             "triggeredSendDefinition"
         ]
     },
-    "version": "4.3.2"
+    "version": "4.3.3"
 }