Skip to content

Commit

Permalink
#1790: allow re-deploying transactional journeys without transEmail p…
Browse files Browse the repository at this point in the history
…resent as long as they are in Draft
  • Loading branch information
JoernBerkefeld committed Jan 9, 2025
1 parent 65c9aa7 commit 382b4a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion @types/lib/metadataTypes/Journey.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions lib/metadataTypes/Journey.js
Original file line number Diff line number Diff line change
Expand Up @@ -1319,13 +1319,17 @@ class Journey extends MetadataType {
activity.configurationArguments.triggeredSendKey =
activity.configurationArguments.r__transactionalEmail_key;
} catch (ex) {
const isCreateMode = !cache.getByKey('journey', metadata.key);
if (isCreateMode && !Util.OPTIONS.publish) {
const cachedVersion = cache.getByKey('journey', metadata.key);
const isCreateMode = !cachedVersion;
if (
(isCreateMode && !Util.OPTIONS.publish) ||
(!isCreateMode && cachedVersion.status === 'Draft')
) {
// no need to add a log entry if the publish-option was provided
Util.logger.info(
` - ${this.definition.type} ${metadata[this.definition.nameField]} (${
metadata[this.definition.keyField]
}): To activate this transactional journey (and create the associated transactionalEmail record), please run 'mcdev publish ${this.buObject.credential}/${this.buObject.businessUnit} journey ${metadata.key}' or click on "Activate" in the GUI.`
}): To activate this transactional journey (and create the associated transactionalEmail record), please run 'mcdev publish ${this.buObject.credential}/${this.buObject.businessUnit} -m journey:"${metadata.key}" ' or click on "Activate" in the GUI.`
);
} else if (!isCreateMode) {
// block deployment if we are in update mode
Expand Down

0 comments on commit 382b4a0

Please sign in to comment.