From cd04b453f116b02e6cb0f3ae5a25952d42b5591a Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Wed, 15 Dec 2021 11:53:19 +0100 Subject: [PATCH] Use the last status flow as a default one for new tasks [SCI-6098] --- app/models/my_module.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/my_module.rb b/app/models/my_module.rb index 87b1e0e04..4f1943d09 100644 --- a/app/models/my_module.rb +++ b/app/models/my_module.rb @@ -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