summaryrefslogtreecommitdiffstats
path: root/app/models/version.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/version.rb')
-rw-r--r--app/models/version.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/version.rb b/app/models/version.rb
index 3340be77e..8002ac9c8 100644
--- a/app/models/version.rb
+++ b/app/models/version.rb
@@ -124,12 +124,12 @@ class Version < ActiveRecord::Base
# Returns the total amount of open issues for this version.
def open_issues_count
- @open_issues_count ||= Issue.count(:all, :conditions => ["fixed_version_id = ? AND is_closed = ?", self.id, false], :include => :status)
+ @open_issues_count ||= Issue.open.count(:all, :conditions => ["fixed_version_id = ?", self.id])
end
# Returns the total amount of closed issues for this version.
def closed_issues_count
- @closed_issues_count ||= Issue.count(:all, :conditions => ["fixed_version_id = ? AND is_closed = ?", self.id, true], :include => :status)
+ @closed_issues_count ||= Issue.open(false).count(:all, :conditions => ["fixed_version_id = ?", self.id])
end
def wiki_page