mirror of
https://github.com/meineerde/redmine.git
synced 2025-10-17 17:01:01 +00:00
cleanup: rubocop: fix Layout/IndentFirstArrayElement in app/models/project.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@19049 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3dff73502a
commit
82c0eaadc3
@ -106,7 +106,6 @@ Layout/IndentFirstArgument:
|
||||
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
|
||||
Layout/IndentFirstArrayElement:
|
||||
Exclude:
|
||||
- 'app/models/project.rb'
|
||||
- 'app/models/setting.rb'
|
||||
- 'lib/redmine/nested_set/issue_nested_set.rb'
|
||||
- 'lib/redmine/nested_set/project_nested_set.rb'
|
||||
|
||||
@ -633,20 +633,22 @@ class Project < ActiveRecord::Base
|
||||
|
||||
# The earliest start date of a project, based on it's issues and versions
|
||||
def start_date
|
||||
@start_date ||= [
|
||||
issues.minimum('start_date'),
|
||||
shared_versions.minimum('effective_date'),
|
||||
Issue.fixed_version(shared_versions).minimum('start_date')
|
||||
].compact.min
|
||||
@start_date ||=
|
||||
[
|
||||
issues.minimum('start_date'),
|
||||
shared_versions.minimum('effective_date'),
|
||||
Issue.fixed_version(shared_versions).minimum('start_date')
|
||||
].compact.min
|
||||
end
|
||||
|
||||
# The latest due date of an issue or version
|
||||
def due_date
|
||||
@due_date ||= [
|
||||
issues.maximum('due_date'),
|
||||
shared_versions.maximum('effective_date'),
|
||||
Issue.fixed_version(shared_versions).maximum('due_date')
|
||||
].compact.max
|
||||
@due_date ||=
|
||||
[
|
||||
issues.maximum('due_date'),
|
||||
shared_versions.maximum('effective_date'),
|
||||
Issue.fixed_version(shared_versions).maximum('due_date')
|
||||
].compact.max
|
||||
end
|
||||
|
||||
def overdue?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user