mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 02:32:42 +01:00
Include "Draft" revisions in Differential legacy status queries
Summary: See PHI199. Ref T2543. When you run a RevisionQuery with a legacy status constraint (via `differential.query`), we currently don't match "Draft" revisions. Use the actual complete map from `DifferentialRevisionStatus` instead of hard coding the status list so "Draft" is included. Test Plan: - Ran `differential.query` with `ids` and `status` for a draft revision. - Before patch: revision not returned in results. - After patch: revision returned in results. (Note that it returns as "Needs Review", for compatibility.) Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T2543 Differential Revision: https://secure.phabricator.com/D18765
This commit is contained in:
parent
12e6106a59
commit
759c757264
1 changed files with 4 additions and 8 deletions
|
@ -32,14 +32,7 @@ final class DifferentialLegacyQuery
|
|||
}
|
||||
|
||||
private static function getMap() {
|
||||
$all = array(
|
||||
DifferentialRevisionStatus::NEEDS_REVIEW,
|
||||
DifferentialRevisionStatus::NEEDS_REVISION,
|
||||
DifferentialRevisionStatus::CHANGES_PLANNED,
|
||||
DifferentialRevisionStatus::ACCEPTED,
|
||||
DifferentialRevisionStatus::PUBLISHED,
|
||||
DifferentialRevisionStatus::ABANDONED,
|
||||
);
|
||||
$all = array_keys(DifferentialRevisionStatus::getAll());
|
||||
|
||||
$open = array();
|
||||
$closed = array();
|
||||
|
@ -61,6 +54,9 @@ final class DifferentialLegacyQuery
|
|||
),
|
||||
self::STATUS_NEEDS_REVIEW => array(
|
||||
DifferentialRevisionStatus::NEEDS_REVIEW,
|
||||
|
||||
// For legacy callers, "Draft" is treated as "Needs Review".
|
||||
DifferentialRevisionStatus::DRAFT,
|
||||
),
|
||||
self::STATUS_NEEDS_REVISION => array(
|
||||
DifferentialRevisionStatus::NEEDS_REVISION,
|
||||
|
|
Loading…
Reference in a new issue