-
Notifications
You must be signed in to change notification settings - Fork 107
Implement automatic propagation of a started status from tasks to experiments and projects [SCI-11797] #8426
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
base: develop
Are you sure you want to change the base?
Conversation
|
||
def down | ||
Project.where.not(started_at: nil).update_all(started_at: nil) | ||
Experiment.where.not(started_at: nil).update_all(started_at: nil) |
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.
Rails/SkipsModelValidations: Avoid using update_all because it skips validations.
end | ||
|
||
def down | ||
Project.where.not(started_at: nil).update_all(started_at: nil) |
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.
Rails/SkipsModelValidations: Avoid using update_all because it skips validations.
.joins(experiments: { my_modules: :my_module_status }) | ||
.where(started_at: nil) | ||
.where.not(experiments: { my_modules: { my_module_statuses: { name: NOT_STARTED_STATUS } } }) | ||
.update_all(started_at: started_at) |
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.
Rails/SkipsModelValidations: Avoid using update_all because it skips validations.
.joins(my_modules: :my_module_status) | ||
.where(started_at: nil) | ||
.where.not(my_modules: { my_module_statuses: { name: NOT_STARTED_STATUS } }) | ||
.update_all(started_at: started_at) |
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.
Rails/SkipsModelValidations: Avoid using update_all because it skips validations.
abdf4ee
to
de9ee07
Compare
…eriments and projects [SCI-11797]
de9ee07
to
ae44356
Compare
Jira ticket: SCI-11797
What was done
Implement automatic propagation of a started status from tasks to experiments and projects