Differential D17440 Diff 41937 src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php
Show First 20 Lines • Show All 291 Lines • ▼ Show 20 Lines | To activate points, set this value to a map with these keys: | ||||
- `action` //Optional string.// Label for the action which changes points | - `action` //Optional string.// Label for the action which changes points | ||||
in Maniphest, like "Change Estimate". If omitted, the action will | in Maniphest, like "Change Estimate". If omitted, the action will | ||||
be called "Change Points". | be called "Change Points". | ||||
See the example below for a starting point. | See the example below for a starting point. | ||||
EOTEXT | EOTEXT | ||||
)); | )); | ||||
$subtype_type = 'custom:ManiphestSubtypesConfigOptionsType'; | |||||
$subtype_default_key = PhabricatorEditEngineSubtype::SUBTYPE_DEFAULT; | |||||
$subtype_example = array( | |||||
array( | |||||
'key' => $subtype_default_key, | |||||
'name' => pht('Task'), | |||||
), | |||||
array( | |||||
'key' => 'bug', | |||||
'name' => pht('Bug'), | |||||
), | |||||
array( | |||||
'key' => 'feature', | |||||
'name' => pht('Feature Request'), | |||||
), | |||||
); | |||||
$subtype_example = id(new PhutilJSON())->encodeAsList($subtype_example); | |||||
$subtype_default = array( | |||||
array( | |||||
'key' => $subtype_default_key, | |||||
'name' => pht('Task'), | |||||
), | |||||
); | |||||
$subtype_description = $this->deformat(pht(<<<EOTEXT | |||||
Allows you to define task subtypes. Subtypes let you hide fields you don't | |||||
need to simplify the workflows for editing tasks. | |||||
To define subtypes, provide a list of subtypes. Each subtype should be a | |||||
dictionary with these keys: | |||||
- `key` //Required string.// Internal identifier for the subtype, like | |||||
"task", "feature", or "bug". | |||||
- `name` //Required string.// Human-readable name for this subtype, like | |||||
"Task", "Feature Request" or "Bug Report". | |||||
Each subtype must have a unique key, and you must define a subtype with | |||||
the key "%s", which is used as a default subtype. | |||||
EOTEXT | |||||
, | |||||
$subtype_default_key)); | |||||
return array( | return array( | ||||
$this->newOption('maniphest.custom-field-definitions', 'wild', array()) | $this->newOption('maniphest.custom-field-definitions', 'wild', array()) | ||||
->setSummary(pht('Custom Maniphest fields.')) | ->setSummary(pht('Custom Maniphest fields.')) | ||||
->setDescription( | ->setDescription( | ||||
pht( | pht( | ||||
'Array of custom fields for Maniphest tasks. For details on '. | 'Array of custom fields for Maniphest tasks. For details on '. | ||||
'adding custom fields to Maniphest, see "Configuring Custom '. | 'adding custom fields to Maniphest, see "Configuring Custom '. | ||||
'Fields" in the documentation.')) | 'Fields" in the documentation.')) | ||||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | return array( | ||||
'string', | 'string', | ||||
'[Maniphest]') | '[Maniphest]') | ||||
->setDescription(pht('Subject prefix for Maniphest mail.')), | ->setDescription(pht('Subject prefix for Maniphest mail.')), | ||||
$this->newOption('maniphest.points', $points_type, array()) | $this->newOption('maniphest.points', $points_type, array()) | ||||
->setSummary(pht('Configure point values for tasks.')) | ->setSummary(pht('Configure point values for tasks.')) | ||||
->setDescription($points_description) | ->setDescription($points_description) | ||||
->addExample($points_json_1, pht('Points Config')) | ->addExample($points_json_1, pht('Points Config')) | ||||
->addExample($points_json_2, pht('Hours Config')), | ->addExample($points_json_2, pht('Hours Config')), | ||||
$this->newOption('maniphest.subtypes', $subtype_type, $subtype_default) | |||||
->setSummary(pht('Define task subtypes.')) | |||||
->setDescription($subtype_description) | |||||
->addExample($subtype_example, pht('Simple Subtypes')), | |||||
); | ); | ||||
} | } | ||||
} | } |