Add date range filtering for activity, push, and pull logs

Summary: Ref T13049. This is just a general nice-to-have so you don't have to export a 300MB file if you want to check the last month of data or whatever.

Test Plan: Applied filters to all three logs, got appropriate date-range result sets.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13049

Differential Revision: https://secure.phabricator.com/D18970
This commit is contained in:
epriestley
2018-01-30 11:47:55 -08:00
parent 0d5379ee17
commit 75bc86589f
7 changed files with 105 additions and 0 deletions

View File

@@ -26,6 +26,12 @@ final class PhabricatorRepositoryPushLogSearchEngine
$query->withPusherPHIDs($map['pusherPHIDs']);
}
if ($map['createdStart'] || $map['createdEnd']) {
$query->withEpochBetween(
$map['createdStart'],
$map['createdEnd']);
}
return $query;
}
@@ -44,6 +50,12 @@ final class PhabricatorRepositoryPushLogSearchEngine
->setLabel(pht('Pushers'))
->setDescription(
pht('Search for pull logs by specific users.')),
id(new PhabricatorSearchDateField())
->setLabel(pht('Created After'))
->setKey('createdStart'),
id(new PhabricatorSearchDateField())
->setLabel(pht('Created Before'))
->setKey('createdEnd'),
);
}