From 19d67b778d8f65b1e93a355363db3db31c5ae466 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 28 Feb 2013 15:01:32 -0800 Subject: [PATCH] Fix audit counts in some queries Summary: Prior to D5140, "PhabricatorAuditCommitQuery::STATUS_OPEN" was defined as "concern only". This didn't really make sense; we redefined it to "concern or audit required". However, a couple of queries needed to be updated since they really meant "concern" even though they said "open". I also switch the order of problem commits / audit required on the Audit homepage to be consistent with the bubbles on home. Test Plan: Looked at home, /audit/. Reviewers: chad Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D5162 --- .../audit/application/PhabricatorApplicationAudit.php | 2 +- .../audit/controller/PhabricatorAuditListController.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/applications/audit/application/PhabricatorApplicationAudit.php b/src/applications/audit/application/PhabricatorApplicationAudit.php index a8209e28db..f21f5ab558 100644 --- a/src/applications/audit/application/PhabricatorApplicationAudit.php +++ b/src/applications/audit/application/PhabricatorApplicationAudit.php @@ -51,7 +51,7 @@ final class PhabricatorApplicationAudit extends PhabricatorApplication { $commits = id(new PhabricatorAuditCommitQuery()) ->withAuthorPHIDs($phids) - ->withStatus(PhabricatorAuditQuery::STATUS_OPEN) + ->withStatus(PhabricatorAuditCommitQuery::STATUS_CONCERN) ->execute(); $count = count($commits); diff --git a/src/applications/audit/controller/PhabricatorAuditListController.php b/src/applications/audit/controller/PhabricatorAuditListController.php index 1344d3bd8c..717545e3a1 100644 --- a/src/applications/audit/controller/PhabricatorAuditListController.php +++ b/src/applications/audit/controller/PhabricatorAuditListController.php @@ -271,8 +271,8 @@ final class PhabricatorAuditListController extends PhabricatorAuditController { $views = array(); switch ($this->filter) { case 'active': - $views[] = $this->buildAuditView($handle); $views[] = $this->buildCommitView($handle); + $views[] = $this->buildAuditView($handle); break; case 'audits': case 'user': @@ -455,7 +455,7 @@ final class PhabricatorAuditListController extends PhabricatorAuditController { switch ($this->filter) { case 'active': - $query->withStatus(PhabricatorAuditCommitQuery::STATUS_OPEN); + $query->withStatus(PhabricatorAuditCommitQuery::STATUS_CONCERN); break; default: switch ($this->filterStatus) {