-
Notifications
You must be signed in to change notification settings - Fork 143
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
Fix saving unsaved data in finish workflow action #10157 #10158
Conversation
Regression in 7cccf96 (unreleased).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looks good, just a few nits about stuff that was already there since we're refactoring.
self.activeStep().save().then(function() { | ||
self.markWorkflowComplete(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this can be reduced to self.activeStep().save().then(self.markWorkflowComplete)
return; | ||
} | ||
self.markWorkflowComplete(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit ( since we're refactoring ): replacing the return
statement with if/else
logic is slightly more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Types of changes
Description of Change
7cccf96 relied on a recursive call to
self.finishWorkflow()
to handle marking the workflow as complete, but besides theTypeError
from usingthis
instead ofself
, it was also executing a bunch of unnecessary requests instead of only sending one POST for the unsaved data and one POST for marking complete. Extracted a new function to mitigate that.Issues Solved
Closes #10157