diff --git a/src/applications/owners/controller/PhabricatorOwnersDetailController.php b/src/applications/owners/controller/PhabricatorOwnersDetailController.php index bb178cfbcb..80fd67bcdb 100644 --- a/src/applications/owners/controller/PhabricatorOwnersDetailController.php +++ b/src/applications/owners/controller/PhabricatorOwnersDetailController.php @@ -76,27 +76,28 @@ final class PhabricatorOwnersDetailController 'auditorPHIDs' => $package->getPHID(), )); + $status_concern = DiffusionCommitQuery::AUDIT_STATUS_CONCERN; + $attention_commits = id(new DiffusionCommitQuery()) ->setViewer($request->getUser()) ->withAuditorPHIDs(array($package->getPHID())) - ->withAuditStatus(DiffusionCommitQuery::AUDIT_STATUS_CONCERN) + ->withAuditStatus($status_concern) ->needCommitData(true) ->setLimit(10) ->execute(); - if ($attention_commits) { - $view = id(new PhabricatorAuditListView()) - ->setUser($viewer) - ->setCommits($attention_commits); + $view = id(new PhabricatorAuditListView()) + ->setUser($viewer) + ->setNoDataString(pht('This package has no open problem commits.')) + ->setCommits($attention_commits); - $commit_views[] = array( - 'view' => $view, - 'header' => pht('Commits in this Package that Need Attention'), - 'button' => id(new PHUIButtonView()) - ->setTag('a') - ->setHref($commit_uri->alter('status', 'open')) - ->setText(pht('View All Problem Commits')), - ); - } + $commit_views[] = array( + 'view' => $view, + 'header' => pht('Commits in this Package that Need Attention'), + 'button' => id(new PHUIButtonView()) + ->setTag('a') + ->setHref($commit_uri->alter('status', $status_concern)) + ->setText(pht('View All Problem Commits')), + ); $all_commits = id(new DiffusionCommitQuery()) ->setViewer($request->getUser())