1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 20:40:56 +01:00

Maniphest / Workboards - show workboard column when adding a project to a task

Summary: Fixes T6471. This makes adding projects to tasks have better workflow towards boards; without it, you have to click project -> board -> do stuff on board as opposed to column -> do stuff on board.

Test Plan: added and removed projets. saw column listed parenthetcally when expected

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6471

Differential Revision: https://secure.phabricator.com/D11260
This commit is contained in:
Bob Trahan 2015-01-09 11:12:21 -08:00
parent 152072fc97
commit 11a20079ef

View file

@ -54,12 +54,23 @@ final class PhabricatorProjectUIEventListener
require_celerity_resource('maniphest-task-summary-css');
$positions = id(new PhabricatorProjectColumnPositionQuery())
$positions_query = id(new PhabricatorProjectColumnPositionQuery())
->setViewer($user)
->withBoardPHIDs($project_phids)
->withObjectPHIDs(array($object->getPHID()))
->needColumns(true)
->needColumns(true);
// This is important because positions will be created "on demand"
// based on the set of columns. If we don't specify it, positions
// won't be created.
$columns = id(new PhabricatorProjectColumnQuery())
->setViewer($user)
->withProjectPHIDs($project_phids)
->execute();
if ($columns) {
$positions_query->withColumns($columns);
}
$positions = $positions_query->execute();
$positions = mpull($positions, null, 'getBoardPHID');
foreach ($project_phids as $project_phid) {