Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/storage/ManiphestTask.php
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | final class ManiphestTask extends ManiphestDAO | ||||
protected function getConfiguration() { | protected function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_SERIALIZATION => array( | self::CONFIG_SERIALIZATION => array( | ||||
'properties' => self::SERIALIZATION_JSON, | 'properties' => self::SERIALIZATION_JSON, | ||||
), | ), | ||||
self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
'ownerPHID' => 'phid?', | 'ownerPHID' => 'phid?', | ||||
'status' => 'text12', | 'status' => 'text64', | ||||
'priority' => 'uint32', | 'priority' => 'uint32', | ||||
'title' => 'sort', | 'title' => 'sort', | ||||
'originalTitle' => 'text', | 'originalTitle' => 'text', | ||||
'description' => 'text', | 'description' => 'text', | ||||
'mailKey' => 'bytes20', | 'mailKey' => 'bytes20', | ||||
'ownerOrdering' => 'text64?', | 'ownerOrdering' => 'text64?', | ||||
'originalEmailSource' => 'text255?', | 'originalEmailSource' => 'text255?', | ||||
'subpriority' => 'double', | 'subpriority' => 'double', | ||||
▲ Show 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | return array( | ||||
PhabricatorProjectColumn::ORDER_PRIORITY => array( | PhabricatorProjectColumn::ORDER_PRIORITY => array( | ||||
(int)-$this->getPriority(), | (int)-$this->getPriority(), | ||||
(double)-$this->getSubpriority(), | (double)-$this->getSubpriority(), | ||||
(int)-$this->getID(), | (int)-$this->getID(), | ||||
), | ), | ||||
); | ); | ||||
} | } | ||||
public function getPriorityKeyword() { | |||||
$priority = $this->getPriority(); | |||||
$map = ManiphestTaskPriority::getTaskPriorityKeywordsMap(); | |||||
$default = array(ManiphestTaskPriority::UNKNOWN_PRIORITY_KEYWORD); | |||||
$keywords = idx($map, $priority, $default); | |||||
return head($keywords); | |||||
} | |||||
private function comparePriorityTo(ManiphestTask $other) { | private function comparePriorityTo(ManiphestTask $other) { | ||||
$upri = $this->getPriority(); | $upri = $this->getPriority(); | ||||
$vpri = $other->getPriority(); | $vpri = $other->getPriority(); | ||||
if ($upri != $vpri) { | if ($upri != $vpri) { | ||||
return ($upri - $vpri); | return ($upri - $vpri); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 340 Lines • Show Last 20 Lines |