1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-31 11:37:14 +00:00

Fix RuboCop offense Style/YodaCondition (#36919).

git-svn-id: https://svn.redmine.org/redmine/trunk@22106 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2023-02-14 23:38:26 +00:00
parent e3dae0c217
commit 257b774c53

View File

@ -175,7 +175,7 @@ class IssueRelation < ActiveRecord::Base
def handle_issue_order
reverse_if_needed
if TYPE_PRECEDES == relation_type
if relation_type == TYPE_PRECEDES
self.delay ||= 0
else
self.delay = nil
@ -191,7 +191,7 @@ class IssueRelation < ActiveRecord::Base
end
def successor_soonest_start
if (TYPE_PRECEDES == self.relation_type) && delay && issue_from &&
if (self.relation_type == TYPE_PRECEDES) && delay && issue_from &&
(issue_from.start_date || issue_from.due_date)
add_working_days((issue_from.due_date || issue_from.start_date), (1 + delay))
end