1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 20:10:55 +01:00
phorge-phorge/src/applications/differential/field/DifferentialJIRAIssuesCommitMessageField.php

44 lines
930 B
PHP
Raw Normal View History

<?php
final class DifferentialJIRAIssuesCommitMessageField
extends DifferentialCommitMessageCustomField {
const FIELDKEY = 'jira.issues';
public function getFieldName() {
return pht('JIRA Issues');
}
public function getFieldAliases() {
return array(
'JIRA',
'JIRA Issue',
);
}
public function getCustomFieldKey() {
return 'phabricator:jira-issues';
}
public function parseFieldValue($value) {
return preg_split('/[\s,]+/', $value, $limit = -1, PREG_SPLIT_NO_EMPTY);
}
protected function readFieldValueFromCustomFieldStorage($value) {
return $this->readJSONFieldValueFromCustomFieldStorage($value, array());
}
public function readFieldValueFromConduit($value) {
return $this->readStringListFieldValueFromConduit($value);
}
public function renderFieldValue($value) {
if (!$value) {
return null;
}
return implode(', ', $value);
}
}