Summary: Fixes T5476. Using edges to store which objects are on which board columns ends up being pretty awkward. In particular, it makes T4807 very difficult to implement. Introduce a dedicated `BoardColumnPosition` storage. This doesn't affect ordering rules (T4807) yet: boards are still arranged by priority. We just read which tasks are on which columns out of a new table. Test Plan: - Migrated data, then viewed some boards. Saw exactly the same data. - Dragged tasks from column to column. - Created a task directly into a column. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T5476 Differential Revision: https://secure.phabricator.com/D10160
52 lines
1.1 KiB
PHP
52 lines
1.1 KiB
PHP
<?php
|
|
|
|
final class PhabricatorProjectColumnPosition extends PhabricatorProjectDAO
|
|
implements PhabricatorPolicyInterface {
|
|
|
|
protected $boardPHID;
|
|
protected $columnPHID;
|
|
protected $objectPHID;
|
|
protected $sequence;
|
|
|
|
private $column = self::ATTACHABLE;
|
|
|
|
public function getConfiguration() {
|
|
return array(
|
|
self::CONFIG_TIMESTAMPS => false,
|
|
) + parent::getConfiguration();
|
|
}
|
|
|
|
public function getColumn() {
|
|
return $this->assertAttached($this->column);
|
|
}
|
|
|
|
public function attachColumn(PhabricatorProjectColumn $column) {
|
|
$this->column = $column;
|
|
return $this;
|
|
}
|
|
|
|
/* -( PhabricatorPolicyInterface )----------------------------------------- */
|
|
|
|
public function getCapabilities() {
|
|
return array(
|
|
PhabricatorPolicyCapability::CAN_VIEW,
|
|
);
|
|
}
|
|
|
|
public function getPolicy($capability) {
|
|
switch ($capability) {
|
|
case PhabricatorPolicyCapability::CAN_VIEW:
|
|
return PhabricatorPolicies::getMostOpenPolicy();
|
|
}
|
|
}
|
|
|
|
public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {
|
|
return false;
|
|
}
|
|
|
|
public function describeAutomaticCapability($capability) {
|
|
return null;
|
|
}
|
|
|
|
}
|