Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13988804
D17070.id41059.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D17070.id41059.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D17070: Simplify Auditors custom field in Differential
Attached
Detach File
Event Timeline
Log In to Comment