Merge pull request #3741 from okriuchykhin/ok_SCI_6098_v2

Use the last status flow as a default one for new tasks [SCI-6098]
This commit is contained in:
Alex Kriuchykhin 2021-12-15 13:55:35 +01:00 committed by GitHub
commit 285d20849c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -438,7 +438,7 @@ class MyModule < ApplicationRecord
def assign_default_status_flow
return if my_module_status.present? || MyModuleStatusFlow.global.blank?
self.my_module_status = MyModuleStatusFlow.global.first.initial_status
self.my_module_status = MyModuleStatusFlow.global.last.initial_status
end
def check_status_conditions