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

Do not buildQueryFromSavedQuery() on non-existing workboards

Summary:
This is a waste of CPU cycles.

Closes T16247

Test Plan:
* Insert `phlog('WE DO NOT WANT TO BE HERE');` at the beginning of `PhabricatorApplicationSearchEngine::buildQueryFromSavedQuery()`
* Go to the workboard view of a project which has no workboard set up yet
* See that phlog output is emitted before this patch when loading a non-existing workboard, and not emitted after this patch
* Load existing and non-existing workboards of projects, subprojects, and milestones, and see no differences in behavior

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16247

Differential Revision: https://we.phorge.it/D26461

+7 -3
+7 -3
src/applications/project/controller/PhabricatorProjectBoardViewController.php
··· 35 35 $custom_query = null; 36 36 } 37 37 38 - $layout_engine = $state->getLayoutEngine(); 38 + $columns = array(); 39 + $board_phid = $project->getPHID(); 39 40 40 - $board_phid = $project->getPHID(); 41 - $columns = $layout_engine->getColumns($board_phid); 41 + if ($project->getHasWorkboard()) { 42 + $layout_engine = $state->getLayoutEngine(); 43 + $columns = $layout_engine->getColumns($board_phid); 44 + } 45 + 42 46 if (!$columns || !$project->getHasWorkboard()) { 43 47 $has_normal_columns = false; 44 48