1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 11:22:40 +01:00
phorge-phorge/src/applications/maniphest/herald/ManiphestTaskPriorityHeraldField.php
epriestley 97ccd93670 Support "Select" custom fields in Herald rules
Summary: Fixes T5016. Ref T655. Ref T8434. Ref T8726. For "select" custom fields, permit construction of Herald rules.

Test Plan: {F602997}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T655, T5016, T8434, T8726

Differential Revision: https://secure.phabricator.com/D13618
2015-07-16 14:12:54 -07:00

28 lines
584 B
PHP

<?php
final class ManiphestTaskPriorityHeraldField
extends ManiphestTaskHeraldField {
const FIELDCONST = 'taskpriority';
public function getHeraldFieldName() {
return pht('Priority');
}
public function getHeraldFieldValue($object) {
return $object->getPriority();
}
protected function getHeraldFieldStandardType() {
return self::STANDARD_PHID;
}
protected function getDatasource() {
return new ManiphestTaskPriorityDatasource();
}
protected function getDatasourceValueMap() {
return ManiphestTaskPriority::getTaskPriorityMap();
}
}