@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Split Revisions Waiting On You

Summary: Revisions you should review usually require faster response than revisions you should update or commit.

Test Plan:
/
/differential/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4606

vrana 3a3ab08a 52104a4b

+33 -17
+5 -4
src/applications/differential/application/PhabricatorApplicationDifferential.php
··· 73 73 ->withStatus(DifferentialRevisionQuery::STATUS_OPEN) 74 74 ->execute(); 75 75 76 - list($active, $waiting) = DifferentialRevisionQuery::splitResponsible( 77 - $revisions, 78 - array($user->getPHID())); 76 + list($blocking, $active, $waiting) = 77 + DifferentialRevisionQuery::splitResponsible( 78 + $revisions, 79 + array($user->getPHID())); 79 80 80 81 $status = array(); 81 82 82 - $active = count($active); 83 + $active = count($blocking) + count($active); 83 84 $type = $active 84 85 ? PhabricatorApplicationStatusView::TYPE_NEEDS_ATTENTION 85 86 : PhabricatorApplicationStatusView::TYPE_EMPTY;
+13 -3
src/applications/differential/controller/DifferentialRevisionListController.php
··· 435 435 $views = array(); 436 436 switch ($filter) { 437 437 case 'active': 438 - list($active, $waiting) = DifferentialRevisionQuery::splitResponsible( 439 - $revisions, 440 - $user_phids); 438 + list($blocking, $active, $waiting) = 439 + DifferentialRevisionQuery::splitResponsible( 440 + $revisions, 441 + $user_phids); 442 + 443 + $view = id(clone $template) 444 + ->setHighlightAge(true) 445 + ->setRevisions($blocking) 446 + ->loadAssets(); 447 + $views[] = array( 448 + 'title' => pht('Blocking Others'), 449 + 'view' => $view, 450 + ); 441 451 442 452 $view = id(clone $template) 443 453 ->setHighlightAge(true)
+10 -5
src/applications/differential/query/DifferentialRevisionQuery.php
··· 892 892 } 893 893 894 894 public static function splitResponsible(array $revisions, array $user_phids) { 895 + $blocking = array(); 895 896 $active = array(); 896 897 $waiting = array(); 897 898 $status_review = ArcanistDifferentialRevisionStatus::NEEDS_REVIEW; 898 899 899 - // Bucket revisions into $active (revisions you need to do something 900 - // about) and $waiting (revisions you're waiting on someone else to do 901 - // something about). 900 + // Bucket revisions into $blocking (revisions where you are blocking 901 + // others), $active (revisions you need to do something about) and $waiting 902 + // (revisions you're waiting on someone else to do something about). 902 903 foreach ($revisions as $revision) { 903 904 $needs_review = ($revision->getStatus() == $status_review); 904 905 $filter_is_author = in_array($revision->getAuthorPHID(), $user_phids); ··· 907 908 // true, the user needs to act on it. Otherwise, they're waiting on 908 909 // it. 909 910 if ($needs_review ^ $filter_is_author) { 910 - $active[] = $revision; 911 + if ($needs_review) { 912 + $blocking[] = $revision; 913 + } else { 914 + $active[] = $revision; 915 + } 911 916 } else { 912 917 $waiting[] = $revision; 913 918 } 914 919 } 915 920 916 - return array($active, $waiting); 921 + return array($blocking, $active, $waiting); 917 922 } 918 923 919 924
+5 -5
src/applications/directory/controller/PhabricatorDirectoryMainController.php
··· 183 183 $revision_query->setLimit(null); 184 184 $revisions = $revision_query->execute(); 185 185 186 - list($active, $waiting) = DifferentialRevisionQuery::splitResponsible( 187 - $revisions, 188 - array($user_phid)); 186 + list($blocking, $active, ) = DifferentialRevisionQuery::splitResponsible( 187 + $revisions, 188 + array($user_phid)); 189 189 190 - if (!$active) { 190 + if (!$blocking && !$active) { 191 191 return $this->renderMiniPanel( 192 192 'No Waiting Revisions', 193 193 'No revisions are waiting on you.'); ··· 208 208 209 209 $revision_view = id(new DifferentialRevisionListView()) 210 210 ->setHighlightAge(true) 211 - ->setRevisions($active) 211 + ->setRevisions(array_merge($blocking, $active)) 212 212 ->setFields(DifferentialRevisionListView::getDefaultFields()) 213 213 ->setUser($user) 214 214 ->loadAssets();