Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug/1836 Ensure automatic new version creation only happens to multi-step jourmeys without a draft version #1930

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading