Allow columns to have a point limit

Summary:
Fixes T5885. This implements optional soft point limits for workboard columns, per traditional Kanban.

  - Allow columns to have a point limit set.
  - When a column has a point limit, show it in the header.
  - If a column has too many points in it, show the column and point count in red.

@chad, this could probably use some design tweaks. In particular:

  - I changed the color of "hidden" columns to avoid confusion with "overfull" columns. We might be able to find a better color.
  - UI hints for overfull columns might need adjustment.

(After T4427, we'll let you sum some custom field instead of total number of tasks, which is why this is called "points" rather than "number of tasks".)

Test Plan:
{F190914}

Note that:

  - "Pre-planning" has a limit, so it shows "4/12".
  - "Planning" has a limit and is overfull, so it shows "5 / 4".
  - Other columns do not have limits.
  - "Post-planning" is a hidden column. This might be too muted now.

Transactions:

{F190915}

Error messages / edit screen:

{F190916}

Reviewers: btrahan, chad

Reviewed By: btrahan

Subscribers: chad, epriestley

Maniphest Tasks: T5885

Differential Revision: https://secure.phabricator.com/D10276
This commit is contained in:
epriestley
2014-08-15 11:16:08 -07:00
parent eaacb4a511
commit 300910f462
12 changed files with 178 additions and 43 deletions

View File

@@ -225,7 +225,16 @@ final class PhabricatorProjectBoardViewController
$panel = id(new PHUIWorkpanelView())
->setHeader($column->getDisplayName())
->setHeaderColor($column->getHeaderColor());
->addSigil('workpanel');
$header_icon = $column->getHeaderIcon();
if ($header_icon) {
$panel->setHeaderIcon($header_icon);
}
if ($column->isHidden()) {
$panel->addClass('project-panel-hidden');
}
$column_menu = $this->buildColumnMenu($project, $column);
$panel->addHeaderAction($column_menu);
@@ -252,6 +261,7 @@ final class PhabricatorProjectBoardViewController
'columnPHID' => $column->getPHID(),
'countTagID' => $tag_id,
'countTagContentID' => $tag_content_id,
'pointLimit' => $column->getPointLimit(),
));
foreach ($column_tasks as $task) {
@@ -268,11 +278,6 @@ final class PhabricatorProjectBoardViewController
->getItem());
}
$panel->setCards($cards);
if (!$column_tasks) {
$cards->addClass('project-column-empty');
}
$board->addPanel($panel);
}