@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator

Group and order Herald fields

Summary:
Ref T8726. Some adapters now have a large number of fields, and we lost the sort-of-human-readable implicit ordering when fields were modularized.

Instead, group and sort fields.

Test Plan: {F603066}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13619

+546 -19
+11 -11
resources/celerity/map.php
··· 382 382 'rsrc/js/application/doorkeeper/behavior-doorkeeper-tag.js' => 'e5822781', 383 383 'rsrc/js/application/files/behavior-icon-composer.js' => '8ef9ab58', 384 384 'rsrc/js/application/files/behavior-launch-icon-composer.js' => '48086888', 385 - 'rsrc/js/application/herald/HeraldRuleEditor.js' => '6c2dffcc', 385 + 'rsrc/js/application/herald/HeraldRuleEditor.js' => '52684226', 386 386 'rsrc/js/application/herald/PathTypeahead.js' => 'f7fc67ec', 387 387 'rsrc/js/application/herald/herald-rule-editor.js' => '7ebaeed3', 388 388 'rsrc/js/application/maniphest/behavior-batch-editor.js' => '782ab6e7', ··· 538 538 'global-drag-and-drop-css' => '697324ad', 539 539 'harbormaster-css' => '49d64eb4', 540 540 'herald-css' => '826075fa', 541 - 'herald-rule-editor' => '6c2dffcc', 541 + 'herald-rule-editor' => '52684226', 542 542 'herald-test-css' => '778b008e', 543 543 'inline-comment-summary-css' => '51efda3a', 544 544 'javelin-aphlict' => '5359e785', ··· 1172 1172 'javelin-dom', 1173 1173 'javelin-reactor-dom', 1174 1174 ), 1175 + 52684226 => array( 1176 + 'multirow-row-manager', 1177 + 'javelin-install', 1178 + 'javelin-util', 1179 + 'javelin-dom', 1180 + 'javelin-stratcom', 1181 + 'javelin-json', 1182 + 'phabricator-prefab', 1183 + ), 1175 1184 '5359e785' => array( 1176 1185 'javelin-install', 1177 1186 'javelin-util', ··· 1337 1346 '6c2b09a2' => array( 1338 1347 'javelin-install', 1339 1348 'javelin-util', 1340 - ), 1341 - '6c2dffcc' => array( 1342 - 'multirow-row-manager', 1343 - 'javelin-install', 1344 - 'javelin-util', 1345 - 'javelin-dom', 1346 - 'javelin-stratcom', 1347 - 'javelin-json', 1348 - 'phabricator-prefab', 1349 1349 ), 1350 1350 '6c53634d' => array( 1351 1351 'javelin-install',
+30
src/__phutil_library_map__.php
··· 304 304 'DifferentialAuthorField' => 'applications/differential/customfield/DifferentialAuthorField.php', 305 305 'DifferentialBlameRevisionField' => 'applications/differential/customfield/DifferentialBlameRevisionField.php', 306 306 'DifferentialBranchField' => 'applications/differential/customfield/DifferentialBranchField.php', 307 + 'DifferentialChangeHeraldFieldGroup' => 'applications/differential/herald/DifferentialChangeHeraldFieldGroup.php', 307 308 'DifferentialChangeType' => 'applications/differential/constants/DifferentialChangeType.php', 308 309 'DifferentialChangesSinceLastUpdateField' => 'applications/differential/customfield/DifferentialChangesSinceLastUpdateField.php', 309 310 'DifferentialChangeset' => 'applications/differential/storage/DifferentialChangeset.php', ··· 359 360 'DifferentialDiffCreateController' => 'applications/differential/controller/DifferentialDiffCreateController.php', 360 361 'DifferentialDiffEditor' => 'applications/differential/editor/DifferentialDiffEditor.php', 361 362 'DifferentialDiffHeraldField' => 'applications/differential/herald/DifferentialDiffHeraldField.php', 363 + 'DifferentialDiffHeraldFieldGroup' => 'applications/differential/herald/DifferentialDiffHeraldFieldGroup.php', 362 364 'DifferentialDiffInlineCommentQuery' => 'applications/differential/query/DifferentialDiffInlineCommentQuery.php', 363 365 'DifferentialDiffPHIDType' => 'applications/differential/phid/DifferentialDiffPHIDType.php', 364 366 'DifferentialDiffProperty' => 'applications/differential/storage/DifferentialDiffProperty.php', ··· 452 454 'DifferentialRevisionHasReviewerEdgeType' => 'applications/differential/edge/DifferentialRevisionHasReviewerEdgeType.php', 453 455 'DifferentialRevisionHasTaskEdgeType' => 'applications/differential/edge/DifferentialRevisionHasTaskEdgeType.php', 454 456 'DifferentialRevisionHeraldField' => 'applications/differential/herald/DifferentialRevisionHeraldField.php', 457 + 'DifferentialRevisionHeraldFieldGroup' => 'applications/differential/herald/DifferentialRevisionHeraldFieldGroup.php', 455 458 'DifferentialRevisionIDField' => 'applications/differential/customfield/DifferentialRevisionIDField.php', 456 459 'DifferentialRevisionLandController' => 'applications/differential/controller/DifferentialRevisionLandController.php', 457 460 'DifferentialRevisionListController' => 'applications/differential/controller/DifferentialRevisionListController.php', ··· 503 506 'DiffusionBrowseTableView' => 'applications/diffusion/view/DiffusionBrowseTableView.php', 504 507 'DiffusionCachedResolveRefsQuery' => 'applications/diffusion/query/DiffusionCachedResolveRefsQuery.php', 505 508 'DiffusionChangeController' => 'applications/diffusion/controller/DiffusionChangeController.php', 509 + 'DiffusionChangeHeraldFieldGroup' => 'applications/diffusion/herald/DiffusionChangeHeraldFieldGroup.php', 506 510 'DiffusionCommitAffectedFilesHeraldField' => 'applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php', 507 511 'DiffusionCommitAuthorHeraldField' => 'applications/diffusion/herald/DiffusionCommitAuthorHeraldField.php', 508 512 'DiffusionCommitAutocloseHeraldField' => 'applications/diffusion/herald/DiffusionCommitAutocloseHeraldField.php', ··· 520 524 'DiffusionCommitHasTaskEdgeType' => 'applications/diffusion/edge/DiffusionCommitHasTaskEdgeType.php', 521 525 'DiffusionCommitHash' => 'applications/diffusion/data/DiffusionCommitHash.php', 522 526 'DiffusionCommitHeraldField' => 'applications/diffusion/herald/DiffusionCommitHeraldField.php', 527 + 'DiffusionCommitHeraldFieldGroup' => 'applications/diffusion/herald/DiffusionCommitHeraldFieldGroup.php', 523 528 'DiffusionCommitHookEngine' => 'applications/diffusion/engine/DiffusionCommitHookEngine.php', 524 529 'DiffusionCommitHookRejectException' => 'applications/diffusion/exception/DiffusionCommitHookRejectException.php', 525 530 'DiffusionCommitMessageHeraldField' => 'applications/diffusion/herald/DiffusionCommitMessageHeraldField.php', ··· 640 645 'DiffusionPreCommitContentRevisionSubscribersHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php', 641 646 'DiffusionPreCommitRefChangeHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefChangeHeraldField.php', 642 647 'DiffusionPreCommitRefHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefHeraldField.php', 648 + 'DiffusionPreCommitRefHeraldFieldGroup' => 'applications/diffusion/herald/DiffusionPreCommitRefHeraldFieldGroup.php', 643 649 'DiffusionPreCommitRefNameHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefNameHeraldField.php', 644 650 'DiffusionPreCommitRefPusherHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefPusherHeraldField.php', 645 651 'DiffusionPreCommitRefPusherProjectsHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefPusherProjectsHeraldField.php', ··· 1006 1012 'HeraldAlwaysField' => 'applications/herald/field/HeraldAlwaysField.php', 1007 1013 'HeraldAnotherRuleField' => 'applications/herald/field/HeraldAnotherRuleField.php', 1008 1014 'HeraldApplyTranscript' => 'applications/herald/storage/transcript/HeraldApplyTranscript.php', 1015 + 'HeraldBasicFieldGroup' => 'applications/herald/field/HeraldBasicFieldGroup.php', 1009 1016 'HeraldCommitAdapter' => 'applications/diffusion/herald/HeraldCommitAdapter.php', 1010 1017 'HeraldCondition' => 'applications/herald/storage/HeraldCondition.php', 1011 1018 'HeraldConditionTranscript' => 'applications/herald/storage/transcript/HeraldConditionTranscript.php', ··· 1017 1024 'HeraldDifferentialDiffAdapter' => 'applications/differential/herald/HeraldDifferentialDiffAdapter.php', 1018 1025 'HeraldDifferentialRevisionAdapter' => 'applications/differential/herald/HeraldDifferentialRevisionAdapter.php', 1019 1026 'HeraldDisableController' => 'applications/herald/controller/HeraldDisableController.php', 1027 + 'HeraldEditFieldGroup' => 'applications/herald/field/HeraldEditFieldGroup.php', 1020 1028 'HeraldEffect' => 'applications/herald/engine/HeraldEffect.php', 1021 1029 'HeraldEmptyFieldValue' => 'applications/herald/value/HeraldEmptyFieldValue.php', 1022 1030 'HeraldEngine' => 'applications/herald/engine/HeraldEngine.php', 1023 1031 'HeraldField' => 'applications/herald/field/HeraldField.php', 1032 + 'HeraldFieldGroup' => 'applications/herald/field/HeraldFieldGroup.php', 1024 1033 'HeraldFieldTestCase' => 'applications/herald/field/__tests__/HeraldFieldTestCase.php', 1025 1034 'HeraldFieldValue' => 'applications/herald/value/HeraldFieldValue.php', 1026 1035 'HeraldInvalidActionException' => 'applications/herald/engine/exception/HeraldInvalidActionException.php', ··· 1036 1045 'HeraldPreCommitRefAdapter' => 'applications/diffusion/herald/HeraldPreCommitRefAdapter.php', 1037 1046 'HeraldProjectsField' => 'applications/project/herald/HeraldProjectsField.php', 1038 1047 'HeraldRecursiveConditionsException' => 'applications/herald/engine/exception/HeraldRecursiveConditionsException.php', 1048 + 'HeraldRelatedFieldGroup' => 'applications/herald/field/HeraldRelatedFieldGroup.php', 1039 1049 'HeraldRemarkupRule' => 'applications/herald/remarkup/HeraldRemarkupRule.php', 1040 1050 'HeraldRepetitionPolicyConfig' => 'applications/herald/config/HeraldRepetitionPolicyConfig.php', 1041 1051 'HeraldRule' => 'applications/herald/storage/HeraldRule.php', ··· 1055 1065 'HeraldSelectFieldValue' => 'applications/herald/value/HeraldSelectFieldValue.php', 1056 1066 'HeraldSpaceField' => 'applications/spaces/herald/HeraldSpaceField.php', 1057 1067 'HeraldSubscribersField' => 'applications/subscriptions/herald/HeraldSubscribersField.php', 1068 + 'HeraldSupportFieldGroup' => 'applications/herald/field/HeraldSupportFieldGroup.php', 1058 1069 'HeraldTestConsoleController' => 'applications/herald/controller/HeraldTestConsoleController.php', 1059 1070 'HeraldTextFieldValue' => 'applications/herald/value/HeraldTextFieldValue.php', 1060 1071 'HeraldTokenizerFieldValue' => 'applications/herald/value/HeraldTokenizerFieldValue.php', ··· 1181 1192 'ManiphestTaskHasMockEdgeType' => 'applications/maniphest/edge/ManiphestTaskHasMockEdgeType.php', 1182 1193 'ManiphestTaskHasRevisionEdgeType' => 'applications/maniphest/edge/ManiphestTaskHasRevisionEdgeType.php', 1183 1194 'ManiphestTaskHeraldField' => 'applications/maniphest/herald/ManiphestTaskHeraldField.php', 1195 + 'ManiphestTaskHeraldFieldGroup' => 'applications/maniphest/herald/ManiphestTaskHeraldFieldGroup.php', 1184 1196 'ManiphestTaskListController' => 'applications/maniphest/controller/ManiphestTaskListController.php', 1185 1197 'ManiphestTaskListView' => 'applications/maniphest/view/ManiphestTaskListView.php', 1186 1198 'ManiphestTaskMailReceiver' => 'applications/maniphest/mail/ManiphestTaskMailReceiver.php', ··· 1799 1811 'PhabricatorCustomFieldConfigOptionType' => 'infrastructure/customfield/config/PhabricatorCustomFieldConfigOptionType.php', 1800 1812 'PhabricatorCustomFieldDataNotAvailableException' => 'infrastructure/customfield/exception/PhabricatorCustomFieldDataNotAvailableException.php', 1801 1813 'PhabricatorCustomFieldHeraldField' => 'infrastructure/customfield/herald/PhabricatorCustomFieldHeraldField.php', 1814 + 'PhabricatorCustomFieldHeraldFieldGroup' => 'infrastructure/customfield/herald/PhabricatorCustomFieldHeraldFieldGroup.php', 1802 1815 'PhabricatorCustomFieldImplementationIncompleteException' => 'infrastructure/customfield/exception/PhabricatorCustomFieldImplementationIncompleteException.php', 1803 1816 'PhabricatorCustomFieldIndexStorage' => 'infrastructure/customfield/storage/PhabricatorCustomFieldIndexStorage.php', 1804 1817 'PhabricatorCustomFieldInterface' => 'infrastructure/customfield/interface/PhabricatorCustomFieldInterface.php', ··· 3059 3072 'PholioMockEmbedView' => 'applications/pholio/view/PholioMockEmbedView.php', 3060 3073 'PholioMockHasTaskEdgeType' => 'applications/pholio/edge/PholioMockHasTaskEdgeType.php', 3061 3074 'PholioMockHeraldField' => 'applications/pholio/herald/PholioMockHeraldField.php', 3075 + 'PholioMockHeraldFieldGroup' => 'applications/pholio/herald/PholioMockHeraldFieldGroup.php', 3062 3076 'PholioMockImagesView' => 'applications/pholio/view/PholioMockImagesView.php', 3063 3077 'PholioMockListController' => 'applications/pholio/controller/PholioMockListController.php', 3064 3078 'PholioMockMailReceiver' => 'applications/pholio/mail/PholioMockMailReceiver.php', ··· 3246 3260 'PhrictionDocumentController' => 'applications/phriction/controller/PhrictionDocumentController.php', 3247 3261 'PhrictionDocumentHeraldAdapter' => 'applications/phriction/herald/PhrictionDocumentHeraldAdapter.php', 3248 3262 'PhrictionDocumentHeraldField' => 'applications/phriction/herald/PhrictionDocumentHeraldField.php', 3263 + 'PhrictionDocumentHeraldFieldGroup' => 'applications/phriction/herald/PhrictionDocumentHeraldFieldGroup.php', 3249 3264 'PhrictionDocumentPHIDType' => 'applications/phriction/phid/PhrictionDocumentPHIDType.php', 3250 3265 'PhrictionDocumentPathHeraldField' => 'applications/phriction/herald/PhrictionDocumentPathHeraldField.php', 3251 3266 'PhrictionDocumentQuery' => 'applications/phriction/query/PhrictionDocumentQuery.php', ··· 3800 3815 'DifferentialAuthorField' => 'DifferentialCustomField', 3801 3816 'DifferentialBlameRevisionField' => 'DifferentialStoredCustomField', 3802 3817 'DifferentialBranchField' => 'DifferentialCustomField', 3818 + 'DifferentialChangeHeraldFieldGroup' => 'HeraldFieldGroup', 3803 3819 'DifferentialChangeType' => 'Phobject', 3804 3820 'DifferentialChangesSinceLastUpdateField' => 'DifferentialCustomField', 3805 3821 'DifferentialChangeset' => array( ··· 3864 3880 'DifferentialDiffCreateController' => 'DifferentialController', 3865 3881 'DifferentialDiffEditor' => 'PhabricatorApplicationTransactionEditor', 3866 3882 'DifferentialDiffHeraldField' => 'HeraldField', 3883 + 'DifferentialDiffHeraldFieldGroup' => 'HeraldFieldGroup', 3867 3884 'DifferentialDiffInlineCommentQuery' => 'PhabricatorDiffInlineCommentQuery', 3868 3885 'DifferentialDiffPHIDType' => 'PhabricatorPHIDType', 3869 3886 'DifferentialDiffProperty' => 'DifferentialDAO', ··· 3977 3994 'DifferentialRevisionHasReviewerEdgeType' => 'PhabricatorEdgeType', 3978 3995 'DifferentialRevisionHasTaskEdgeType' => 'PhabricatorEdgeType', 3979 3996 'DifferentialRevisionHeraldField' => 'HeraldField', 3997 + 'DifferentialRevisionHeraldFieldGroup' => 'HeraldFieldGroup', 3980 3998 'DifferentialRevisionIDField' => 'DifferentialCustomField', 3981 3999 'DifferentialRevisionLandController' => 'DifferentialController', 3982 4000 'DifferentialRevisionListController' => 'DifferentialController', ··· 4028 4046 'DiffusionBrowseTableView' => 'DiffusionView', 4029 4047 'DiffusionCachedResolveRefsQuery' => 'DiffusionLowLevelQuery', 4030 4048 'DiffusionChangeController' => 'DiffusionController', 4049 + 'DiffusionChangeHeraldFieldGroup' => 'HeraldFieldGroup', 4031 4050 'DiffusionCommitAffectedFilesHeraldField' => 'DiffusionCommitHeraldField', 4032 4051 'DiffusionCommitAuthorHeraldField' => 'DiffusionCommitHeraldField', 4033 4052 'DiffusionCommitAutocloseHeraldField' => 'DiffusionCommitHeraldField', ··· 4045 4064 'DiffusionCommitHasTaskEdgeType' => 'PhabricatorEdgeType', 4046 4065 'DiffusionCommitHash' => 'Phobject', 4047 4066 'DiffusionCommitHeraldField' => 'HeraldField', 4067 + 'DiffusionCommitHeraldFieldGroup' => 'HeraldFieldGroup', 4048 4068 'DiffusionCommitHookEngine' => 'Phobject', 4049 4069 'DiffusionCommitHookRejectException' => 'Exception', 4050 4070 'DiffusionCommitMessageHeraldField' => 'DiffusionCommitHeraldField', ··· 4165 4185 'DiffusionPreCommitContentRevisionSubscribersHeraldField' => 'DiffusionPreCommitContentHeraldField', 4166 4186 'DiffusionPreCommitRefChangeHeraldField' => 'DiffusionPreCommitRefHeraldField', 4167 4187 'DiffusionPreCommitRefHeraldField' => 'HeraldField', 4188 + 'DiffusionPreCommitRefHeraldFieldGroup' => 'HeraldFieldGroup', 4168 4189 'DiffusionPreCommitRefNameHeraldField' => 'DiffusionPreCommitRefHeraldField', 4169 4190 'DiffusionPreCommitRefPusherHeraldField' => 'DiffusionPreCommitRefHeraldField', 4170 4191 'DiffusionPreCommitRefPusherProjectsHeraldField' => 'DiffusionPreCommitRefHeraldField', ··· 4609 4630 'HeraldAlwaysField' => 'HeraldField', 4610 4631 'HeraldAnotherRuleField' => 'HeraldField', 4611 4632 'HeraldApplyTranscript' => 'Phobject', 4633 + 'HeraldBasicFieldGroup' => 'HeraldFieldGroup', 4612 4634 'HeraldCommitAdapter' => 'HeraldAdapter', 4613 4635 'HeraldCondition' => 'HeraldDAO', 4614 4636 'HeraldConditionTranscript' => 'Phobject', ··· 4620 4642 'HeraldDifferentialDiffAdapter' => 'HeraldDifferentialAdapter', 4621 4643 'HeraldDifferentialRevisionAdapter' => 'HeraldDifferentialAdapter', 4622 4644 'HeraldDisableController' => 'HeraldController', 4645 + 'HeraldEditFieldGroup' => 'HeraldFieldGroup', 4623 4646 'HeraldEffect' => 'Phobject', 4624 4647 'HeraldEmptyFieldValue' => 'HeraldFieldValue', 4625 4648 'HeraldEngine' => 'Phobject', 4626 4649 'HeraldField' => 'Phobject', 4650 + 'HeraldFieldGroup' => 'Phobject', 4627 4651 'HeraldFieldTestCase' => 'PhutilTestCase', 4628 4652 'HeraldFieldValue' => 'Phobject', 4629 4653 'HeraldInvalidActionException' => 'Exception', ··· 4639 4663 'HeraldPreCommitRefAdapter' => 'HeraldPreCommitAdapter', 4640 4664 'HeraldProjectsField' => 'HeraldField', 4641 4665 'HeraldRecursiveConditionsException' => 'Exception', 4666 + 'HeraldRelatedFieldGroup' => 'HeraldFieldGroup', 4642 4667 'HeraldRemarkupRule' => 'PhabricatorObjectRemarkupRule', 4643 4668 'HeraldRepetitionPolicyConfig' => 'Phobject', 4644 4669 'HeraldRule' => array( ··· 4664 4689 'HeraldSelectFieldValue' => 'HeraldFieldValue', 4665 4690 'HeraldSpaceField' => 'HeraldField', 4666 4691 'HeraldSubscribersField' => 'HeraldField', 4692 + 'HeraldSupportFieldGroup' => 'HeraldFieldGroup', 4667 4693 'HeraldTestConsoleController' => 'HeraldController', 4668 4694 'HeraldTextFieldValue' => 'HeraldFieldValue', 4669 4695 'HeraldTokenizerFieldValue' => 'HeraldFieldValue', ··· 4823 4849 'ManiphestTaskHasMockEdgeType' => 'PhabricatorEdgeType', 4824 4850 'ManiphestTaskHasRevisionEdgeType' => 'PhabricatorEdgeType', 4825 4851 'ManiphestTaskHeraldField' => 'HeraldField', 4852 + 'ManiphestTaskHeraldFieldGroup' => 'HeraldFieldGroup', 4826 4853 'ManiphestTaskListController' => 'ManiphestController', 4827 4854 'ManiphestTaskListView' => 'ManiphestView', 4828 4855 'ManiphestTaskMailReceiver' => 'PhabricatorObjectMailReceiver', ··· 5531 5558 'PhabricatorCustomFieldConfigOptionType' => 'PhabricatorConfigOptionType', 5532 5559 'PhabricatorCustomFieldDataNotAvailableException' => 'Exception', 5533 5560 'PhabricatorCustomFieldHeraldField' => 'HeraldField', 5561 + 'PhabricatorCustomFieldHeraldFieldGroup' => 'HeraldFieldGroup', 5534 5562 'PhabricatorCustomFieldImplementationIncompleteException' => 'Exception', 5535 5563 'PhabricatorCustomFieldIndexStorage' => 'PhabricatorLiskDAO', 5536 5564 'PhabricatorCustomFieldList' => 'Phobject', ··· 7021 7049 'PholioMockEmbedView' => 'AphrontView', 7022 7050 'PholioMockHasTaskEdgeType' => 'PhabricatorEdgeType', 7023 7051 'PholioMockHeraldField' => 'HeraldField', 7052 + 'PholioMockHeraldFieldGroup' => 'HeraldFieldGroup', 7024 7053 'PholioMockImagesView' => 'AphrontView', 7025 7054 'PholioMockListController' => 'PholioController', 7026 7055 'PholioMockMailReceiver' => 'PhabricatorObjectMailReceiver', ··· 7263 7292 'PhrictionDocumentController' => 'PhrictionController', 7264 7293 'PhrictionDocumentHeraldAdapter' => 'HeraldAdapter', 7265 7294 'PhrictionDocumentHeraldField' => 'HeraldField', 7295 + 'PhrictionDocumentHeraldFieldGroup' => 'HeraldFieldGroup', 7266 7296 'PhrictionDocumentPHIDType' => 'PhabricatorPHIDType', 7267 7297 'PhrictionDocumentPathHeraldField' => 'PhrictionDocumentHeraldField', 7268 7298 'PhrictionDocumentQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
+15
src/applications/differential/herald/DifferentialChangeHeraldFieldGroup.php
··· 1 + <?php 2 + 3 + final class DifferentialChangeHeraldFieldGroup extends HeraldFieldGroup { 4 + 5 + const FIELDGROUPKEY = 'differential.change'; 6 + 7 + public function getGroupLabel() { 8 + return pht('Change Details'); 9 + } 10 + 11 + protected function getGroupOrder() { 12 + return 1500; 13 + } 14 + 15 + }
+4
src/applications/differential/herald/DifferentialDiffAffectedFilesHeraldField.php
··· 9 9 return pht('Affected files'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->loadAffectedPaths(); 14 18 }
+4
src/applications/differential/herald/DifferentialDiffContentAddedHeraldField.php
··· 9 9 return pht('Added file content'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->loadAddedContentDictionary(); 14 18 }
+4
src/applications/differential/herald/DifferentialDiffContentHeraldField.php
··· 9 9 return pht('Changed file content'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->loadContentDictionary(); 14 18 }
+4
src/applications/differential/herald/DifferentialDiffContentRemovedHeraldField.php
··· 9 9 return pht('Removed file content'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->loadRemovedContentDictionary(); 14 18 }
+4
src/applications/differential/herald/DifferentialDiffHeraldField.php
··· 6 6 return ($object instanceof DifferentialDiff); 7 7 } 8 8 9 + public function getFieldGroupKey() { 10 + return DifferentialDiffHeraldFieldGroup::FIELDGROUPKEY; 11 + } 12 + 9 13 }
+15
src/applications/differential/herald/DifferentialDiffHeraldFieldGroup.php
··· 1 + <?php 2 + 3 + final class DifferentialDiffHeraldFieldGroup extends HeraldFieldGroup { 4 + 5 + const FIELDGROUPKEY = 'differential.diff'; 6 + 7 + public function getGroupLabel() { 8 + return pht('Diff Fields'); 9 + } 10 + 11 + protected function getGroupOrder() { 12 + return 1000; 13 + } 14 + 15 + }
+4
src/applications/differential/herald/DifferentialRevisionAffectedFilesHeraldField.php
··· 9 9 return pht('Affected files'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->loadAffectedPaths(); 14 18 }
+4
src/applications/differential/herald/DifferentialRevisionContentAddedHeraldField.php
··· 9 9 return pht('Added file content'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->loadAddedContentDictionary(); 14 18 }
+4
src/applications/differential/herald/DifferentialRevisionContentHeraldField.php
··· 9 9 return pht('Changed file content'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->loadContentDictionary(); 14 18 }
+4
src/applications/differential/herald/DifferentialRevisionContentRemovedHeraldField.php
··· 9 9 return pht('Removed file content'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->loadRemovedContentDictionary(); 14 18 }
+4
src/applications/differential/herald/DifferentialRevisionHeraldField.php
··· 6 6 return ($object instanceof DifferentialRevision); 7 7 } 8 8 9 + public function getFieldGroupKey() { 10 + return DifferentialRevisionHeraldFieldGroup::FIELDGROUPKEY; 11 + } 12 + 9 13 }
+15
src/applications/differential/herald/DifferentialRevisionHeraldFieldGroup.php
··· 1 + <?php 2 + 3 + final class DifferentialRevisionHeraldFieldGroup extends HeraldFieldGroup { 4 + 5 + const FIELDGROUPKEY = 'differential.revision'; 6 + 7 + public function getGroupLabel() { 8 + return pht('Revision Fields'); 9 + } 10 + 11 + protected function getGroupOrder() { 12 + return 1000; 13 + } 14 + 15 + }
+4
src/applications/differential/herald/DifferentialRevisionPackageHeraldField.php
··· 9 9 return pht('Affected packages'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return HeraldRelatedFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 $packages = $this->getAdapter()->loadAffectedPackages(); 14 18 return mpull($packages, 'getPHID');
+4
src/applications/differential/herald/DifferentialRevisionPackageOwnerHeraldField.php
··· 9 9 return pht('Affected package owners'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return HeraldRelatedFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 $packages = $this->getAdapter()->loadAffectedPackages(); 14 18 if (!$packages) {
+15
src/applications/diffusion/herald/DiffusionChangeHeraldFieldGroup.php
··· 1 + <?php 2 + 3 + final class DiffusionChangeHeraldFieldGroup extends HeraldFieldGroup { 4 + 5 + const FIELDGROUPKEY = 'diffusion.change'; 6 + 7 + public function getGroupLabel() { 8 + return pht('Change Details'); 9 + } 10 + 11 + protected function getGroupOrder() { 12 + return 1500; 13 + } 14 + 15 + }
+4
src/applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php
··· 9 9 return pht('Affected files'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->loadAffectedPaths(); 14 18 }
+4
src/applications/diffusion/herald/DiffusionCommitDiffContentAddedHeraldField.php
··· 9 9 return pht('Diff content added'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->loadDiffContent('+'); 14 18 }
+4
src/applications/diffusion/herald/DiffusionCommitDiffContentHeraldField.php
··· 9 9 return pht('Diff content'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->loadDiffContent('*'); 14 18 }
+4
src/applications/diffusion/herald/DiffusionCommitDiffContentRemovedHeraldField.php
··· 9 9 return pht('Diff content removed'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->loadDiffContent('-'); 14 18 }
+4
src/applications/diffusion/herald/DiffusionCommitDiffEnormousHeraldField.php
··· 9 9 return pht('Change is enormous'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->isDiffEnormous(); 14 18 }
+4
src/applications/diffusion/herald/DiffusionCommitHeraldField.php
··· 6 6 return ($object instanceof PhabricatorRepositoryCommit); 7 7 } 8 8 9 + public function getFieldGroupKey() { 10 + return DiffusionCommitHeraldFieldGroup::FIELDGROUPKEY; 11 + } 12 + 9 13 }
+15
src/applications/diffusion/herald/DiffusionCommitHeraldFieldGroup.php
··· 1 + <?php 2 + 3 + final class DiffusionCommitHeraldFieldGroup extends HeraldFieldGroup { 4 + 5 + const FIELDGROUPKEY = 'diffusion.commit'; 6 + 7 + public function getGroupLabel() { 8 + return pht('Commit Fields'); 9 + } 10 + 11 + protected function getGroupOrder() { 12 + return 1000; 13 + } 14 + 15 + }
+4
src/applications/diffusion/herald/DiffusionCommitPackageAuditHeraldField.php
··· 9 9 return pht('Affected packages that need audit'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return HeraldRelatedFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 $packages = $this->getAdapter()->loadAuditNeededPackages(); 14 18 if (!$packages) {
+4
src/applications/diffusion/herald/DiffusionCommitPackageHeraldField.php
··· 9 9 return pht('Affected packages'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return HeraldRelatedFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 $packages = $this->getAdapter()->loadAffectedPackages(); 14 18 return mpull($packages, 'getPHID');
+4
src/applications/diffusion/herald/DiffusionCommitPackageOwnerHeraldField.php
··· 9 9 return pht('Affected package owners'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return HeraldRelatedFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 $packages = $this->getAdapter()->loadAffectedPackages(); 14 18 if (!$packages) {
+4
src/applications/diffusion/herald/DiffusionCommitRevisionAcceptedHeraldField.php
··· 9 9 return pht('Accepted Differential revision'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return HeraldRelatedFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 $revision = $this->getAdapter()->loadDifferentialRevision(); 14 18 if (!$revision) {
+4
src/applications/diffusion/herald/DiffusionCommitRevisionHeraldField.php
··· 9 9 return pht('Differential revision'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return HeraldRelatedFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 $revision = $this->getAdapter()->loadDifferentialRevision(); 14 18
+4
src/applications/diffusion/herald/DiffusionCommitRevisionReviewersHeraldField.php
··· 9 9 return pht('Differential reviewers'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return HeraldRelatedFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 $revision = $this->getAdapter()->loadDifferentialRevision(); 14 18
+4
src/applications/diffusion/herald/DiffusionCommitRevisionSubscribersHeraldField.php
··· 9 9 return pht('Differential subscribers'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return HeraldRelatedFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 $revision = $this->getAdapter()->loadDifferentialRevision(); 14 18
+4
src/applications/diffusion/herald/DiffusionPreCommitContentAffectedFilesHeraldField.php
··· 9 9 return pht('Affected files'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->getDiffContent('name'); 14 18 }
+4
src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentAddedHeraldField.php
··· 9 9 return pht('Added diff content'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->getDiffContent('+'); 14 18 }
+4
src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentHeraldField.php
··· 9 9 return pht('Diff content'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->getDiffContent('*'); 14 18 }
+4
src/applications/diffusion/herald/DiffusionPreCommitContentDiffContentRemovedHeraldField.php
··· 9 9 return pht('Removed diff content'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->getDiffContent('-'); 14 18 }
+4
src/applications/diffusion/herald/DiffusionPreCommitContentDiffEnormousHeraldField.php
··· 9 9 return pht('Diff is enormous'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 return $this->getAdapter()->isDiffEnormous(); 14 18 }
+4
src/applications/diffusion/herald/DiffusionPreCommitContentHeraldField.php
··· 14 14 return true; 15 15 } 16 16 17 + public function getFieldGroupKey() { 18 + return DiffusionCommitHeraldFieldGroup::FIELDGROUPKEY; 19 + } 20 + 17 21 }
+4
src/applications/diffusion/herald/DiffusionPreCommitContentRevisionAcceptedHeraldField.php
··· 9 9 return pht('Accepted Differential revision'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return HeraldRelatedFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 $revision = $this->getAdapter()->getRevision(); 14 18
+4
src/applications/diffusion/herald/DiffusionPreCommitContentRevisionHeraldField.php
··· 9 9 return pht('Differential revision'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return HeraldRelatedFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 $revision = $this->getAdapter()->getRevision(); 14 18
+4
src/applications/diffusion/herald/DiffusionPreCommitContentRevisionReviewersHeraldField.php
··· 9 9 return pht('Differential reviewers'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return HeraldRelatedFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 $revision = $this->getAdapter()->getRevision(); 14 18
+4
src/applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php
··· 9 9 return pht('Differential subscribers'); 10 10 } 11 11 12 + public function getFieldGroupKey() { 13 + return HeraldRelatedFieldGroup::FIELDGROUPKEY; 14 + } 15 + 12 16 public function getHeraldFieldValue($object) { 13 17 $revision = $this->getAdapter()->getRevision(); 14 18
+4
src/applications/diffusion/herald/DiffusionPreCommitRefHeraldField.php
··· 14 14 return true; 15 15 } 16 16 17 + public function getFieldGroupKey() { 18 + return DiffusionPreCommitRefHeraldFieldGroup::FIELDGROUPKEY; 19 + } 20 + 17 21 }
+15
src/applications/diffusion/herald/DiffusionPreCommitRefHeraldFieldGroup.php
··· 1 + <?php 2 + 3 + final class DiffusionPreCommitRefHeraldFieldGroup extends HeraldFieldGroup { 4 + 5 + const FIELDGROUPKEY = 'diffusion.ref'; 6 + 7 + public function getGroupLabel() { 8 + return pht('Ref Fields'); 9 + } 10 + 11 + protected function getGroupOrder() { 12 + return 1000; 13 + } 14 + 15 + }
+10
src/applications/herald/adapter/HeraldAdapter.php
··· 312 312 return mpull($this->getFieldImplementationMap(), 'getHeraldFieldName'); 313 313 } 314 314 315 + public function getFieldGroupKey($field_key) { 316 + $field = $this->getFieldImplementation($field_key); 317 + 318 + if (!$field) { 319 + return null; 320 + } 321 + 322 + return $field->getFieldGroupKey(); 323 + } 324 + 315 325 316 326 /* -( Conditions )--------------------------------------------------------- */ 317 327
+32 -3
src/applications/herald/controller/HeraldRuleController.php
··· 435 435 } 436 436 } 437 437 438 + $group_map = array(); 439 + foreach ($field_map as $field_key => $field_name) { 440 + $group_key = $adapter->getFieldGroupKey($field_key); 441 + $group_map[$group_key][$field_key] = $field_name; 442 + } 443 + 444 + $field_groups = HeraldFieldGroup::getAllFieldGroups(); 445 + 446 + $groups = array(); 447 + foreach ($group_map as $group_key => $options) { 448 + asort($options); 449 + 450 + $field_group = idx($field_groups, $group_key); 451 + if ($field_group) { 452 + $group_label = $field_group->getGroupLabel(); 453 + $group_order = $field_group->getSortKey(); 454 + } else { 455 + $group_label = nonempty($group_key, pht('Other')); 456 + $group_order = 'Z'; 457 + } 458 + 459 + $groups[] = array( 460 + 'label' => $group_label, 461 + 'options' => $options, 462 + 'order' => $group_order, 463 + ); 464 + } 465 + 466 + $groups = array_values(isort($groups, 'order')); 438 467 439 468 $config_info = array(); 440 - $config_info['fields'] = $field_map; 469 + $config_info['fields'] = $groups; 441 470 $config_info['conditions'] = $all_conditions; 442 471 $config_info['actions'] = $action_map; 443 472 $config_info['valueMap'] = array(); 444 473 445 - foreach ($config_info['fields'] as $field => $name) { 474 + foreach ($field_map as $field => $name) { 446 475 try { 447 476 $field_conditions = $adapter->getConditionsForField($field); 448 477 } catch (Exception $ex) { ··· 451 480 $config_info['conditionMap'][$field] = $field_conditions; 452 481 } 453 482 454 - foreach ($config_info['fields'] as $field => $fname) { 483 + foreach ($field_map as $field => $fname) { 455 484 foreach ($config_info['conditionMap'][$field] as $condition) { 456 485 $value_key = $adapter->getValueTypeForFieldAndCondition( 457 486 $field,
+4
src/applications/herald/field/HeraldAlwaysField.php
··· 8 8 return pht('Always'); 9 9 } 10 10 11 + public function getFieldGroupKey() { 12 + return HeraldBasicFieldGroup::FIELDGROUPKEY; 13 + } 14 + 11 15 public function getHeraldFieldValue($object) { 12 16 return true; 13 17 }
+4
src/applications/herald/field/HeraldAnotherRuleField.php
··· 8 8 return pht('Another Herald rule'); 9 9 } 10 10 11 + public function getFieldGroupKey() { 12 + return HeraldBasicFieldGroup::FIELDGROUPKEY; 13 + } 14 + 11 15 public function supportsObject($object) { 12 16 return true; 13 17 }
+15
src/applications/herald/field/HeraldBasicFieldGroup.php
··· 1 + <?php 2 + 3 + final class HeraldBasicFieldGroup extends HeraldFieldGroup { 4 + 5 + const FIELDGROUPKEY = 'herald'; 6 + 7 + public function getGroupLabel() { 8 + return pht('Herald'); 9 + } 10 + 11 + protected function getGroupOrder() { 12 + return 10000; 13 + } 14 + 15 + }
+4
src/applications/herald/field/HeraldContentSourceField.php
··· 8 8 return pht('Content source'); 9 9 } 10 10 11 + public function getFieldGroupKey() { 12 + return HeraldEditFieldGroup::FIELDGROUPKEY; 13 + } 14 + 11 15 public function getHeraldFieldValue($object) { 12 16 return $this->getAdapter()->getContentSource()->getSource(); 13 17 }
+15
src/applications/herald/field/HeraldEditFieldGroup.php
··· 1 + <?php 2 + 3 + final class HeraldEditFieldGroup extends HeraldFieldGroup { 4 + 5 + const FIELDGROUPKEY = 'edit'; 6 + 7 + public function getGroupLabel() { 8 + return pht('Edit Attributes'); 9 + } 10 + 11 + protected function getGroupOrder() { 12 + return 4000; 13 + } 14 + 15 + }
+4
src/applications/herald/field/HeraldField.php
··· 16 16 abstract public function getHeraldFieldName(); 17 17 abstract public function getHeraldFieldValue($object); 18 18 19 + public function getFieldGroupKey() { 20 + return null; 21 + } 22 + 19 23 protected function getHeraldFieldStandardType() { 20 24 throw new PhutilMethodNotImplementedException(); 21 25 }
+38
src/applications/herald/field/HeraldFieldGroup.php
··· 1 + <?php 2 + 3 + abstract class HeraldFieldGroup extends Phobject { 4 + 5 + abstract public function getGroupLabel(); 6 + 7 + protected function getGroupOrder() { 8 + return 1000; 9 + } 10 + 11 + final public function getGroupKey() { 12 + $class = new ReflectionClass($this); 13 + 14 + $const = $class->getConstant('FIELDGROUPKEY'); 15 + if ($const === false) { 16 + throw new Exception( 17 + pht( 18 + '"%s" class "%s" must define a "%s" property.', 19 + __CLASS__, 20 + get_class($this), 21 + 'FIELDCONST')); 22 + } 23 + 24 + return $const; 25 + } 26 + 27 + public function getSortKey() { 28 + return sprintf('A%08d%s', $this->getGroupOrder(), $this->getGroupLabel()); 29 + } 30 + 31 + final public static function getAllFieldGroups() { 32 + return id(new PhutilClassMapQuery()) 33 + ->setAncestorClass(__CLASS__) 34 + ->setUniqueMethod('getGroupKey') 35 + ->setSortMethod('getSortKey') 36 + ->execute(); 37 + } 38 + }
+4
src/applications/herald/field/HeraldNewObjectField.php
··· 8 8 return pht('Is newly created'); 9 9 } 10 10 11 + public function getFieldGroupKey() { 12 + return HeraldEditFieldGroup::FIELDGROUPKEY; 13 + } 14 + 11 15 public function supportsObject($object) { 12 16 return !$this->getAdapter()->isSingleEventAdapter(); 13 17 }
+15
src/applications/herald/field/HeraldRelatedFieldGroup.php
··· 1 + <?php 2 + 3 + final class HeraldRelatedFieldGroup extends HeraldFieldGroup { 4 + 5 + const FIELDGROUPKEY = 'related'; 6 + 7 + public function getGroupLabel() { 8 + return pht('Related Fields'); 9 + } 10 + 11 + protected function getGroupOrder() { 12 + return 2000; 13 + } 14 + 15 + }
+15
src/applications/herald/field/HeraldSupportFieldGroup.php
··· 1 + <?php 2 + 3 + final class HeraldSupportFieldGroup extends HeraldFieldGroup { 4 + 5 + const FIELDGROUPKEY = 'support'; 6 + 7 + public function getGroupLabel() { 8 + return pht('Supporting Applications'); 9 + } 10 + 11 + protected function getGroupOrder() { 12 + return 3000; 13 + } 14 + 15 + }
+4
src/applications/maniphest/herald/ManiphestTaskHeraldField.php
··· 2 2 3 3 abstract class ManiphestTaskHeraldField extends HeraldField { 4 4 5 + public function getFieldGroupKey() { 6 + return ManiphestTaskHeraldFieldGroup::FIELDGROUPKEY; 7 + } 8 + 5 9 public function supportsObject($object) { 6 10 return ($object instanceof ManiphestTask); 7 11 }
+15
src/applications/maniphest/herald/ManiphestTaskHeraldFieldGroup.php
··· 1 + <?php 2 + 3 + final class ManiphestTaskHeraldFieldGroup extends HeraldFieldGroup { 4 + 5 + const FIELDGROUPKEY = 'maniphest.task'; 6 + 7 + public function getGroupLabel() { 8 + return pht('Task Fields'); 9 + } 10 + 11 + protected function getGroupOrder() { 12 + return 500; 13 + } 14 + 15 + }
+5 -1
src/applications/metamta/herald/PhabricatorMetaMTAApplicationEmailHeraldField.php
··· 6 6 const FIELDCONST = 'application-email'; 7 7 8 8 public function getHeraldFieldName() { 9 - return pht('Receiving email address'); 9 + return pht('Receiving email addresses'); 10 + } 11 + 12 + public function getFieldGroupKey() { 13 + return HeraldEditFieldGroup::FIELDGROUPKEY; 10 14 } 11 15 12 16 public function supportsObject($object) {
+4
src/applications/pholio/herald/PholioMockHeraldField.php
··· 6 6 return ($object instanceof PholioMock); 7 7 } 8 8 9 + public function getFieldGroupKey() { 10 + return PholioMockHeraldFieldGroup::FIELDGROUPKEY; 11 + } 12 + 9 13 }
+15
src/applications/pholio/herald/PholioMockHeraldFieldGroup.php
··· 1 + <?php 2 + 3 + final class PholioMockHeraldFieldGroup extends HeraldFieldGroup { 4 + 5 + const FIELDGROUPKEY = 'pholio.mock'; 6 + 7 + public function getGroupLabel() { 8 + return pht('Mock Fields'); 9 + } 10 + 11 + protected function getGroupOrder() { 12 + return 1000; 13 + } 14 + 15 + }
+3
src/applications/phriction/herald/PhrictionDocumentHeraldField.php
··· 6 6 return ($object instanceof PhrictionDocument); 7 7 } 8 8 9 + public function getFieldGroupKey() { 10 + return PhrictionDocumentHeraldFieldGroup::FIELDGROUPKEY; 11 + } 9 12 }
+15
src/applications/phriction/herald/PhrictionDocumentHeraldFieldGroup.php
··· 1 + <?php 2 + 3 + final class PhrictionDocumentHeraldFieldGroup extends HeraldFieldGroup { 4 + 5 + const FIELDGROUPKEY = 'phriction.document'; 6 + 7 + public function getGroupLabel() { 8 + return pht('Document Fields'); 9 + } 10 + 11 + protected function getGroupOrder() { 12 + return 1000; 13 + } 14 + 15 + }
+4
src/applications/project/herald/HeraldProjectsField.php
··· 8 8 return pht('Projects'); 9 9 } 10 10 11 + public function getFieldGroupKey() { 12 + return HeraldSupportFieldGroup::FIELDGROUPKEY; 13 + } 14 + 11 15 public function supportsObject($object) { 12 16 return ($object instanceof PhabricatorProjectInterface); 13 17 }
+4
src/applications/spaces/herald/HeraldSpaceField.php
··· 8 8 return pht('Space'); 9 9 } 10 10 11 + public function getFieldGroupKey() { 12 + return HeraldSupportFieldGroup::FIELDGROUPKEY; 13 + } 14 + 11 15 public function supportsObject($object) { 12 16 return ($object instanceof PhabricatorSpacesInterface); 13 17 }
+4
src/applications/subscriptions/herald/HeraldSubscribersField.php
··· 8 8 return pht('Subscribers'); 9 9 } 10 10 11 + public function getFieldGroupKey() { 12 + return HeraldSupportFieldGroup::FIELDGROUPKEY; 13 + } 14 + 11 15 public function supportsObject($object) { 12 16 return ($object instanceof PhabricatorSubscribableInterface); 13 17 }
+4
src/infrastructure/customfield/herald/PhabricatorCustomFieldHeraldField.php
··· 15 15 return $this->customField; 16 16 } 17 17 18 + public function getFieldGroupKey() { 19 + return PhabricatorCustomFieldHeraldFieldGroup::FIELDGROUPKEY; 20 + } 21 + 18 22 public function supportsObject($object) { 19 23 return ($object instanceof PhabricatorCustomFieldInterface); 20 24 }
+15
src/infrastructure/customfield/herald/PhabricatorCustomFieldHeraldFieldGroup.php
··· 1 + <?php 2 + 3 + final class PhabricatorCustomFieldHeraldFieldGroup extends HeraldFieldGroup { 4 + 5 + const FIELDGROUPKEY = 'customfield'; 6 + 7 + public function getGroupLabel() { 8 + return pht('Custom Fields'); 9 + } 10 + 11 + protected function getGroupOrder() { 12 + return 2000; 13 + } 14 + 15 + }
+19 -4
webroot/rsrc/js/application/herald/HeraldRuleEditor.js
··· 320 320 this._onfieldchange(r); 321 321 }, 322 322 _renderCondition : function(row_id) { 323 - var field_select = this._renderSelect( 324 - this._config.info.fields, 325 - this._config.conditions[row_id][0], 326 - 'field-select'); 323 + var groups = this._config.info.fields; 324 + 325 + var optgroups = []; 326 + for (var ii = 0; ii < groups.length; ii++) { 327 + var group = groups[ii]; 328 + var options = []; 329 + for (var k in group.options) { 330 + options.push(JX.$N('option', {value: k}, group.options[k])); 331 + } 332 + optgroups.push(JX.$N('optgroup', {label: group.label}, options)); 333 + } 334 + 335 + var attrs = { 336 + sigil: 'field-select' 337 + }; 338 + 339 + var field_select = JX.$N('select', attrs, optgroups); 340 + field_select.value = this._config.conditions[row_id][0]; 341 + 327 342 var field_cell = JX.$N('td', {sigil: 'field-cell'}, field_select); 328 343 329 344 var condition_cell = JX.$N('td', {sigil: 'condition-cell'});