Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/storage/ManiphestTask.php
Show First 20 Lines • Show All 507 Lines • ▼ Show 20 Lines | return array( | ||||
id(new PhabricatorConduitSearchFieldSpecification()) | id(new PhabricatorConduitSearchFieldSpecification()) | ||||
->setKey('points') | ->setKey('points') | ||||
->setType('points') | ->setType('points') | ||||
->setDescription(pht('Point value of the task.')), | ->setDescription(pht('Point value of the task.')), | ||||
id(new PhabricatorConduitSearchFieldSpecification()) | id(new PhabricatorConduitSearchFieldSpecification()) | ||||
->setKey('subtype') | ->setKey('subtype') | ||||
->setType('string') | ->setType('string') | ||||
->setDescription(pht('Subtype of the task.')), | ->setDescription(pht('Subtype of the task.')), | ||||
id(new PhabricatorConduitSearchFieldSpecification()) | |||||
->setKey('closerPHID') | |||||
->setType('phid?') | |||||
->setDescription( | |||||
pht('User who closed the task, if the task is closed.')), | |||||
id(new PhabricatorConduitSearchFieldSpecification()) | |||||
->setKey('dateClosed') | |||||
->setType('int?') | |||||
->setDescription( | |||||
pht('Epoch timestamp when the task was closed.')), | |||||
); | ); | ||||
} | } | ||||
public function getFieldValuesForConduit() { | public function getFieldValuesForConduit() { | ||||
$status_value = $this->getStatus(); | $status_value = $this->getStatus(); | ||||
$status_info = array( | $status_info = array( | ||||
'value' => $status_value, | 'value' => $status_value, | ||||
'name' => ManiphestTaskStatus::getTaskStatusName($status_value), | 'name' => ManiphestTaskStatus::getTaskStatusName($status_value), | ||||
'color' => ManiphestTaskStatus::getStatusColor($status_value), | 'color' => ManiphestTaskStatus::getStatusColor($status_value), | ||||
); | ); | ||||
$priority_value = (int)$this->getPriority(); | $priority_value = (int)$this->getPriority(); | ||||
$priority_info = array( | $priority_info = array( | ||||
'value' => $priority_value, | 'value' => $priority_value, | ||||
'subpriority' => (double)$this->getSubpriority(), | 'subpriority' => (double)$this->getSubpriority(), | ||||
'name' => ManiphestTaskPriority::getTaskPriorityName($priority_value), | 'name' => ManiphestTaskPriority::getTaskPriorityName($priority_value), | ||||
'color' => ManiphestTaskPriority::getTaskPriorityColor($priority_value), | 'color' => ManiphestTaskPriority::getTaskPriorityColor($priority_value), | ||||
); | ); | ||||
$closed_epoch = $this->getClosedEpoch(); | |||||
if ($closed_epoch !== null) { | |||||
$closed_epoch = (int)$closed_epoch; | |||||
} | |||||
return array( | return array( | ||||
'name' => $this->getTitle(), | 'name' => $this->getTitle(), | ||||
'description' => array( | 'description' => array( | ||||
'raw' => $this->getDescription(), | 'raw' => $this->getDescription(), | ||||
), | ), | ||||
'authorPHID' => $this->getAuthorPHID(), | 'authorPHID' => $this->getAuthorPHID(), | ||||
'ownerPHID' => $this->getOwnerPHID(), | 'ownerPHID' => $this->getOwnerPHID(), | ||||
'status' => $status_info, | 'status' => $status_info, | ||||
'priority' => $priority_info, | 'priority' => $priority_info, | ||||
'points' => $this->getPoints(), | 'points' => $this->getPoints(), | ||||
'subtype' => $this->getSubtype(), | 'subtype' => $this->getSubtype(), | ||||
'closerPHID' => $this->getCloserPHID(), | |||||
'dateClosed' => $closed_epoch, | |||||
); | ); | ||||
} | } | ||||
public function getConduitSearchAttachments() { | public function getConduitSearchAttachments() { | ||||
return array( | return array( | ||||
id(new PhabricatorBoardColumnsSearchEngineAttachment()) | id(new PhabricatorBoardColumnsSearchEngineAttachment()) | ||||
->setAttachmentKey('columns'), | ->setAttachmentKey('columns'), | ||||
); | ); | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |