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

Hide archived projects only on workboards, not hovercards

Summary:
See PHI225. Previously, see D15335 / T10413. On workboards, we hide archived project tags since they aren't terribly useful in that context, at least most of the time. Originally, see T10349#159916 and D15297.

However, hovercards reuse this display logic, and it's inconsistent/confusing to hide them there, since the actual "Tags" elements on task pages show them. Narrow the scope of this rule.

Test Plan:
- Viewed a hovercard for a task with an archived project tagged, saw archived project.
- Viewed a workboard for the same task, saw only unarchived projects other than the current board tagged (this behavior is unchanged).

Reviewers: amckinley

Reviewed By: amckinley

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

+19 -5
+3 -1
src/applications/project/engine/PhabricatorBoardRenderingEngine.php
··· 67 67 $project_phids = $object->getProjectPHIDs(); 68 68 $project_handles = array_select_keys($this->handles, $project_phids); 69 69 if ($project_handles) { 70 - $card->setProjectHandles($project_handles); 70 + $card 71 + ->setHideArchivedProjects(true) 72 + ->setProjectHandles($project_handles); 71 73 } 72 74 73 75 $cover_phid = $object->getCoverImageThumbnailPHID();
+16 -4
src/applications/project/view/ProjectBoardTaskCard.php
··· 8 8 private $owner; 9 9 private $canEdit; 10 10 private $coverImageFile; 11 + private $hideArchivedProjects; 11 12 12 13 public function setViewer(PhabricatorUser $viewer) { 13 14 $this->viewer = $viewer; ··· 33 34 34 35 public function getCoverImageFile() { 35 36 return $this->coverImageFile; 37 + } 38 + 39 + public function setHideArchivedProjects($hide_archived_projects) { 40 + $this->hideArchivedProjects = $hide_archived_projects; 41 + return $this; 42 + } 43 + 44 + public function getHideArchivedProjects() { 45 + return $this->hideArchivedProjects; 36 46 } 37 47 38 48 public function setTask(ManiphestTask $task) { ··· 126 136 $project_handles = $this->getProjectHandles(); 127 137 128 138 // Remove any archived projects from the list. 129 - if ($project_handles) { 130 - foreach ($project_handles as $key => $handle) { 131 - if ($handle->getStatus() == PhabricatorObjectHandle::STATUS_CLOSED) { 132 - unset($project_handles[$key]); 139 + if ($this->hideArchivedProjects) { 140 + if ($project_handles) { 141 + foreach ($project_handles as $key => $handle) { 142 + if ($handle->getStatus() == PhabricatorObjectHandle::STATUS_CLOSED) { 143 + unset($project_handles[$key]); 144 + } 133 145 } 134 146 } 135 147 }