mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
Add "modifiedStart" and "modifiedEnd" constraints to "differential.revision.search"
Summary: Fixes T13386. See PHI1391. These constraints largely exist already, but are not yet exposed to Conduit. Also, tweak some keys to support the underlying query. Test Plan: Ran `differential.revision.search` queries with the new constraints. Maniphest Tasks: T13386 Differential Revision: https://secure.phabricator.com/D20730
This commit is contained in:
parent
109d7dcaf1
commit
353155a203
2 changed files with 21 additions and 5 deletions
|
@ -51,6 +51,12 @@ final class DifferentialRevisionSearchEngine
|
|||
$map['createdEnd']);
|
||||
}
|
||||
|
||||
if ($map['modifiedStart'] || $map['modifiedEnd']) {
|
||||
$query->withUpdatedEpochBetween(
|
||||
$map['modifiedStart'],
|
||||
$map['modifiedEnd']);
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
@ -100,6 +106,18 @@ final class DifferentialRevisionSearchEngine
|
|||
->setKey('createdEnd')
|
||||
->setDescription(
|
||||
pht('Find revisions created at or before a particular time.')),
|
||||
id(new PhabricatorSearchDateField())
|
||||
->setLabel(pht('Modified After'))
|
||||
->setKey('modifiedStart')
|
||||
->setIsHidden(true)
|
||||
->setDescription(
|
||||
pht('Find revisions modified at or after a particular time.')),
|
||||
id(new PhabricatorSearchDateField())
|
||||
->setLabel(pht('Modified Before'))
|
||||
->setKey('modifiedEnd')
|
||||
->setIsHidden(true)
|
||||
->setDescription(
|
||||
pht('Find revisions modified at or before a particular time.')),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -112,11 +112,6 @@ final class DifferentialRevision extends DifferentialDAO
|
|||
'repositoryPHID' => 'phid?',
|
||||
),
|
||||
self::CONFIG_KEY_SCHEMA => array(
|
||||
'key_phid' => null,
|
||||
'phid' => array(
|
||||
'columns' => array('phid'),
|
||||
'unique' => true,
|
||||
),
|
||||
'authorPHID' => array(
|
||||
'columns' => array('authorPHID', 'status'),
|
||||
),
|
||||
|
@ -131,6 +126,9 @@ final class DifferentialRevision extends DifferentialDAO
|
|||
'key_status' => array(
|
||||
'columns' => array('status', 'phid'),
|
||||
),
|
||||
'key_modified' => array(
|
||||
'columns' => array('dateModified'),
|
||||
),
|
||||
),
|
||||
) + parent::getConfiguration();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue