@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 some issue with "Move on Workboard" and workboard-less or invisible projects

Summary:
Ref T6027. Fixes T10734.

- If one of the projects a task is tagged with isn't visible to the user or doesn't have a board, it won't have columns.
- Don't show options for projects with disabled boards.

Test Plan:
- Viewed task with project with no columns; no fatal.
- Viewed task with project with disabled board; no options to move on that board.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10734, T6027

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

+9 -2
+9 -2
src/applications/maniphest/editor/ManiphestEditEngine.php
··· 394 394 ->setViewer($viewer) 395 395 ->setBoardPHIDs($board_phids) 396 396 ->setObjectPHIDs(array($task->getPHID())) 397 - ->setFetchAllBoards(true) 398 397 ->executeLayout(); 399 398 400 399 $map = array(); ··· 403 402 $in_columns = mpull($in_columns, null, 'getPHID'); 404 403 405 404 $all_columns = $layout_engine->getColumns($board_phid); 405 + if (!$all_columns) { 406 + // This could be a project with no workboard, or a project the viewer 407 + // does not have permission to see. 408 + continue; 409 + } 410 + 411 + $board = head($all_columns)->getProject(); 412 + 406 413 $options = array(); 407 414 foreach ($all_columns as $column) { 408 415 $name = $column->getDisplayName(); ··· 439 446 } 440 447 441 448 $map[] = array( 442 - 'label' => head($all_columns)->getProject()->getDisplayName(), 449 + 'label' => $board->getDisplayName(), 443 450 'options' => $options, 444 451 ); 445 452 }