1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 13:22:42 +01:00

Fix button for "All Problem Commits" on Owners packages

Summary:
Ref T9482. This button goes to the wrong place and this table conditionally hides itself so I missed it.

Instead:

  - Always show the table, with an empty string if there are no relevant commits.
  - Link to a working UI.

Test Plan: Saw table. Clicked button.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9482

Differential Revision: https://secure.phabricator.com/D14189
This commit is contained in:
epriestley 2015-09-29 06:43:55 -07:00
parent fa943f744b
commit be83d62375

View file

@ -76,16 +76,18 @@ 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)
->setNoDataString(pht('This package has no open problem commits.'))
->setCommits($attention_commits);
$commit_views[] = array(
@ -93,10 +95,9 @@ final class PhabricatorOwnersDetailController
'header' => pht('Commits in this Package that Need Attention'),
'button' => id(new PHUIButtonView())
->setTag('a')
->setHref($commit_uri->alter('status', 'open'))
->setHref($commit_uri->alter('status', $status_concern))
->setText(pht('View All Problem Commits')),
);
}
$all_commits = id(new DiffusionCommitQuery())
->setViewer($request->getUser())