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

Fix a fatal in the "Projects" curtain extension when a project edge connects an object to a non-project

Summary:
Ref T13429. It's currently possible to write "TYPE_EDGE" relationships for the "object has project" edge to PHIDs which may not actually be projects. Today, this fatals.

As a first step, unfatal it. T13429 discusses general improvements and greater context.

Test Plan:
Used "maniphest.edit" to write a "project" edge to a user PHID, viewed the task in the UI. Previously it fataled; now it renders unusually (the object is "tagged" with a user) but faithfully reflects database state.

{F6957606}

Maniphest Tasks: T13429

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

+13 -1
+2
src/__phutil_library_map__.php
··· 5044 5044 'PhabricatorWeekStartDaySetting' => 'applications/settings/setting/PhabricatorWeekStartDaySetting.php', 5045 5045 'PhabricatorWildConfigType' => 'applications/config/type/PhabricatorWildConfigType.php', 5046 5046 'PhabricatorWordPressAuthProvider' => 'applications/auth/provider/PhabricatorWordPressAuthProvider.php', 5047 + 'PhabricatorWorkboardInterface' => 'applications/project/interface/PhabricatorWorkboardInterface.php', 5047 5048 'PhabricatorWorkboardViewState' => 'applications/project/state/PhabricatorWorkboardViewState.php', 5048 5049 'PhabricatorWorker' => 'infrastructure/daemon/workers/PhabricatorWorker.php', 5049 5050 'PhabricatorWorkerActiveTask' => 'infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php', ··· 10748 10749 'PhabricatorColumnProxyInterface', 10749 10750 'PhabricatorSpacesInterface', 10750 10751 'PhabricatorEditEngineSubtypeInterface', 10752 + 'PhabricatorWorkboardInterface', 10751 10753 ), 10752 10754 'PhabricatorProjectActivityChartEngine' => 'PhabricatorChartEngine', 10753 10755 'PhabricatorProjectAddHeraldAction' => 'PhabricatorProjectHeraldAction',
+6
src/applications/project/engine/PhabricatorBoardLayoutEngine.php
··· 301 301 ->execute(); 302 302 $boards = mpull($boards, null, 'getPHID'); 303 303 304 + foreach ($boards as $key => $board) { 305 + if (!($board instanceof PhabricatorWorkboardInterface)) { 306 + unset($boards[$key]); 307 + } 308 + } 309 + 304 310 if (!$this->fetchAllBoards) { 305 311 foreach ($boards as $key => $board) { 306 312 if (!$board->getHasWorkboard()) {
+3
src/applications/project/interface/PhabricatorWorkboardInterface.php
··· 1 + <?php 2 + 3 + interface PhabricatorWorkboardInterface {}
+2 -1
src/applications/project/storage/PhabricatorProject.php
··· 13 13 PhabricatorConduitResultInterface, 14 14 PhabricatorColumnProxyInterface, 15 15 PhabricatorSpacesInterface, 16 - PhabricatorEditEngineSubtypeInterface { 16 + PhabricatorEditEngineSubtypeInterface, 17 + PhabricatorWorkboardInterface { 17 18 18 19 protected $name; 19 20 protected $status = PhabricatorProjectStatus::STATUS_ACTIVE;