diff options
author | Go MAEDA <maeda@farend.jp> | 2023-02-14 23:38:26 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-02-14 23:38:26 +0000 |
commit | 257b774c53d21fc14f4ed3315d38bdc3c1ba3580 (patch) | |
tree | e9c98716b6a10aca270585556f3093c60ae4cb6b /app | |
parent | e3dae0c21783806b4d3e961491fe33edc6a44d7a (diff) | |
download | redmine-257b774c53d21fc14f4ed3315d38bdc3c1ba3580.tar.gz redmine-257b774c53d21fc14f4ed3315d38bdc3c1ba3580.zip |
Fix RuboCop offense Style/YodaCondition (#36919).
git-svn-id: https://svn.redmine.org/redmine/trunk@22106 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/issue_relation.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/issue_relation.rb b/app/models/issue_relation.rb index 639c88e5e..f33b75568 100644 --- a/app/models/issue_relation.rb +++ b/app/models/issue_relation.rb @@ -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 |