Show only recent open revisions affecting the same files
Summary: Fixes T5658. Over a long period of time, some cruft can build up here. Only show revisions which have been updated in the last 30 days. Test Plan: - Viewed panel in Differential and Diffusion. - Changed limit from 30 days to 30 seconds and saw no revisions. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T5658 Differential Revision: https://secure.phabricator.com/D12158
This commit is contained in:
@@ -192,10 +192,13 @@ abstract class DiffusionBrowseController extends DiffusionController {
|
||||
return null;
|
||||
}
|
||||
|
||||
$recent = (PhabricatorTime::getNow() - phutil_units('30 days in seconds'));
|
||||
|
||||
$revisions = id(new DifferentialRevisionQuery())
|
||||
->setViewer($user)
|
||||
->withPath($repository->getID(), $path_id)
|
||||
->withStatus(DifferentialRevisionQuery::STATUS_OPEN)
|
||||
->withUpdatedEpochBetween($recent, null)
|
||||
->setOrder(DifferentialRevisionQuery::ORDER_PATH_MODIFIED)
|
||||
->setLimit(10)
|
||||
->needRelationships(true)
|
||||
@@ -207,8 +210,13 @@ abstract class DiffusionBrowseController extends DiffusionController {
|
||||
return null;
|
||||
}
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Open Revisions'))
|
||||
->setSubheader(
|
||||
pht('Recently updated open revisions affecting this file.'));
|
||||
|
||||
$view = id(new DifferentialRevisionListView())
|
||||
->setHeader(pht('Pending Differential Revisions'))
|
||||
->setHeader($header)
|
||||
->setRevisions($revisions)
|
||||
->setUser($user);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user