mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-20 13:52:40 +01:00
Add filter for abandoned revisions
Test Plan: /differential/filter/reviews/?status=abandoned Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley Maniphest Tasks: T767 Differential Revision: https://secure.phabricator.com/D1799
This commit is contained in:
parent
ad58491c6c
commit
21d5953093
2 changed files with 12 additions and 0 deletions
|
@ -342,6 +342,7 @@ class DifferentialRevisionListController extends DifferentialController {
|
|||
'all' => 'All',
|
||||
'open' => 'Open',
|
||||
'committed' => 'Committed',
|
||||
'abandoned' => 'Abandoned',
|
||||
));
|
||||
case 'order':
|
||||
return id(new AphrontFormToggleButtonsControl())
|
||||
|
@ -368,6 +369,8 @@ class DifferentialRevisionListController extends DifferentialController {
|
|||
$query->withStatus(DifferentialRevisionQuery::STATUS_OPEN);
|
||||
} elseif ($params['status'] == 'committed') {
|
||||
$query->withStatus(DifferentialRevisionQuery::STATUS_COMMITTED);
|
||||
} elseif ($params['status'] == 'abandoned') {
|
||||
$query->withStatus(DifferentialRevisionQuery::STATUS_ABANDONED);
|
||||
}
|
||||
break;
|
||||
case 'order':
|
||||
|
|
|
@ -39,6 +39,7 @@ final class DifferentialRevisionQuery {
|
|||
const STATUS_OPEN = 'status-open';
|
||||
const STATUS_ACCEPTED = 'status-accepted';
|
||||
const STATUS_COMMITTED = 'status-committed';
|
||||
const STATUS_ABANDONED = 'status-abandoned';
|
||||
|
||||
private $authors = array();
|
||||
private $ccs = array();
|
||||
|
@ -657,6 +658,14 @@ final class DifferentialRevisionQuery {
|
|||
ArcanistDifferentialRevisionStatus::COMMITTED,
|
||||
));
|
||||
break;
|
||||
case self::STATUS_ABANDONED:
|
||||
$where[] = qsprintf(
|
||||
$conn_r,
|
||||
'status IN (%Ld)',
|
||||
array(
|
||||
ArcanistDifferentialRevisionStatus::ABANDONED,
|
||||
));
|
||||
break;
|
||||
default:
|
||||
throw new Exception(
|
||||
"Unknown revision status filter constant '{$this->status}'!");
|
||||
|
|
Loading…
Reference in a new issue