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:
parent
fa943f744b
commit
be83d62375
1 changed files with 15 additions and 14 deletions
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue