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,16 +76,18 @@ final class PhabricatorOwnersDetailController
|
||||||
'auditorPHIDs' => $package->getPHID(),
|
'auditorPHIDs' => $package->getPHID(),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$status_concern = DiffusionCommitQuery::AUDIT_STATUS_CONCERN;
|
||||||
|
|
||||||
$attention_commits = id(new DiffusionCommitQuery())
|
$attention_commits = id(new DiffusionCommitQuery())
|
||||||
->setViewer($request->getUser())
|
->setViewer($request->getUser())
|
||||||
->withAuditorPHIDs(array($package->getPHID()))
|
->withAuditorPHIDs(array($package->getPHID()))
|
||||||
->withAuditStatus(DiffusionCommitQuery::AUDIT_STATUS_CONCERN)
|
->withAuditStatus($status_concern)
|
||||||
->needCommitData(true)
|
->needCommitData(true)
|
||||||
->setLimit(10)
|
->setLimit(10)
|
||||||
->execute();
|
->execute();
|
||||||
if ($attention_commits) {
|
|
||||||
$view = id(new PhabricatorAuditListView())
|
$view = id(new PhabricatorAuditListView())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
|
->setNoDataString(pht('This package has no open problem commits.'))
|
||||||
->setCommits($attention_commits);
|
->setCommits($attention_commits);
|
||||||
|
|
||||||
$commit_views[] = array(
|
$commit_views[] = array(
|
||||||
|
@ -93,10 +95,9 @@ final class PhabricatorOwnersDetailController
|
||||||
'header' => pht('Commits in this Package that Need Attention'),
|
'header' => pht('Commits in this Package that Need Attention'),
|
||||||
'button' => id(new PHUIButtonView())
|
'button' => id(new PHUIButtonView())
|
||||||
->setTag('a')
|
->setTag('a')
|
||||||
->setHref($commit_uri->alter('status', 'open'))
|
->setHref($commit_uri->alter('status', $status_concern))
|
||||||
->setText(pht('View All Problem Commits')),
|
->setText(pht('View All Problem Commits')),
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
$all_commits = id(new DiffusionCommitQuery())
|
$all_commits = id(new DiffusionCommitQuery())
|
||||||
->setViewer($request->getUser())
|
->setViewer($request->getUser())
|
||||||
|
|
Loading…
Reference in a new issue