aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/webapp/WEB-INF/app/models
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2011-12-22 19:15:38 +0100
committerFabrice Bellingard <bellingard@gmail.com>2011-12-22 19:17:22 +0100
commitf9939c9840d1d0e6e24eebeb5a9309aa1ebba6a8 (patch)
tree10dd21e3c3142f9723737b212df972d180b72e1d /sonar-server/src/main/webapp/WEB-INF/app/models
parentf753e1a452ff1f42478399e152e0debcc167dc20 (diff)
downloadsonarqube-f9939c9840d1d0e6e24eebeb5a9309aa1ebba6a8.tar.gz
sonarqube-f9939c9840d1d0e6e24eebeb5a9309aa1ebba6a8.zip
SONAR-2662 Fix some issues
Diffstat (limited to 'sonar-server/src/main/webapp/WEB-INF/app/models')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/action_plan.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/action_plan.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/action_plan.rb
index 9e72e9b3b3b..7be4ba432a5 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/action_plan.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/action_plan.rb
@@ -36,6 +36,10 @@ class ActionPlan < ActiveRecord::Base
ActionPlan.find :all, :conditions => ['status=? AND project_id=?', STATUS_OPEN, project_id], :order => :name
end
+ def self.count_open_for_project_id(project_id)
+ ActionPlan.count :conditions => ['status=? AND project_id=?', STATUS_OPEN, project_id]
+ end
+
def user
@user ||=
begin