Page MenuHomePhabricator

D17070.id41059.diff
No OneTemporary

D17070.id41059.diff

diff --git a/src/applications/differential/customfield/DifferentialAuditorsField.php b/src/applications/differential/customfield/DifferentialAuditorsField.php
--- a/src/applications/differential/customfield/DifferentialAuditorsField.php
+++ b/src/applications/differential/customfield/DifferentialAuditorsField.php
@@ -16,7 +16,7 @@
}
public function getValueForStorage() {
- return json_encode($this->getValue());
+ return phutil_json_encode($this->getValue());
}
public function setValueFromStorage($value) {
@@ -28,33 +28,20 @@
return $this;
}
- public function shouldAppearInCommitMessage() {
- return true;
- }
-
- public function shouldAllowEditInCommitMessage() {
- return true;
+ public function renderEditControl(array $handles) {
+ return null;
}
public function canDisableField() {
return false;
}
- public function getRequiredHandlePHIDsForCommitMessage() {
- return nonempty($this->getValue(), array());
- }
-
- public function parseCommitMessageValue($value) {
- return $this->parseObjectList(
- $value,
- array(
- PhabricatorPeopleUserPHIDType::TYPECONST,
- PhabricatorProjectProjectPHIDType::TYPECONST,
- ));
+ public function shouldAppearInEditView() {
+ return true;
}
- public function renderCommitMessageValue(array $handles) {
- return $this->renderObjectList($handles);
+ public function shouldAppearInCommitMessage() {
+ return true;
}
public function shouldAppearInConduitTransactions() {
@@ -65,4 +52,8 @@
return new ConduitPHIDListParameterType();
}
+ public function shouldAppearInApplicationTransactions() {
+ return true;
+ }
+
}
diff --git a/src/applications/differential/field/DifferentialAuditorsCommitMessageField.php b/src/applications/differential/field/DifferentialAuditorsCommitMessageField.php
--- a/src/applications/differential/field/DifferentialAuditorsCommitMessageField.php
+++ b/src/applications/differential/field/DifferentialAuditorsCommitMessageField.php
@@ -22,6 +22,14 @@
return 'phabricator:auditors';
}
+ public function isFieldEditable() {
+ return true;
+ }
+
+ public function isTemplateField() {
+ return false;
+ }
+
public function readFieldValueFromConduit($value) {
return $this->readStringListFieldValueFromConduit($value);
}
diff --git a/src/applications/differential/field/DifferentialCommitMessageField.php b/src/applications/differential/field/DifferentialCommitMessageField.php
--- a/src/applications/differential/field/DifferentialCommitMessageField.php
+++ b/src/applications/differential/field/DifferentialCommitMessageField.php
@@ -182,7 +182,7 @@
protected function isCustomFieldEnabled($key) {
$field_list = PhabricatorCustomField::getObjectFields(
new DifferentialRevision(),
- PhabricatorCustomField::ROLE_VIEW);
+ DifferentialCustomField::ROLE_COMMITMESSAGE);
$fields = $field_list->getFields();
return isset($fields[$key]);

File Metadata

Mime Type
text/plain
Expires
Tue, Oct 22, 4:04 PM (3 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6742254
Default Alt Text
D17070.id41059.diff (2 KB)

Event Timeline