From: Coleman Watts Date: Fri, 30 Oct 2015 20:09:28 +0000 (-0400) Subject: CRM-13823 - Only count status messages with priority >= 3 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4cb2968787309e995b773a15f1e6c1a7913ecafb;p=civicrm-core.git CRM-13823 - Only count status messages with priority >= 3 --- diff --git a/ang/crmStatusPage.js b/ang/crmStatusPage.js index 781dff7bdd..b472efb237 100644 --- a/ang/crmStatusPage.js +++ b/ang/crmStatusPage.js @@ -5,7 +5,6 @@ ]); // router - angular.module('statuspage').config( function($routeProvider) { $routeProvider.when('/status', { controller: 'statuspageStatusPage', diff --git a/ang/crmStatusPage/StatusPageCtrl.js b/ang/crmStatusPage/StatusPageCtrl.js index 9b89c86185..48242a59ea 100644 --- a/ang/crmStatusPage/StatusPageCtrl.js +++ b/ang/crmStatusPage/StatusPageCtrl.js @@ -24,8 +24,10 @@ }); }; - $scope.countVisible = function(is_visible) { - return _.where($scope.statuses, {is_visible: is_visible}).length; + $scope.countVisible = function(visibility) { + return _.filter($scope.statuses, function(s) { + return s.is_visible == visibility && s.severity_id >= 3; + }).length; }; });