@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.

Clarify Tasks listed on Project Profiles

Summary: Fixes T6772. Adds additional checks and language. Happy to tweak language.

Test Plan: Test a Project with 3, 10, and 11 tasks.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6772

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

+15 -5
+15 -5
src/applications/project/controller/PhabricatorProjectProfileController.php
··· 137 137 private function renderTasksPage(PhabricatorProject $project) { 138 138 139 139 $user = $this->getRequest()->getUser(); 140 + $limit = 10; 140 141 141 142 $query = id(new ManiphestTaskQuery()) 142 143 ->setViewer($user) ··· 144 145 ->withStatuses(ManiphestTaskStatus::getOpenStatusConstants()) 145 146 ->setOrderBy(ManiphestTaskQuery::ORDER_PRIORITY) 146 147 ->needProjectPHIDs(true) 147 - ->setLimit(10); 148 + ->setLimit(($limit + 1)); 148 149 $tasks = $query->execute(); 150 + $count = count($tasks); 151 + if ($count == ($limit + 1)) { 152 + array_pop($tasks); 153 + } 149 154 150 155 $phids = mpull($tasks, 'getOwnerPHID'); 151 156 $phids = array_merge( ··· 180 185 ->setHref($create_uri) 181 186 ->setIcon($icon_new); 182 187 183 - $header = id(new PHUIHeaderView()) 184 - ->setHeader(pht('Open Tasks')) 185 - ->addActionLink($button_add) 186 - ->addActionLink($button_view); 188 + $header = id(new PHUIHeaderView()) 189 + ->addActionLink($button_add) 190 + ->addActionLink($button_view); 191 + 192 + if ($count > $limit) { 193 + $header->setHeader(pht('Highest Priority (some)')); 194 + } else { 195 + $header->setHeader(pht('Highest Priority (all)')); 196 + } 187 197 188 198 $content = id(new PHUIObjectBoxView()) 189 199 ->setHeader($header)