Page MenuHomePhabricator

D13619.id32904.diff
No OneTemporary

D13619.id32904.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -381,7 +381,7 @@
'rsrc/js/application/doorkeeper/behavior-doorkeeper-tag.js' => 'e5822781',
'rsrc/js/application/files/behavior-icon-composer.js' => '8ef9ab58',
'rsrc/js/application/files/behavior-launch-icon-composer.js' => '48086888',
- 'rsrc/js/application/herald/HeraldRuleEditor.js' => '6c2dffcc',
+ 'rsrc/js/application/herald/HeraldRuleEditor.js' => '52684226',
'rsrc/js/application/herald/PathTypeahead.js' => 'f7fc67ec',
'rsrc/js/application/herald/herald-rule-editor.js' => '7ebaeed3',
'rsrc/js/application/maniphest/behavior-batch-editor.js' => '782ab6e7',
@@ -537,7 +537,7 @@
'global-drag-and-drop-css' => '697324ad',
'harbormaster-css' => '49d64eb4',
'herald-css' => '826075fa',
- 'herald-rule-editor' => '6c2dffcc',
+ 'herald-rule-editor' => '52684226',
'herald-test-css' => '778b008e',
'inline-comment-summary-css' => '51efda3a',
'javelin-aphlict' => '5359e785',
@@ -1170,6 +1170,15 @@
'javelin-dom',
'javelin-reactor-dom',
),
+ 52684226 => array(
+ 'multirow-row-manager',
+ 'javelin-install',
+ 'javelin-util',
+ 'javelin-dom',
+ 'javelin-stratcom',
+ 'javelin-json',
+ 'phabricator-prefab',
+ ),
'5359e785' => array(
'javelin-install',
'javelin-util',
@@ -1336,15 +1345,6 @@
'javelin-install',
'javelin-util',
),
- '6c2dffcc' => array(
- 'multirow-row-manager',
- 'javelin-install',
- 'javelin-util',
- 'javelin-dom',
- 'javelin-stratcom',
- 'javelin-json',
- 'phabricator-prefab',
- ),
'6c53634d' => array(
'javelin-install',
'javelin-event',
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -304,6 +304,7 @@
'DifferentialAuthorField' => 'applications/differential/customfield/DifferentialAuthorField.php',
'DifferentialBlameRevisionField' => 'applications/differential/customfield/DifferentialBlameRevisionField.php',
'DifferentialBranchField' => 'applications/differential/customfield/DifferentialBranchField.php',
+ 'DifferentialChangeHeraldFieldGroup' => 'applications/differential/herald/DifferentialChangeHeraldFieldGroup.php',
'DifferentialChangeType' => 'applications/differential/constants/DifferentialChangeType.php',
'DifferentialChangesSinceLastUpdateField' => 'applications/differential/customfield/DifferentialChangesSinceLastUpdateField.php',
'DifferentialChangeset' => 'applications/differential/storage/DifferentialChangeset.php',
@@ -359,6 +360,7 @@
'DifferentialDiffCreateController' => 'applications/differential/controller/DifferentialDiffCreateController.php',
'DifferentialDiffEditor' => 'applications/differential/editor/DifferentialDiffEditor.php',
'DifferentialDiffHeraldField' => 'applications/differential/herald/DifferentialDiffHeraldField.php',
+ 'DifferentialDiffHeraldFieldGroup' => 'applications/differential/herald/DifferentialDiffHeraldFieldGroup.php',
'DifferentialDiffInlineCommentQuery' => 'applications/differential/query/DifferentialDiffInlineCommentQuery.php',
'DifferentialDiffPHIDType' => 'applications/differential/phid/DifferentialDiffPHIDType.php',
'DifferentialDiffProperty' => 'applications/differential/storage/DifferentialDiffProperty.php',
@@ -452,6 +454,7 @@
'DifferentialRevisionHasReviewerEdgeType' => 'applications/differential/edge/DifferentialRevisionHasReviewerEdgeType.php',
'DifferentialRevisionHasTaskEdgeType' => 'applications/differential/edge/DifferentialRevisionHasTaskEdgeType.php',
'DifferentialRevisionHeraldField' => 'applications/differential/herald/DifferentialRevisionHeraldField.php',
+ 'DifferentialRevisionHeraldFieldGroup' => 'applications/differential/herald/DifferentialRevisionHeraldFieldGroup.php',
'DifferentialRevisionIDField' => 'applications/differential/customfield/DifferentialRevisionIDField.php',
'DifferentialRevisionLandController' => 'applications/differential/controller/DifferentialRevisionLandController.php',
'DifferentialRevisionListController' => 'applications/differential/controller/DifferentialRevisionListController.php',
@@ -503,6 +506,7 @@
'DiffusionBrowseTableView' => 'applications/diffusion/view/DiffusionBrowseTableView.php',
'DiffusionCachedResolveRefsQuery' => 'applications/diffusion/query/DiffusionCachedResolveRefsQuery.php',
'DiffusionChangeController' => 'applications/diffusion/controller/DiffusionChangeController.php',
+ 'DiffusionChangeHeraldFieldGroup' => 'applications/diffusion/herald/DiffusionChangeHeraldFieldGroup.php',
'DiffusionCommitAffectedFilesHeraldField' => 'applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php',
'DiffusionCommitAuthorHeraldField' => 'applications/diffusion/herald/DiffusionCommitAuthorHeraldField.php',
'DiffusionCommitAutocloseHeraldField' => 'applications/diffusion/herald/DiffusionCommitAutocloseHeraldField.php',
@@ -520,6 +524,7 @@
'DiffusionCommitHasTaskEdgeType' => 'applications/diffusion/edge/DiffusionCommitHasTaskEdgeType.php',
'DiffusionCommitHash' => 'applications/diffusion/data/DiffusionCommitHash.php',
'DiffusionCommitHeraldField' => 'applications/diffusion/herald/DiffusionCommitHeraldField.php',
+ 'DiffusionCommitHeraldFieldGroup' => 'applications/diffusion/herald/DiffusionCommitHeraldFieldGroup.php',
'DiffusionCommitHookEngine' => 'applications/diffusion/engine/DiffusionCommitHookEngine.php',
'DiffusionCommitHookRejectException' => 'applications/diffusion/exception/DiffusionCommitHookRejectException.php',
'DiffusionCommitMessageHeraldField' => 'applications/diffusion/herald/DiffusionCommitMessageHeraldField.php',
@@ -640,6 +645,7 @@
'DiffusionPreCommitContentRevisionSubscribersHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php',
'DiffusionPreCommitRefChangeHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefChangeHeraldField.php',
'DiffusionPreCommitRefHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefHeraldField.php',
+ 'DiffusionPreCommitRefHeraldFieldGroup' => 'applications/diffusion/herald/DiffusionPreCommitRefHeraldFieldGroup.php',
'DiffusionPreCommitRefNameHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefNameHeraldField.php',
'DiffusionPreCommitRefPusherHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefPusherHeraldField.php',
'DiffusionPreCommitRefPusherProjectsHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefPusherProjectsHeraldField.php',
@@ -1006,6 +1012,7 @@
'HeraldAlwaysField' => 'applications/herald/field/HeraldAlwaysField.php',
'HeraldAnotherRuleField' => 'applications/herald/field/HeraldAnotherRuleField.php',
'HeraldApplyTranscript' => 'applications/herald/storage/transcript/HeraldApplyTranscript.php',
+ 'HeraldBasicFieldGroup' => 'applications/herald/field/HeraldBasicFieldGroup.php',
'HeraldCommitAdapter' => 'applications/diffusion/herald/HeraldCommitAdapter.php',
'HeraldCondition' => 'applications/herald/storage/HeraldCondition.php',
'HeraldConditionTranscript' => 'applications/herald/storage/transcript/HeraldConditionTranscript.php',
@@ -1017,10 +1024,12 @@
'HeraldDifferentialDiffAdapter' => 'applications/differential/herald/HeraldDifferentialDiffAdapter.php',
'HeraldDifferentialRevisionAdapter' => 'applications/differential/herald/HeraldDifferentialRevisionAdapter.php',
'HeraldDisableController' => 'applications/herald/controller/HeraldDisableController.php',
+ 'HeraldEditFieldGroup' => 'applications/herald/field/HeraldEditFieldGroup.php',
'HeraldEffect' => 'applications/herald/engine/HeraldEffect.php',
'HeraldEmptyFieldValue' => 'applications/herald/value/HeraldEmptyFieldValue.php',
'HeraldEngine' => 'applications/herald/engine/HeraldEngine.php',
'HeraldField' => 'applications/herald/field/HeraldField.php',
+ 'HeraldFieldGroup' => 'applications/herald/field/HeraldFieldGroup.php',
'HeraldFieldTestCase' => 'applications/herald/field/__tests__/HeraldFieldTestCase.php',
'HeraldFieldValue' => 'applications/herald/value/HeraldFieldValue.php',
'HeraldInvalidActionException' => 'applications/herald/engine/exception/HeraldInvalidActionException.php',
@@ -1036,6 +1045,7 @@
'HeraldPreCommitRefAdapter' => 'applications/diffusion/herald/HeraldPreCommitRefAdapter.php',
'HeraldProjectsField' => 'applications/project/herald/HeraldProjectsField.php',
'HeraldRecursiveConditionsException' => 'applications/herald/engine/exception/HeraldRecursiveConditionsException.php',
+ 'HeraldRelatedFieldGroup' => 'applications/herald/field/HeraldRelatedFieldGroup.php',
'HeraldRemarkupRule' => 'applications/herald/remarkup/HeraldRemarkupRule.php',
'HeraldRepetitionPolicyConfig' => 'applications/herald/config/HeraldRepetitionPolicyConfig.php',
'HeraldRule' => 'applications/herald/storage/HeraldRule.php',
@@ -1055,6 +1065,7 @@
'HeraldSelectFieldValue' => 'applications/herald/value/HeraldSelectFieldValue.php',
'HeraldSpaceField' => 'applications/spaces/herald/HeraldSpaceField.php',
'HeraldSubscribersField' => 'applications/subscriptions/herald/HeraldSubscribersField.php',
+ 'HeraldSupportFieldGroup' => 'applications/herald/field/HeraldSupportFieldGroup.php',
'HeraldTestConsoleController' => 'applications/herald/controller/HeraldTestConsoleController.php',
'HeraldTextFieldValue' => 'applications/herald/value/HeraldTextFieldValue.php',
'HeraldTokenizerFieldValue' => 'applications/herald/value/HeraldTokenizerFieldValue.php',
@@ -1181,6 +1192,7 @@
'ManiphestTaskHasMockEdgeType' => 'applications/maniphest/edge/ManiphestTaskHasMockEdgeType.php',
'ManiphestTaskHasRevisionEdgeType' => 'applications/maniphest/edge/ManiphestTaskHasRevisionEdgeType.php',
'ManiphestTaskHeraldField' => 'applications/maniphest/herald/ManiphestTaskHeraldField.php',
+ 'ManiphestTaskHeraldFieldGroup' => 'applications/maniphest/herald/ManiphestTaskHeraldFieldGroup.php',
'ManiphestTaskListController' => 'applications/maniphest/controller/ManiphestTaskListController.php',
'ManiphestTaskListView' => 'applications/maniphest/view/ManiphestTaskListView.php',
'ManiphestTaskMailReceiver' => 'applications/maniphest/mail/ManiphestTaskMailReceiver.php',
@@ -1795,6 +1807,7 @@
'PhabricatorCustomFieldConfigOptionType' => 'infrastructure/customfield/config/PhabricatorCustomFieldConfigOptionType.php',
'PhabricatorCustomFieldDataNotAvailableException' => 'infrastructure/customfield/exception/PhabricatorCustomFieldDataNotAvailableException.php',
'PhabricatorCustomFieldHeraldField' => 'infrastructure/customfield/herald/PhabricatorCustomFieldHeraldField.php',
+ 'PhabricatorCustomFieldHeraldFieldGroup' => 'infrastructure/customfield/herald/PhabricatorCustomFieldHeraldFieldGroup.php',
'PhabricatorCustomFieldImplementationIncompleteException' => 'infrastructure/customfield/exception/PhabricatorCustomFieldImplementationIncompleteException.php',
'PhabricatorCustomFieldIndexStorage' => 'infrastructure/customfield/storage/PhabricatorCustomFieldIndexStorage.php',
'PhabricatorCustomFieldInterface' => 'infrastructure/customfield/interface/PhabricatorCustomFieldInterface.php',
@@ -3053,6 +3066,7 @@
'PholioMockEmbedView' => 'applications/pholio/view/PholioMockEmbedView.php',
'PholioMockHasTaskEdgeType' => 'applications/pholio/edge/PholioMockHasTaskEdgeType.php',
'PholioMockHeraldField' => 'applications/pholio/herald/PholioMockHeraldField.php',
+ 'PholioMockHeraldFieldGroup' => 'applications/pholio/herald/PholioMockHeraldFieldGroup.php',
'PholioMockImagesView' => 'applications/pholio/view/PholioMockImagesView.php',
'PholioMockListController' => 'applications/pholio/controller/PholioMockListController.php',
'PholioMockMailReceiver' => 'applications/pholio/mail/PholioMockMailReceiver.php',
@@ -3240,6 +3254,7 @@
'PhrictionDocumentController' => 'applications/phriction/controller/PhrictionDocumentController.php',
'PhrictionDocumentHeraldAdapter' => 'applications/phriction/herald/PhrictionDocumentHeraldAdapter.php',
'PhrictionDocumentHeraldField' => 'applications/phriction/herald/PhrictionDocumentHeraldField.php',
+ 'PhrictionDocumentHeraldFieldGroup' => 'applications/phriction/herald/PhrictionDocumentHeraldFieldGroup.php',
'PhrictionDocumentPHIDType' => 'applications/phriction/phid/PhrictionDocumentPHIDType.php',
'PhrictionDocumentPathHeraldField' => 'applications/phriction/herald/PhrictionDocumentPathHeraldField.php',
'PhrictionDocumentQuery' => 'applications/phriction/query/PhrictionDocumentQuery.php',
@@ -3794,6 +3809,7 @@
'DifferentialAuthorField' => 'DifferentialCustomField',
'DifferentialBlameRevisionField' => 'DifferentialStoredCustomField',
'DifferentialBranchField' => 'DifferentialCustomField',
+ 'DifferentialChangeHeraldFieldGroup' => 'HeraldFieldGroup',
'DifferentialChangeType' => 'Phobject',
'DifferentialChangesSinceLastUpdateField' => 'DifferentialCustomField',
'DifferentialChangeset' => array(
@@ -3858,6 +3874,7 @@
'DifferentialDiffCreateController' => 'DifferentialController',
'DifferentialDiffEditor' => 'PhabricatorApplicationTransactionEditor',
'DifferentialDiffHeraldField' => 'HeraldField',
+ 'DifferentialDiffHeraldFieldGroup' => 'HeraldFieldGroup',
'DifferentialDiffInlineCommentQuery' => 'PhabricatorDiffInlineCommentQuery',
'DifferentialDiffPHIDType' => 'PhabricatorPHIDType',
'DifferentialDiffProperty' => 'DifferentialDAO',
@@ -3971,6 +3988,7 @@
'DifferentialRevisionHasReviewerEdgeType' => 'PhabricatorEdgeType',
'DifferentialRevisionHasTaskEdgeType' => 'PhabricatorEdgeType',
'DifferentialRevisionHeraldField' => 'HeraldField',
+ 'DifferentialRevisionHeraldFieldGroup' => 'HeraldFieldGroup',
'DifferentialRevisionIDField' => 'DifferentialCustomField',
'DifferentialRevisionLandController' => 'DifferentialController',
'DifferentialRevisionListController' => 'DifferentialController',
@@ -4022,6 +4040,7 @@
'DiffusionBrowseTableView' => 'DiffusionView',
'DiffusionCachedResolveRefsQuery' => 'DiffusionLowLevelQuery',
'DiffusionChangeController' => 'DiffusionController',
+ 'DiffusionChangeHeraldFieldGroup' => 'HeraldFieldGroup',
'DiffusionCommitAffectedFilesHeraldField' => 'DiffusionCommitHeraldField',
'DiffusionCommitAuthorHeraldField' => 'DiffusionCommitHeraldField',
'DiffusionCommitAutocloseHeraldField' => 'DiffusionCommitHeraldField',
@@ -4039,6 +4058,7 @@
'DiffusionCommitHasTaskEdgeType' => 'PhabricatorEdgeType',
'DiffusionCommitHash' => 'Phobject',
'DiffusionCommitHeraldField' => 'HeraldField',
+ 'DiffusionCommitHeraldFieldGroup' => 'HeraldFieldGroup',
'DiffusionCommitHookEngine' => 'Phobject',
'DiffusionCommitHookRejectException' => 'Exception',
'DiffusionCommitMessageHeraldField' => 'DiffusionCommitHeraldField',
@@ -4159,6 +4179,7 @@
'DiffusionPreCommitContentRevisionSubscribersHeraldField' => 'DiffusionPreCommitContentHeraldField',
'DiffusionPreCommitRefChangeHeraldField' => 'DiffusionPreCommitRefHeraldField',
'DiffusionPreCommitRefHeraldField' => 'HeraldField',
+ 'DiffusionPreCommitRefHeraldFieldGroup' => 'HeraldFieldGroup',
'DiffusionPreCommitRefNameHeraldField' => 'DiffusionPreCommitRefHeraldField',
'DiffusionPreCommitRefPusherHeraldField' => 'DiffusionPreCommitRefHeraldField',
'DiffusionPreCommitRefPusherProjectsHeraldField' => 'DiffusionPreCommitRefHeraldField',
@@ -4603,6 +4624,7 @@
'HeraldAlwaysField' => 'HeraldField',
'HeraldAnotherRuleField' => 'HeraldField',
'HeraldApplyTranscript' => 'Phobject',
+ 'HeraldBasicFieldGroup' => 'HeraldFieldGroup',
'HeraldCommitAdapter' => 'HeraldAdapter',
'HeraldCondition' => 'HeraldDAO',
'HeraldConditionTranscript' => 'Phobject',
@@ -4614,10 +4636,12 @@
'HeraldDifferentialDiffAdapter' => 'HeraldDifferentialAdapter',
'HeraldDifferentialRevisionAdapter' => 'HeraldDifferentialAdapter',
'HeraldDisableController' => 'HeraldController',
+ 'HeraldEditFieldGroup' => 'HeraldFieldGroup',
'HeraldEffect' => 'Phobject',
'HeraldEmptyFieldValue' => 'HeraldFieldValue',
'HeraldEngine' => 'Phobject',
'HeraldField' => 'Phobject',
+ 'HeraldFieldGroup' => 'Phobject',
'HeraldFieldTestCase' => 'PhutilTestCase',
'HeraldFieldValue' => 'Phobject',
'HeraldInvalidActionException' => 'Exception',
@@ -4633,6 +4657,7 @@
'HeraldPreCommitRefAdapter' => 'HeraldPreCommitAdapter',
'HeraldProjectsField' => 'HeraldField',
'HeraldRecursiveConditionsException' => 'Exception',
+ 'HeraldRelatedFieldGroup' => 'HeraldFieldGroup',
'HeraldRemarkupRule' => 'PhabricatorObjectRemarkupRule',
'HeraldRepetitionPolicyConfig' => 'Phobject',
'HeraldRule' => array(
@@ -4658,6 +4683,7 @@
'HeraldSelectFieldValue' => 'HeraldFieldValue',
'HeraldSpaceField' => 'HeraldField',
'HeraldSubscribersField' => 'HeraldField',
+ 'HeraldSupportFieldGroup' => 'HeraldFieldGroup',
'HeraldTestConsoleController' => 'HeraldController',
'HeraldTextFieldValue' => 'HeraldFieldValue',
'HeraldTokenizerFieldValue' => 'HeraldFieldValue',
@@ -4817,6 +4843,7 @@
'ManiphestTaskHasMockEdgeType' => 'PhabricatorEdgeType',
'ManiphestTaskHasRevisionEdgeType' => 'PhabricatorEdgeType',
'ManiphestTaskHeraldField' => 'HeraldField',
+ 'ManiphestTaskHeraldFieldGroup' => 'HeraldFieldGroup',
'ManiphestTaskListController' => 'ManiphestController',
'ManiphestTaskListView' => 'ManiphestView',
'ManiphestTaskMailReceiver' => 'PhabricatorObjectMailReceiver',
@@ -5520,6 +5547,7 @@
'PhabricatorCustomFieldConfigOptionType' => 'PhabricatorConfigOptionType',
'PhabricatorCustomFieldDataNotAvailableException' => 'Exception',
'PhabricatorCustomFieldHeraldField' => 'HeraldField',
+ 'PhabricatorCustomFieldHeraldFieldGroup' => 'HeraldFieldGroup',
'PhabricatorCustomFieldImplementationIncompleteException' => 'Exception',
'PhabricatorCustomFieldIndexStorage' => 'PhabricatorLiskDAO',
'PhabricatorCustomFieldList' => 'Phobject',
@@ -7007,6 +7035,7 @@
'PholioMockEmbedView' => 'AphrontView',
'PholioMockHasTaskEdgeType' => 'PhabricatorEdgeType',
'PholioMockHeraldField' => 'HeraldField',
+ 'PholioMockHeraldFieldGroup' => 'HeraldFieldGroup',
'PholioMockImagesView' => 'AphrontView',
'PholioMockListController' => 'PholioController',
'PholioMockMailReceiver' => 'PhabricatorObjectMailReceiver',
@@ -7249,6 +7278,7 @@
'PhrictionDocumentController' => 'PhrictionController',
'PhrictionDocumentHeraldAdapter' => 'HeraldAdapter',
'PhrictionDocumentHeraldField' => 'HeraldField',
+ 'PhrictionDocumentHeraldFieldGroup' => 'HeraldFieldGroup',
'PhrictionDocumentPHIDType' => 'PhabricatorPHIDType',
'PhrictionDocumentPathHeraldField' => 'PhrictionDocumentHeraldField',
'PhrictionDocumentQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
diff --git a/src/applications/differential/herald/DifferentialChangeHeraldFieldGroup.php b/src/applications/differential/herald/DifferentialChangeHeraldFieldGroup.php
new file mode 100644
--- /dev/null
+++ b/src/applications/differential/herald/DifferentialChangeHeraldFieldGroup.php
@@ -0,0 +1,15 @@
+<?php
+
+final class DifferentialChangeHeraldFieldGroup extends HeraldFieldGroup {
+
+ const FIELDGROUPKEY = 'differential.change';
+
+ public function getGroupLabel() {
+ return pht('Change Details');
+ }
+
+ protected function getGroupOrder() {
+ return 1500;
+ }
+
+}
diff --git a/src/applications/differential/herald/DifferentialDiffAffectedFilesHeraldField.php b/src/applications/differential/herald/DifferentialDiffAffectedFilesHeraldField.php
--- a/src/applications/differential/herald/DifferentialDiffAffectedFilesHeraldField.php
+++ b/src/applications/differential/herald/DifferentialDiffAffectedFilesHeraldField.php
@@ -9,6 +9,10 @@
return pht('Affected files');
}
+ public function getFieldGroupKey() {
+ return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadAffectedPaths();
}
diff --git a/src/applications/differential/herald/DifferentialDiffContentAddedHeraldField.php b/src/applications/differential/herald/DifferentialDiffContentAddedHeraldField.php
--- a/src/applications/differential/herald/DifferentialDiffContentAddedHeraldField.php
+++ b/src/applications/differential/herald/DifferentialDiffContentAddedHeraldField.php
@@ -9,6 +9,10 @@
return pht('Added file content');
}
+ public function getFieldGroupKey() {
+ return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadAddedContentDictionary();
}
diff --git a/src/applications/differential/herald/DifferentialDiffContentHeraldField.php b/src/applications/differential/herald/DifferentialDiffContentHeraldField.php
--- a/src/applications/differential/herald/DifferentialDiffContentHeraldField.php
+++ b/src/applications/differential/herald/DifferentialDiffContentHeraldField.php
@@ -9,6 +9,10 @@
return pht('Changed file content');
}
+ public function getFieldGroupKey() {
+ return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadContentDictionary();
}
diff --git a/src/applications/differential/herald/DifferentialDiffContentRemovedHeraldField.php b/src/applications/differential/herald/DifferentialDiffContentRemovedHeraldField.php
--- a/src/applications/differential/herald/DifferentialDiffContentRemovedHeraldField.php
+++ b/src/applications/differential/herald/DifferentialDiffContentRemovedHeraldField.php
@@ -9,6 +9,10 @@
return pht('Removed file content');
}
+ public function getFieldGroupKey() {
+ return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadRemovedContentDictionary();
}
diff --git a/src/applications/differential/herald/DifferentialDiffHeraldField.php b/src/applications/differential/herald/DifferentialDiffHeraldField.php
--- a/src/applications/differential/herald/DifferentialDiffHeraldField.php
+++ b/src/applications/differential/herald/DifferentialDiffHeraldField.php
@@ -6,4 +6,8 @@
return ($object instanceof DifferentialDiff);
}
+ public function getFieldGroupKey() {
+ return DifferentialDiffHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
}
diff --git a/src/applications/differential/herald/DifferentialDiffHeraldFieldGroup.php b/src/applications/differential/herald/DifferentialDiffHeraldFieldGroup.php
new file mode 100644
--- /dev/null
+++ b/src/applications/differential/herald/DifferentialDiffHeraldFieldGroup.php
@@ -0,0 +1,15 @@
+<?php
+
+final class DifferentialDiffHeraldFieldGroup extends HeraldFieldGroup {
+
+ const FIELDGROUPKEY = 'differential.diff';
+
+ public function getGroupLabel() {
+ return pht('Diff Fields');
+ }
+
+ protected function getGroupOrder() {
+ return 1000;
+ }
+
+}
diff --git a/src/applications/differential/herald/DifferentialRevisionAffectedFilesHeraldField.php b/src/applications/differential/herald/DifferentialRevisionAffectedFilesHeraldField.php
--- a/src/applications/differential/herald/DifferentialRevisionAffectedFilesHeraldField.php
+++ b/src/applications/differential/herald/DifferentialRevisionAffectedFilesHeraldField.php
@@ -9,6 +9,10 @@
return pht('Affected files');
}
+ public function getFieldGroupKey() {
+ return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadAffectedPaths();
}
diff --git a/src/applications/differential/herald/DifferentialRevisionContentAddedHeraldField.php b/src/applications/differential/herald/DifferentialRevisionContentAddedHeraldField.php
--- a/src/applications/differential/herald/DifferentialRevisionContentAddedHeraldField.php
+++ b/src/applications/differential/herald/DifferentialRevisionContentAddedHeraldField.php
@@ -9,6 +9,10 @@
return pht('Added file content');
}
+ public function getFieldGroupKey() {
+ return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadAddedContentDictionary();
}
diff --git a/src/applications/differential/herald/DifferentialRevisionContentHeraldField.php b/src/applications/differential/herald/DifferentialRevisionContentHeraldField.php
--- a/src/applications/differential/herald/DifferentialRevisionContentHeraldField.php
+++ b/src/applications/differential/herald/DifferentialRevisionContentHeraldField.php
@@ -9,6 +9,10 @@
return pht('Changed file content');
}
+ public function getFieldGroupKey() {
+ return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadContentDictionary();
}
diff --git a/src/applications/differential/herald/DifferentialRevisionContentRemovedHeraldField.php b/src/applications/differential/herald/DifferentialRevisionContentRemovedHeraldField.php
--- a/src/applications/differential/herald/DifferentialRevisionContentRemovedHeraldField.php
+++ b/src/applications/differential/herald/DifferentialRevisionContentRemovedHeraldField.php
@@ -9,6 +9,10 @@
return pht('Removed file content');
}
+ public function getFieldGroupKey() {
+ return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadRemovedContentDictionary();
}
diff --git a/src/applications/differential/herald/DifferentialRevisionHeraldField.php b/src/applications/differential/herald/DifferentialRevisionHeraldField.php
--- a/src/applications/differential/herald/DifferentialRevisionHeraldField.php
+++ b/src/applications/differential/herald/DifferentialRevisionHeraldField.php
@@ -6,4 +6,8 @@
return ($object instanceof DifferentialRevision);
}
+ public function getFieldGroupKey() {
+ return DifferentialRevisionHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
}
diff --git a/src/applications/differential/herald/DifferentialRevisionHeraldFieldGroup.php b/src/applications/differential/herald/DifferentialRevisionHeraldFieldGroup.php
new file mode 100644
--- /dev/null
+++ b/src/applications/differential/herald/DifferentialRevisionHeraldFieldGroup.php
@@ -0,0 +1,15 @@
+<?php
+
+final class DifferentialRevisionHeraldFieldGroup extends HeraldFieldGroup {
+
+ const FIELDGROUPKEY = 'differential.revision';
+
+ public function getGroupLabel() {
+ return pht('Revision Fields');
+ }
+
+ protected function getGroupOrder() {
+ return 1000;
+ }
+
+}
diff --git a/src/applications/differential/herald/DifferentialRevisionPackageHeraldField.php b/src/applications/differential/herald/DifferentialRevisionPackageHeraldField.php
--- a/src/applications/differential/herald/DifferentialRevisionPackageHeraldField.php
+++ b/src/applications/differential/herald/DifferentialRevisionPackageHeraldField.php
@@ -9,6 +9,10 @@
return pht('Affected packages');
}
+ public function getFieldGroupKey() {
+ return HeraldRelatedFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
$packages = $this->getAdapter()->loadAffectedPackages();
return mpull($packages, 'getPHID');
diff --git a/src/applications/differential/herald/DifferentialRevisionPackageOwnerHeraldField.php b/src/applications/differential/herald/DifferentialRevisionPackageOwnerHeraldField.php
--- a/src/applications/differential/herald/DifferentialRevisionPackageOwnerHeraldField.php
+++ b/src/applications/differential/herald/DifferentialRevisionPackageOwnerHeraldField.php
@@ -9,6 +9,10 @@
return pht('Affected package owners');
}
+ public function getFieldGroupKey() {
+ return HeraldRelatedFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
$packages = $this->getAdapter()->loadAffectedPackages();
if (!$packages) {
diff --git a/src/applications/diffusion/herald/DiffusionChangeHeraldFieldGroup.php b/src/applications/diffusion/herald/DiffusionChangeHeraldFieldGroup.php
new file mode 100644
--- /dev/null
+++ b/src/applications/diffusion/herald/DiffusionChangeHeraldFieldGroup.php
@@ -0,0 +1,15 @@
+<?php
+
+final class DiffusionChangeHeraldFieldGroup extends HeraldFieldGroup {
+
+ const FIELDGROUPKEY = 'diffusion.change';
+
+ public function getGroupLabel() {
+ return pht('Change Details');
+ }
+
+ protected function getGroupOrder() {
+ return 1500;
+ }
+
+}
diff --git a/src/applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php
@@ -9,6 +9,10 @@
return pht('Affected files');
}
+ public function getFieldGroupKey() {
+ return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadAffectedPaths();
}
diff --git a/src/applications/diffusion/herald/DiffusionCommitDiffContentAddedHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitDiffContentAddedHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionCommitDiffContentAddedHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionCommitDiffContentAddedHeraldField.php
@@ -9,6 +9,10 @@
return pht('Diff content added');
}
+ public function getFieldGroupKey() {
+ return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadDiffContent('+');
}
diff --git a/src/applications/diffusion/herald/DiffusionCommitDiffContentHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitDiffContentHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionCommitDiffContentHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionCommitDiffContentHeraldField.php
@@ -9,6 +9,10 @@
return pht('Diff content');
}
+ public function getFieldGroupKey() {
+ return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadDiffContent('*');
}
diff --git a/src/applications/diffusion/herald/DiffusionCommitDiffContentRemovedHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitDiffContentRemovedHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionCommitDiffContentRemovedHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionCommitDiffContentRemovedHeraldField.php
@@ -9,6 +9,10 @@
return pht('Diff content removed');
}
+ public function getFieldGroupKey() {
+ return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadDiffContent('-');
}
diff --git a/src/applications/diffusion/herald/DiffusionCommitDiffEnormousHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitDiffEnormousHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionCommitDiffEnormousHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionCommitDiffEnormousHeraldField.php
@@ -9,6 +9,10 @@
return pht('Change is enormous');
}
+ public function getFieldGroupKey() {
+ return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->isDiffEnormous();
}
diff --git a/src/applications/diffusion/herald/DiffusionCommitHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionCommitHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionCommitHeraldField.php
@@ -6,4 +6,8 @@
return ($object instanceof PhabricatorRepositoryCommit);
}
+ public function getFieldGroupKey() {
+ return DiffusionCommitHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
}
diff --git a/src/applications/diffusion/herald/DiffusionCommitHeraldFieldGroup.php b/src/applications/diffusion/herald/DiffusionCommitHeraldFieldGroup.php
new file mode 100644
--- /dev/null
+++ b/src/applications/diffusion/herald/DiffusionCommitHeraldFieldGroup.php
@@ -0,0 +1,15 @@
+<?php
+
+final class DiffusionCommitHeraldFieldGroup extends HeraldFieldGroup {
+
+ const FIELDGROUPKEY = 'diffusion.commit';
+
+ public function getGroupLabel() {
+ return pht('Commit Fields');
+ }
+
+ protected function getGroupOrder() {
+ return 1000;
+ }
+
+}
diff --git a/src/applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php
@@ -9,6 +9,10 @@
return pht('Affected packages that need audit');
}
+ public function getFieldGroupKey() {
+ return HeraldRelatedFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
$packages = $this->getAdapter()->loadAuditNeededPackages();
if (!$packages) {
diff --git a/src/applications/diffusion/herald/DiffusionCommitPackageHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitPackageHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionCommitPackageHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionCommitPackageHeraldField.php
@@ -9,6 +9,10 @@
return pht('Affected packages');
}
+ public function getFieldGroupKey() {
+ return HeraldRelatedFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
$packages = $this->getAdapter()->loadAffectedPackages();
return mpull($packages, 'getPHID');
diff --git a/src/applications/diffusion/herald/DiffusionCommitPackageOwnerHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitPackageOwnerHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionCommitPackageOwnerHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionCommitPackageOwnerHeraldField.php
@@ -9,6 +9,10 @@
return pht('Affected package owners');
}
+ public function getFieldGroupKey() {
+ return HeraldRelatedFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
$packages = $this->getAdapter()->loadAffectedPackages();
if (!$packages) {
diff --git a/src/applications/diffusion/herald/DiffusionCommitRevisionAcceptedHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitRevisionAcceptedHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionCommitRevisionAcceptedHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionCommitRevisionAcceptedHeraldField.php
@@ -9,6 +9,10 @@
return pht('Accepted Differential revision');
}
+ public function getFieldGroupKey() {
+ return HeraldRelatedFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
$revision = $this->getAdapter()->loadDifferentialRevision();
if (!$revision) {
diff --git a/src/applications/diffusion/herald/DiffusionCommitRevisionHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitRevisionHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionCommitRevisionHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionCommitRevisionHeraldField.php
@@ -9,6 +9,10 @@
return pht('Differential revision');
}
+ public function getFieldGroupKey() {
+ return HeraldRelatedFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
$revision = $this->getAdapter()->loadDifferentialRevision();
diff --git a/src/applications/diffusion/herald/DiffusionCommitRevisionReviewersHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitRevisionReviewersHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionCommitRevisionReviewersHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionCommitRevisionReviewersHeraldField.php
@@ -9,6 +9,10 @@
return pht('Differential reviewers');
}
+ public function getFieldGroupKey() {
+ return HeraldRelatedFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
$revision = $this->getAdapter()->loadDifferentialRevision();
diff --git a/src/applications/diffusion/herald/DiffusionCommitRevisionSubscribersHeraldField.php b/src/applications/diffusion/herald/DiffusionCommitRevisionSubscribersHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionCommitRevisionSubscribersHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionCommitRevisionSubscribersHeraldField.php
@@ -9,6 +9,10 @@
return pht('Differential subscribers');
}
+ public function getFieldGroupKey() {
+ return HeraldRelatedFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
$revision = $this->getAdapter()->loadDifferentialRevision();
diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentAffectedFilesHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentAffectedFilesHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionPreCommitContentAffectedFilesHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionPreCommitContentAffectedFilesHeraldField.php
@@ -9,6 +9,10 @@
return pht('Affected files');
}
+ public function getFieldGroupKey() {
+ return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->getDiffContent('name');
}
diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentAddedHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentAddedHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentAddedHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentAddedHeraldField.php
@@ -9,6 +9,10 @@
return pht('Added diff content');
}
+ public function getFieldGroupKey() {
+ return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->getDiffContent('+');
}
diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentHeraldField.php
@@ -9,6 +9,10 @@
return pht('Diff content');
}
+ public function getFieldGroupKey() {
+ return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->getDiffContent('*');
}
diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentRemovedHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentRemovedHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentRemovedHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentRemovedHeraldField.php
@@ -9,6 +9,10 @@
return pht('Removed diff content');
}
+ public function getFieldGroupKey() {
+ return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->getDiffContent('-');
}
diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffEnormousHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffEnormousHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionPreCommitContentDiffEnormousHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionPreCommitContentDiffEnormousHeraldField.php
@@ -9,6 +9,10 @@
return pht('Diff is enormous');
}
+ public function getFieldGroupKey() {
+ return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->isDiffEnormous();
}
diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionPreCommitContentHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionPreCommitContentHeraldField.php
@@ -14,4 +14,8 @@
return true;
}
+ public function getFieldGroupKey() {
+ return DiffusionCommitHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
}
diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionAcceptedHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionAcceptedHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionAcceptedHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionAcceptedHeraldField.php
@@ -9,6 +9,10 @@
return pht('Accepted Differential revision');
}
+ public function getFieldGroupKey() {
+ return HeraldRelatedFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
$revision = $this->getAdapter()->getRevision();
diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionHeraldField.php
@@ -9,6 +9,10 @@
return pht('Differential revision');
}
+ public function getFieldGroupKey() {
+ return HeraldRelatedFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
$revision = $this->getAdapter()->getRevision();
diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionReviewersHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionReviewersHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionReviewersHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionReviewersHeraldField.php
@@ -9,6 +9,10 @@
return pht('Differential reviewers');
}
+ public function getFieldGroupKey() {
+ return HeraldRelatedFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
$revision = $this->getAdapter()->getRevision();
diff --git a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php
@@ -9,6 +9,10 @@
return pht('Differential subscribers');
}
+ public function getFieldGroupKey() {
+ return HeraldRelatedFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
$revision = $this->getAdapter()->getRevision();
diff --git a/src/applications/diffusion/herald/DiffusionPreCommitRefHeraldField.php b/src/applications/diffusion/herald/DiffusionPreCommitRefHeraldField.php
--- a/src/applications/diffusion/herald/DiffusionPreCommitRefHeraldField.php
+++ b/src/applications/diffusion/herald/DiffusionPreCommitRefHeraldField.php
@@ -14,4 +14,8 @@
return true;
}
+ public function getFieldGroupKey() {
+ return DiffusionPreCommitRefHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
}
diff --git a/src/applications/diffusion/herald/DiffusionPreCommitRefHeraldFieldGroup.php b/src/applications/diffusion/herald/DiffusionPreCommitRefHeraldFieldGroup.php
new file mode 100644
--- /dev/null
+++ b/src/applications/diffusion/herald/DiffusionPreCommitRefHeraldFieldGroup.php
@@ -0,0 +1,15 @@
+<?php
+
+final class DiffusionPreCommitRefHeraldFieldGroup extends HeraldFieldGroup {
+
+ const FIELDGROUPKEY = 'diffusion.ref';
+
+ public function getGroupLabel() {
+ return pht('Ref Fields');
+ }
+
+ protected function getGroupOrder() {
+ return 1000;
+ }
+
+}
diff --git a/src/applications/herald/adapter/HeraldAdapter.php b/src/applications/herald/adapter/HeraldAdapter.php
--- a/src/applications/herald/adapter/HeraldAdapter.php
+++ b/src/applications/herald/adapter/HeraldAdapter.php
@@ -312,6 +312,16 @@
return mpull($this->getFieldImplementationMap(), 'getHeraldFieldName');
}
+ public function getFieldGroupKey($field_key) {
+ $field = $this->getFieldImplementation($field_key);
+
+ if (!$field) {
+ return null;
+ }
+
+ return $field->getFieldGroupKey();
+ }
+
/* -( Conditions )--------------------------------------------------------- */
diff --git a/src/applications/herald/controller/HeraldRuleController.php b/src/applications/herald/controller/HeraldRuleController.php
--- a/src/applications/herald/controller/HeraldRuleController.php
+++ b/src/applications/herald/controller/HeraldRuleController.php
@@ -435,14 +435,43 @@
}
}
+ $group_map = array();
+ foreach ($field_map as $field_key => $field_name) {
+ $group_key = $adapter->getFieldGroupKey($field_key);
+ $group_map[$group_key][$field_key] = $field_name;
+ }
+
+ $field_groups = HeraldFieldGroup::getAllFieldGroups();
+
+ $groups = array();
+ foreach ($group_map as $group_key => $options) {
+ asort($options);
+
+ $field_group = idx($field_groups, $group_key);
+ if ($field_group) {
+ $group_label = $field_group->getGroupLabel();
+ $group_order = $field_group->getSortKey();
+ } else {
+ $group_label = nonempty($group_key, pht('Other'));
+ $group_order = 'Z';
+ }
+
+ $groups[] = array(
+ 'label' => $group_label,
+ 'options' => $options,
+ 'order' => $group_order,
+ );
+ }
+
+ $groups = array_values(isort($groups, 'order'));
$config_info = array();
- $config_info['fields'] = $field_map;
+ $config_info['fields'] = $groups;
$config_info['conditions'] = $all_conditions;
$config_info['actions'] = $action_map;
$config_info['valueMap'] = array();
- foreach ($config_info['fields'] as $field => $name) {
+ foreach ($field_map as $field => $name) {
try {
$field_conditions = $adapter->getConditionsForField($field);
} catch (Exception $ex) {
@@ -451,7 +480,7 @@
$config_info['conditionMap'][$field] = $field_conditions;
}
- foreach ($config_info['fields'] as $field => $fname) {
+ foreach ($field_map as $field => $fname) {
foreach ($config_info['conditionMap'][$field] as $condition) {
$value_key = $adapter->getValueTypeForFieldAndCondition(
$field,
diff --git a/src/applications/herald/field/HeraldAlwaysField.php b/src/applications/herald/field/HeraldAlwaysField.php
--- a/src/applications/herald/field/HeraldAlwaysField.php
+++ b/src/applications/herald/field/HeraldAlwaysField.php
@@ -8,6 +8,10 @@
return pht('Always');
}
+ public function getFieldGroupKey() {
+ return HeraldBasicFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return true;
}
diff --git a/src/applications/herald/field/HeraldAnotherRuleField.php b/src/applications/herald/field/HeraldAnotherRuleField.php
--- a/src/applications/herald/field/HeraldAnotherRuleField.php
+++ b/src/applications/herald/field/HeraldAnotherRuleField.php
@@ -8,6 +8,10 @@
return pht('Another Herald rule');
}
+ public function getFieldGroupKey() {
+ return HeraldBasicFieldGroup::FIELDGROUPKEY;
+ }
+
public function supportsObject($object) {
return true;
}
diff --git a/src/applications/herald/field/HeraldBasicFieldGroup.php b/src/applications/herald/field/HeraldBasicFieldGroup.php
new file mode 100644
--- /dev/null
+++ b/src/applications/herald/field/HeraldBasicFieldGroup.php
@@ -0,0 +1,15 @@
+<?php
+
+final class HeraldBasicFieldGroup extends HeraldFieldGroup {
+
+ const FIELDGROUPKEY = 'herald';
+
+ public function getGroupLabel() {
+ return pht('Herald');
+ }
+
+ protected function getGroupOrder() {
+ return 10000;
+ }
+
+}
diff --git a/src/applications/herald/field/HeraldContentSourceField.php b/src/applications/herald/field/HeraldContentSourceField.php
--- a/src/applications/herald/field/HeraldContentSourceField.php
+++ b/src/applications/herald/field/HeraldContentSourceField.php
@@ -8,6 +8,10 @@
return pht('Content source');
}
+ public function getFieldGroupKey() {
+ return HeraldEditFieldGroup::FIELDGROUPKEY;
+ }
+
public function getHeraldFieldValue($object) {
return $this->getAdapter()->getContentSource()->getSource();
}
diff --git a/src/applications/herald/field/HeraldEditFieldGroup.php b/src/applications/herald/field/HeraldEditFieldGroup.php
new file mode 100644
--- /dev/null
+++ b/src/applications/herald/field/HeraldEditFieldGroup.php
@@ -0,0 +1,15 @@
+<?php
+
+final class HeraldEditFieldGroup extends HeraldFieldGroup {
+
+ const FIELDGROUPKEY = 'edit';
+
+ public function getGroupLabel() {
+ return pht('Edit Attributes');
+ }
+
+ protected function getGroupOrder() {
+ return 4000;
+ }
+
+}
diff --git a/src/applications/herald/field/HeraldField.php b/src/applications/herald/field/HeraldField.php
--- a/src/applications/herald/field/HeraldField.php
+++ b/src/applications/herald/field/HeraldField.php
@@ -16,6 +16,10 @@
abstract public function getHeraldFieldName();
abstract public function getHeraldFieldValue($object);
+ public function getFieldGroupKey() {
+ return null;
+ }
+
protected function getHeraldFieldStandardType() {
throw new PhutilMethodNotImplementedException();
}
diff --git a/src/applications/herald/field/HeraldFieldGroup.php b/src/applications/herald/field/HeraldFieldGroup.php
new file mode 100644
--- /dev/null
+++ b/src/applications/herald/field/HeraldFieldGroup.php
@@ -0,0 +1,38 @@
+<?php
+
+abstract class HeraldFieldGroup extends Phobject {
+
+ abstract public function getGroupLabel();
+
+ protected function getGroupOrder() {
+ return 1000;
+ }
+
+ final public function getGroupKey() {
+ $class = new ReflectionClass($this);
+
+ $const = $class->getConstant('FIELDGROUPKEY');
+ if ($const === false) {
+ throw new Exception(
+ pht(
+ '"%s" class "%s" must define a "%s" property.',
+ __CLASS__,
+ get_class($this),
+ 'FIELDCONST'));
+ }
+
+ return $const;
+ }
+
+ public function getSortKey() {
+ return sprintf('A%08d%s', $this->getGroupOrder(), $this->getGroupLabel());
+ }
+
+ final public static function getAllFieldGroups() {
+ return id(new PhutilClassMapQuery())
+ ->setAncestorClass(__CLASS__)
+ ->setUniqueMethod('getGroupKey')
+ ->setSortMethod('getSortKey')
+ ->execute();
+ }
+}
diff --git a/src/applications/herald/field/HeraldNewObjectField.php b/src/applications/herald/field/HeraldNewObjectField.php
--- a/src/applications/herald/field/HeraldNewObjectField.php
+++ b/src/applications/herald/field/HeraldNewObjectField.php
@@ -8,6 +8,10 @@
return pht('Is newly created');
}
+ public function getFieldGroupKey() {
+ return HeraldEditFieldGroup::FIELDGROUPKEY;
+ }
+
public function supportsObject($object) {
return !$this->getAdapter()->isSingleEventAdapter();
}
diff --git a/src/applications/herald/field/HeraldRelatedFieldGroup.php b/src/applications/herald/field/HeraldRelatedFieldGroup.php
new file mode 100644
--- /dev/null
+++ b/src/applications/herald/field/HeraldRelatedFieldGroup.php
@@ -0,0 +1,15 @@
+<?php
+
+final class HeraldRelatedFieldGroup extends HeraldFieldGroup {
+
+ const FIELDGROUPKEY = 'related';
+
+ public function getGroupLabel() {
+ return pht('Related Fields');
+ }
+
+ protected function getGroupOrder() {
+ return 2000;
+ }
+
+}
diff --git a/src/applications/herald/field/HeraldSupportFieldGroup.php b/src/applications/herald/field/HeraldSupportFieldGroup.php
new file mode 100644
--- /dev/null
+++ b/src/applications/herald/field/HeraldSupportFieldGroup.php
@@ -0,0 +1,15 @@
+<?php
+
+final class HeraldSupportFieldGroup extends HeraldFieldGroup {
+
+ const FIELDGROUPKEY = 'support';
+
+ public function getGroupLabel() {
+ return pht('Supporting Applications');
+ }
+
+ protected function getGroupOrder() {
+ return 3000;
+ }
+
+}
diff --git a/src/applications/maniphest/herald/ManiphestTaskHeraldField.php b/src/applications/maniphest/herald/ManiphestTaskHeraldField.php
--- a/src/applications/maniphest/herald/ManiphestTaskHeraldField.php
+++ b/src/applications/maniphest/herald/ManiphestTaskHeraldField.php
@@ -2,6 +2,10 @@
abstract class ManiphestTaskHeraldField extends HeraldField {
+ public function getFieldGroupKey() {
+ return ManiphestTaskHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function supportsObject($object) {
return ($object instanceof ManiphestTask);
}
diff --git a/src/applications/maniphest/herald/ManiphestTaskHeraldFieldGroup.php b/src/applications/maniphest/herald/ManiphestTaskHeraldFieldGroup.php
new file mode 100644
--- /dev/null
+++ b/src/applications/maniphest/herald/ManiphestTaskHeraldFieldGroup.php
@@ -0,0 +1,15 @@
+<?php
+
+final class ManiphestTaskHeraldFieldGroup extends HeraldFieldGroup {
+
+ const FIELDGROUPKEY = 'maniphest.task';
+
+ public function getGroupLabel() {
+ return pht('Task Fields');
+ }
+
+ protected function getGroupOrder() {
+ return 500;
+ }
+
+}
diff --git a/src/applications/metamta/herald/PhabricatorMetaMTAApplicationEmailHeraldField.php b/src/applications/metamta/herald/PhabricatorMetaMTAApplicationEmailHeraldField.php
--- a/src/applications/metamta/herald/PhabricatorMetaMTAApplicationEmailHeraldField.php
+++ b/src/applications/metamta/herald/PhabricatorMetaMTAApplicationEmailHeraldField.php
@@ -6,7 +6,11 @@
const FIELDCONST = 'application-email';
public function getHeraldFieldName() {
- return pht('Receiving email address');
+ return pht('Receiving email addresses');
+ }
+
+ public function getFieldGroupKey() {
+ return HeraldEditFieldGroup::FIELDGROUPKEY;
}
public function supportsObject($object) {
diff --git a/src/applications/pholio/herald/PholioMockHeraldField.php b/src/applications/pholio/herald/PholioMockHeraldField.php
--- a/src/applications/pholio/herald/PholioMockHeraldField.php
+++ b/src/applications/pholio/herald/PholioMockHeraldField.php
@@ -6,4 +6,8 @@
return ($object instanceof PholioMock);
}
+ public function getFieldGroupKey() {
+ return PholioMockHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
}
diff --git a/src/applications/pholio/herald/PholioMockHeraldFieldGroup.php b/src/applications/pholio/herald/PholioMockHeraldFieldGroup.php
new file mode 100644
--- /dev/null
+++ b/src/applications/pholio/herald/PholioMockHeraldFieldGroup.php
@@ -0,0 +1,15 @@
+<?php
+
+final class PholioMockHeraldFieldGroup extends HeraldFieldGroup {
+
+ const FIELDGROUPKEY = 'pholio.mock';
+
+ public function getGroupLabel() {
+ return pht('Mock Fields');
+ }
+
+ protected function getGroupOrder() {
+ return 1000;
+ }
+
+}
diff --git a/src/applications/phriction/herald/PhrictionDocumentHeraldField.php b/src/applications/phriction/herald/PhrictionDocumentHeraldField.php
--- a/src/applications/phriction/herald/PhrictionDocumentHeraldField.php
+++ b/src/applications/phriction/herald/PhrictionDocumentHeraldField.php
@@ -6,4 +6,7 @@
return ($object instanceof PhrictionDocument);
}
+ public function getFieldGroupKey() {
+ return PhrictionDocumentHeraldFieldGroup::FIELDGROUPKEY;
+ }
}
diff --git a/src/applications/phriction/herald/PhrictionDocumentHeraldFieldGroup.php b/src/applications/phriction/herald/PhrictionDocumentHeraldFieldGroup.php
new file mode 100644
--- /dev/null
+++ b/src/applications/phriction/herald/PhrictionDocumentHeraldFieldGroup.php
@@ -0,0 +1,15 @@
+<?php
+
+final class PhrictionDocumentHeraldFieldGroup extends HeraldFieldGroup {
+
+ const FIELDGROUPKEY = 'phriction.document';
+
+ public function getGroupLabel() {
+ return pht('Document Fields');
+ }
+
+ protected function getGroupOrder() {
+ return 1000;
+ }
+
+}
diff --git a/src/applications/project/herald/HeraldProjectsField.php b/src/applications/project/herald/HeraldProjectsField.php
--- a/src/applications/project/herald/HeraldProjectsField.php
+++ b/src/applications/project/herald/HeraldProjectsField.php
@@ -8,6 +8,10 @@
return pht('Projects');
}
+ public function getFieldGroupKey() {
+ return HeraldSupportFieldGroup::FIELDGROUPKEY;
+ }
+
public function supportsObject($object) {
return ($object instanceof PhabricatorProjectInterface);
}
diff --git a/src/applications/spaces/herald/HeraldSpaceField.php b/src/applications/spaces/herald/HeraldSpaceField.php
--- a/src/applications/spaces/herald/HeraldSpaceField.php
+++ b/src/applications/spaces/herald/HeraldSpaceField.php
@@ -8,6 +8,10 @@
return pht('Space');
}
+ public function getFieldGroupKey() {
+ return HeraldSupportFieldGroup::FIELDGROUPKEY;
+ }
+
public function supportsObject($object) {
return ($object instanceof PhabricatorSpacesInterface);
}
diff --git a/src/applications/subscriptions/herald/HeraldSubscribersField.php b/src/applications/subscriptions/herald/HeraldSubscribersField.php
--- a/src/applications/subscriptions/herald/HeraldSubscribersField.php
+++ b/src/applications/subscriptions/herald/HeraldSubscribersField.php
@@ -8,6 +8,10 @@
return pht('Subscribers');
}
+ public function getFieldGroupKey() {
+ return HeraldSupportFieldGroup::FIELDGROUPKEY;
+ }
+
public function supportsObject($object) {
return ($object instanceof PhabricatorSubscribableInterface);
}
diff --git a/src/infrastructure/customfield/herald/PhabricatorCustomFieldHeraldField.php b/src/infrastructure/customfield/herald/PhabricatorCustomFieldHeraldField.php
--- a/src/infrastructure/customfield/herald/PhabricatorCustomFieldHeraldField.php
+++ b/src/infrastructure/customfield/herald/PhabricatorCustomFieldHeraldField.php
@@ -15,6 +15,10 @@
return $this->customField;
}
+ public function getFieldGroupKey() {
+ return PhabricatorCustomFieldHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
public function supportsObject($object) {
return ($object instanceof PhabricatorCustomFieldInterface);
}
diff --git a/src/infrastructure/customfield/herald/PhabricatorCustomFieldHeraldFieldGroup.php b/src/infrastructure/customfield/herald/PhabricatorCustomFieldHeraldFieldGroup.php
new file mode 100644
--- /dev/null
+++ b/src/infrastructure/customfield/herald/PhabricatorCustomFieldHeraldFieldGroup.php
@@ -0,0 +1,15 @@
+<?php
+
+final class PhabricatorCustomFieldHeraldFieldGroup extends HeraldFieldGroup {
+
+ const FIELDGROUPKEY = 'customfield';
+
+ public function getGroupLabel() {
+ return pht('Custom Fields');
+ }
+
+ protected function getGroupOrder() {
+ return 2000;
+ }
+
+}
diff --git a/webroot/rsrc/js/application/herald/HeraldRuleEditor.js b/webroot/rsrc/js/application/herald/HeraldRuleEditor.js
--- a/webroot/rsrc/js/application/herald/HeraldRuleEditor.js
+++ b/webroot/rsrc/js/application/herald/HeraldRuleEditor.js
@@ -320,10 +320,25 @@
this._onfieldchange(r);
},
_renderCondition : function(row_id) {
- var field_select = this._renderSelect(
- this._config.info.fields,
- this._config.conditions[row_id][0],
- 'field-select');
+ var groups = this._config.info.fields;
+
+ var optgroups = [];
+ for (var ii = 0; ii < groups.length; ii++) {
+ var group = groups[ii];
+ var options = [];
+ for (var k in group.options) {
+ options.push(JX.$N('option', {value: k}, group.options[k]));
+ }
+ optgroups.push(JX.$N('optgroup', {label: group.label}, options));
+ }
+
+ var attrs = {
+ sigil: 'field-select'
+ };
+
+ var field_select = JX.$N('select', attrs, optgroups);
+ field_select.value = this._config.conditions[row_id][0];
+
var field_cell = JX.$N('td', {sigil: 'field-cell'}, field_select);
var condition_cell = JX.$N('td', {sigil: 'condition-cell'});

File Metadata

Mime Type
text/plain
Expires
Mon, Oct 28, 1:17 PM (3 w, 7 h ago)
Storage Engine
amazon-s3
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
phabricator/secure/tm/eo/myvdi53luid3dfde
Default Alt Text
D13619.id32904.diff (60 KB)

Event Timeline