Skip to content

Commit

Permalink
Merge pull request #1930 from Accenture/bug/1836-transactional-send-j…
Browse files Browse the repository at this point in the history
…ourneys-cannot-be-versioned-or-updated-if-activepublished

bug/1836 Ensure automatic new version creation only happens to multi-step jourmeys without a draft version
  • Loading branch information
JoernBerkefeld authored Dec 13, 2024
2 parents 2e3ebe7 + 75d5e66 commit 9e9ddd8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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.

6 changes: 5 additions & 1 deletion lib/metadataTypes/Journey.js
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,11 @@ class Journey extends MetadataType {
);
const cachedVersion = cache.getByKey(this.definition.type, normalizedKey);
if (cachedVersion) {
if (cachedVersion.status === 'Draft') {
if (
cachedVersion.status === 'Draft' ||
cachedVersion.definitionType !== 'Multistep'
) {
// we can update journeys either if there is a draft version or if the type is not multistep. transactional and quicksend journeys do not have versions.
// add version to ensure we update the correct one
metadataMap[metadataKey].version = cachedVersion.version;
// update modifiedDate field to bypass API-error "Another user recently modified this journey. Refresh to edit the latest version."
Expand Down

0 comments on commit 9e9ddd8

Please sign in to comment.