1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 16:30:59 +01:00

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
This commit is contained in:
epriestley 2015-07-16 14:13:13 -07:00
parent 97ccd93670
commit 0306eb70ed
69 changed files with 546 additions and 19 deletions

View file

@ -382,7 +382,7 @@ return array(
'rsrc/js/application/doorkeeper/behavior-doorkeeper-tag.js' => 'e5822781', 'rsrc/js/application/doorkeeper/behavior-doorkeeper-tag.js' => 'e5822781',
'rsrc/js/application/files/behavior-icon-composer.js' => '8ef9ab58', 'rsrc/js/application/files/behavior-icon-composer.js' => '8ef9ab58',
'rsrc/js/application/files/behavior-launch-icon-composer.js' => '48086888', '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/PathTypeahead.js' => 'f7fc67ec',
'rsrc/js/application/herald/herald-rule-editor.js' => '7ebaeed3', 'rsrc/js/application/herald/herald-rule-editor.js' => '7ebaeed3',
'rsrc/js/application/maniphest/behavior-batch-editor.js' => '782ab6e7', 'rsrc/js/application/maniphest/behavior-batch-editor.js' => '782ab6e7',
@ -538,7 +538,7 @@ return array(
'global-drag-and-drop-css' => '697324ad', 'global-drag-and-drop-css' => '697324ad',
'harbormaster-css' => '49d64eb4', 'harbormaster-css' => '49d64eb4',
'herald-css' => '826075fa', 'herald-css' => '826075fa',
'herald-rule-editor' => '6c2dffcc', 'herald-rule-editor' => '52684226',
'herald-test-css' => '778b008e', 'herald-test-css' => '778b008e',
'inline-comment-summary-css' => '51efda3a', 'inline-comment-summary-css' => '51efda3a',
'javelin-aphlict' => '5359e785', 'javelin-aphlict' => '5359e785',
@ -1172,6 +1172,15 @@ return array(
'javelin-dom', 'javelin-dom',
'javelin-reactor-dom', 'javelin-reactor-dom',
), ),
52684226 => array(
'multirow-row-manager',
'javelin-install',
'javelin-util',
'javelin-dom',
'javelin-stratcom',
'javelin-json',
'phabricator-prefab',
),
'5359e785' => array( '5359e785' => array(
'javelin-install', 'javelin-install',
'javelin-util', 'javelin-util',
@ -1338,15 +1347,6 @@ return array(
'javelin-install', 'javelin-install',
'javelin-util', 'javelin-util',
), ),
'6c2dffcc' => array(
'multirow-row-manager',
'javelin-install',
'javelin-util',
'javelin-dom',
'javelin-stratcom',
'javelin-json',
'phabricator-prefab',
),
'6c53634d' => array( '6c53634d' => array(
'javelin-install', 'javelin-install',
'javelin-event', 'javelin-event',

View file

@ -304,6 +304,7 @@ phutil_register_library_map(array(
'DifferentialAuthorField' => 'applications/differential/customfield/DifferentialAuthorField.php', 'DifferentialAuthorField' => 'applications/differential/customfield/DifferentialAuthorField.php',
'DifferentialBlameRevisionField' => 'applications/differential/customfield/DifferentialBlameRevisionField.php', 'DifferentialBlameRevisionField' => 'applications/differential/customfield/DifferentialBlameRevisionField.php',
'DifferentialBranchField' => 'applications/differential/customfield/DifferentialBranchField.php', 'DifferentialBranchField' => 'applications/differential/customfield/DifferentialBranchField.php',
'DifferentialChangeHeraldFieldGroup' => 'applications/differential/herald/DifferentialChangeHeraldFieldGroup.php',
'DifferentialChangeType' => 'applications/differential/constants/DifferentialChangeType.php', 'DifferentialChangeType' => 'applications/differential/constants/DifferentialChangeType.php',
'DifferentialChangesSinceLastUpdateField' => 'applications/differential/customfield/DifferentialChangesSinceLastUpdateField.php', 'DifferentialChangesSinceLastUpdateField' => 'applications/differential/customfield/DifferentialChangesSinceLastUpdateField.php',
'DifferentialChangeset' => 'applications/differential/storage/DifferentialChangeset.php', 'DifferentialChangeset' => 'applications/differential/storage/DifferentialChangeset.php',
@ -359,6 +360,7 @@ phutil_register_library_map(array(
'DifferentialDiffCreateController' => 'applications/differential/controller/DifferentialDiffCreateController.php', 'DifferentialDiffCreateController' => 'applications/differential/controller/DifferentialDiffCreateController.php',
'DifferentialDiffEditor' => 'applications/differential/editor/DifferentialDiffEditor.php', 'DifferentialDiffEditor' => 'applications/differential/editor/DifferentialDiffEditor.php',
'DifferentialDiffHeraldField' => 'applications/differential/herald/DifferentialDiffHeraldField.php', 'DifferentialDiffHeraldField' => 'applications/differential/herald/DifferentialDiffHeraldField.php',
'DifferentialDiffHeraldFieldGroup' => 'applications/differential/herald/DifferentialDiffHeraldFieldGroup.php',
'DifferentialDiffInlineCommentQuery' => 'applications/differential/query/DifferentialDiffInlineCommentQuery.php', 'DifferentialDiffInlineCommentQuery' => 'applications/differential/query/DifferentialDiffInlineCommentQuery.php',
'DifferentialDiffPHIDType' => 'applications/differential/phid/DifferentialDiffPHIDType.php', 'DifferentialDiffPHIDType' => 'applications/differential/phid/DifferentialDiffPHIDType.php',
'DifferentialDiffProperty' => 'applications/differential/storage/DifferentialDiffProperty.php', 'DifferentialDiffProperty' => 'applications/differential/storage/DifferentialDiffProperty.php',
@ -452,6 +454,7 @@ phutil_register_library_map(array(
'DifferentialRevisionHasReviewerEdgeType' => 'applications/differential/edge/DifferentialRevisionHasReviewerEdgeType.php', 'DifferentialRevisionHasReviewerEdgeType' => 'applications/differential/edge/DifferentialRevisionHasReviewerEdgeType.php',
'DifferentialRevisionHasTaskEdgeType' => 'applications/differential/edge/DifferentialRevisionHasTaskEdgeType.php', 'DifferentialRevisionHasTaskEdgeType' => 'applications/differential/edge/DifferentialRevisionHasTaskEdgeType.php',
'DifferentialRevisionHeraldField' => 'applications/differential/herald/DifferentialRevisionHeraldField.php', 'DifferentialRevisionHeraldField' => 'applications/differential/herald/DifferentialRevisionHeraldField.php',
'DifferentialRevisionHeraldFieldGroup' => 'applications/differential/herald/DifferentialRevisionHeraldFieldGroup.php',
'DifferentialRevisionIDField' => 'applications/differential/customfield/DifferentialRevisionIDField.php', 'DifferentialRevisionIDField' => 'applications/differential/customfield/DifferentialRevisionIDField.php',
'DifferentialRevisionLandController' => 'applications/differential/controller/DifferentialRevisionLandController.php', 'DifferentialRevisionLandController' => 'applications/differential/controller/DifferentialRevisionLandController.php',
'DifferentialRevisionListController' => 'applications/differential/controller/DifferentialRevisionListController.php', 'DifferentialRevisionListController' => 'applications/differential/controller/DifferentialRevisionListController.php',
@ -503,6 +506,7 @@ phutil_register_library_map(array(
'DiffusionBrowseTableView' => 'applications/diffusion/view/DiffusionBrowseTableView.php', 'DiffusionBrowseTableView' => 'applications/diffusion/view/DiffusionBrowseTableView.php',
'DiffusionCachedResolveRefsQuery' => 'applications/diffusion/query/DiffusionCachedResolveRefsQuery.php', 'DiffusionCachedResolveRefsQuery' => 'applications/diffusion/query/DiffusionCachedResolveRefsQuery.php',
'DiffusionChangeController' => 'applications/diffusion/controller/DiffusionChangeController.php', 'DiffusionChangeController' => 'applications/diffusion/controller/DiffusionChangeController.php',
'DiffusionChangeHeraldFieldGroup' => 'applications/diffusion/herald/DiffusionChangeHeraldFieldGroup.php',
'DiffusionCommitAffectedFilesHeraldField' => 'applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php', 'DiffusionCommitAffectedFilesHeraldField' => 'applications/diffusion/herald/DiffusionCommitAffectedFilesHeraldField.php',
'DiffusionCommitAuthorHeraldField' => 'applications/diffusion/herald/DiffusionCommitAuthorHeraldField.php', 'DiffusionCommitAuthorHeraldField' => 'applications/diffusion/herald/DiffusionCommitAuthorHeraldField.php',
'DiffusionCommitAutocloseHeraldField' => 'applications/diffusion/herald/DiffusionCommitAutocloseHeraldField.php', 'DiffusionCommitAutocloseHeraldField' => 'applications/diffusion/herald/DiffusionCommitAutocloseHeraldField.php',
@ -520,6 +524,7 @@ phutil_register_library_map(array(
'DiffusionCommitHasTaskEdgeType' => 'applications/diffusion/edge/DiffusionCommitHasTaskEdgeType.php', 'DiffusionCommitHasTaskEdgeType' => 'applications/diffusion/edge/DiffusionCommitHasTaskEdgeType.php',
'DiffusionCommitHash' => 'applications/diffusion/data/DiffusionCommitHash.php', 'DiffusionCommitHash' => 'applications/diffusion/data/DiffusionCommitHash.php',
'DiffusionCommitHeraldField' => 'applications/diffusion/herald/DiffusionCommitHeraldField.php', 'DiffusionCommitHeraldField' => 'applications/diffusion/herald/DiffusionCommitHeraldField.php',
'DiffusionCommitHeraldFieldGroup' => 'applications/diffusion/herald/DiffusionCommitHeraldFieldGroup.php',
'DiffusionCommitHookEngine' => 'applications/diffusion/engine/DiffusionCommitHookEngine.php', 'DiffusionCommitHookEngine' => 'applications/diffusion/engine/DiffusionCommitHookEngine.php',
'DiffusionCommitHookRejectException' => 'applications/diffusion/exception/DiffusionCommitHookRejectException.php', 'DiffusionCommitHookRejectException' => 'applications/diffusion/exception/DiffusionCommitHookRejectException.php',
'DiffusionCommitMessageHeraldField' => 'applications/diffusion/herald/DiffusionCommitMessageHeraldField.php', 'DiffusionCommitMessageHeraldField' => 'applications/diffusion/herald/DiffusionCommitMessageHeraldField.php',
@ -640,6 +645,7 @@ phutil_register_library_map(array(
'DiffusionPreCommitContentRevisionSubscribersHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php', 'DiffusionPreCommitContentRevisionSubscribersHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitContentRevisionSubscribersHeraldField.php',
'DiffusionPreCommitRefChangeHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefChangeHeraldField.php', 'DiffusionPreCommitRefChangeHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefChangeHeraldField.php',
'DiffusionPreCommitRefHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefHeraldField.php', 'DiffusionPreCommitRefHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefHeraldField.php',
'DiffusionPreCommitRefHeraldFieldGroup' => 'applications/diffusion/herald/DiffusionPreCommitRefHeraldFieldGroup.php',
'DiffusionPreCommitRefNameHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefNameHeraldField.php', 'DiffusionPreCommitRefNameHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefNameHeraldField.php',
'DiffusionPreCommitRefPusherHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefPusherHeraldField.php', 'DiffusionPreCommitRefPusherHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefPusherHeraldField.php',
'DiffusionPreCommitRefPusherProjectsHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefPusherProjectsHeraldField.php', 'DiffusionPreCommitRefPusherProjectsHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefPusherProjectsHeraldField.php',
@ -1006,6 +1012,7 @@ phutil_register_library_map(array(
'HeraldAlwaysField' => 'applications/herald/field/HeraldAlwaysField.php', 'HeraldAlwaysField' => 'applications/herald/field/HeraldAlwaysField.php',
'HeraldAnotherRuleField' => 'applications/herald/field/HeraldAnotherRuleField.php', 'HeraldAnotherRuleField' => 'applications/herald/field/HeraldAnotherRuleField.php',
'HeraldApplyTranscript' => 'applications/herald/storage/transcript/HeraldApplyTranscript.php', 'HeraldApplyTranscript' => 'applications/herald/storage/transcript/HeraldApplyTranscript.php',
'HeraldBasicFieldGroup' => 'applications/herald/field/HeraldBasicFieldGroup.php',
'HeraldCommitAdapter' => 'applications/diffusion/herald/HeraldCommitAdapter.php', 'HeraldCommitAdapter' => 'applications/diffusion/herald/HeraldCommitAdapter.php',
'HeraldCondition' => 'applications/herald/storage/HeraldCondition.php', 'HeraldCondition' => 'applications/herald/storage/HeraldCondition.php',
'HeraldConditionTranscript' => 'applications/herald/storage/transcript/HeraldConditionTranscript.php', 'HeraldConditionTranscript' => 'applications/herald/storage/transcript/HeraldConditionTranscript.php',
@ -1017,10 +1024,12 @@ phutil_register_library_map(array(
'HeraldDifferentialDiffAdapter' => 'applications/differential/herald/HeraldDifferentialDiffAdapter.php', 'HeraldDifferentialDiffAdapter' => 'applications/differential/herald/HeraldDifferentialDiffAdapter.php',
'HeraldDifferentialRevisionAdapter' => 'applications/differential/herald/HeraldDifferentialRevisionAdapter.php', 'HeraldDifferentialRevisionAdapter' => 'applications/differential/herald/HeraldDifferentialRevisionAdapter.php',
'HeraldDisableController' => 'applications/herald/controller/HeraldDisableController.php', 'HeraldDisableController' => 'applications/herald/controller/HeraldDisableController.php',
'HeraldEditFieldGroup' => 'applications/herald/field/HeraldEditFieldGroup.php',
'HeraldEffect' => 'applications/herald/engine/HeraldEffect.php', 'HeraldEffect' => 'applications/herald/engine/HeraldEffect.php',
'HeraldEmptyFieldValue' => 'applications/herald/value/HeraldEmptyFieldValue.php', 'HeraldEmptyFieldValue' => 'applications/herald/value/HeraldEmptyFieldValue.php',
'HeraldEngine' => 'applications/herald/engine/HeraldEngine.php', 'HeraldEngine' => 'applications/herald/engine/HeraldEngine.php',
'HeraldField' => 'applications/herald/field/HeraldField.php', 'HeraldField' => 'applications/herald/field/HeraldField.php',
'HeraldFieldGroup' => 'applications/herald/field/HeraldFieldGroup.php',
'HeraldFieldTestCase' => 'applications/herald/field/__tests__/HeraldFieldTestCase.php', 'HeraldFieldTestCase' => 'applications/herald/field/__tests__/HeraldFieldTestCase.php',
'HeraldFieldValue' => 'applications/herald/value/HeraldFieldValue.php', 'HeraldFieldValue' => 'applications/herald/value/HeraldFieldValue.php',
'HeraldInvalidActionException' => 'applications/herald/engine/exception/HeraldInvalidActionException.php', 'HeraldInvalidActionException' => 'applications/herald/engine/exception/HeraldInvalidActionException.php',
@ -1036,6 +1045,7 @@ phutil_register_library_map(array(
'HeraldPreCommitRefAdapter' => 'applications/diffusion/herald/HeraldPreCommitRefAdapter.php', 'HeraldPreCommitRefAdapter' => 'applications/diffusion/herald/HeraldPreCommitRefAdapter.php',
'HeraldProjectsField' => 'applications/project/herald/HeraldProjectsField.php', 'HeraldProjectsField' => 'applications/project/herald/HeraldProjectsField.php',
'HeraldRecursiveConditionsException' => 'applications/herald/engine/exception/HeraldRecursiveConditionsException.php', 'HeraldRecursiveConditionsException' => 'applications/herald/engine/exception/HeraldRecursiveConditionsException.php',
'HeraldRelatedFieldGroup' => 'applications/herald/field/HeraldRelatedFieldGroup.php',
'HeraldRemarkupRule' => 'applications/herald/remarkup/HeraldRemarkupRule.php', 'HeraldRemarkupRule' => 'applications/herald/remarkup/HeraldRemarkupRule.php',
'HeraldRepetitionPolicyConfig' => 'applications/herald/config/HeraldRepetitionPolicyConfig.php', 'HeraldRepetitionPolicyConfig' => 'applications/herald/config/HeraldRepetitionPolicyConfig.php',
'HeraldRule' => 'applications/herald/storage/HeraldRule.php', 'HeraldRule' => 'applications/herald/storage/HeraldRule.php',
@ -1055,6 +1065,7 @@ phutil_register_library_map(array(
'HeraldSelectFieldValue' => 'applications/herald/value/HeraldSelectFieldValue.php', 'HeraldSelectFieldValue' => 'applications/herald/value/HeraldSelectFieldValue.php',
'HeraldSpaceField' => 'applications/spaces/herald/HeraldSpaceField.php', 'HeraldSpaceField' => 'applications/spaces/herald/HeraldSpaceField.php',
'HeraldSubscribersField' => 'applications/subscriptions/herald/HeraldSubscribersField.php', 'HeraldSubscribersField' => 'applications/subscriptions/herald/HeraldSubscribersField.php',
'HeraldSupportFieldGroup' => 'applications/herald/field/HeraldSupportFieldGroup.php',
'HeraldTestConsoleController' => 'applications/herald/controller/HeraldTestConsoleController.php', 'HeraldTestConsoleController' => 'applications/herald/controller/HeraldTestConsoleController.php',
'HeraldTextFieldValue' => 'applications/herald/value/HeraldTextFieldValue.php', 'HeraldTextFieldValue' => 'applications/herald/value/HeraldTextFieldValue.php',
'HeraldTokenizerFieldValue' => 'applications/herald/value/HeraldTokenizerFieldValue.php', 'HeraldTokenizerFieldValue' => 'applications/herald/value/HeraldTokenizerFieldValue.php',
@ -1181,6 +1192,7 @@ phutil_register_library_map(array(
'ManiphestTaskHasMockEdgeType' => 'applications/maniphest/edge/ManiphestTaskHasMockEdgeType.php', 'ManiphestTaskHasMockEdgeType' => 'applications/maniphest/edge/ManiphestTaskHasMockEdgeType.php',
'ManiphestTaskHasRevisionEdgeType' => 'applications/maniphest/edge/ManiphestTaskHasRevisionEdgeType.php', 'ManiphestTaskHasRevisionEdgeType' => 'applications/maniphest/edge/ManiphestTaskHasRevisionEdgeType.php',
'ManiphestTaskHeraldField' => 'applications/maniphest/herald/ManiphestTaskHeraldField.php', 'ManiphestTaskHeraldField' => 'applications/maniphest/herald/ManiphestTaskHeraldField.php',
'ManiphestTaskHeraldFieldGroup' => 'applications/maniphest/herald/ManiphestTaskHeraldFieldGroup.php',
'ManiphestTaskListController' => 'applications/maniphest/controller/ManiphestTaskListController.php', 'ManiphestTaskListController' => 'applications/maniphest/controller/ManiphestTaskListController.php',
'ManiphestTaskListView' => 'applications/maniphest/view/ManiphestTaskListView.php', 'ManiphestTaskListView' => 'applications/maniphest/view/ManiphestTaskListView.php',
'ManiphestTaskMailReceiver' => 'applications/maniphest/mail/ManiphestTaskMailReceiver.php', 'ManiphestTaskMailReceiver' => 'applications/maniphest/mail/ManiphestTaskMailReceiver.php',
@ -1799,6 +1811,7 @@ phutil_register_library_map(array(
'PhabricatorCustomFieldConfigOptionType' => 'infrastructure/customfield/config/PhabricatorCustomFieldConfigOptionType.php', 'PhabricatorCustomFieldConfigOptionType' => 'infrastructure/customfield/config/PhabricatorCustomFieldConfigOptionType.php',
'PhabricatorCustomFieldDataNotAvailableException' => 'infrastructure/customfield/exception/PhabricatorCustomFieldDataNotAvailableException.php', 'PhabricatorCustomFieldDataNotAvailableException' => 'infrastructure/customfield/exception/PhabricatorCustomFieldDataNotAvailableException.php',
'PhabricatorCustomFieldHeraldField' => 'infrastructure/customfield/herald/PhabricatorCustomFieldHeraldField.php', 'PhabricatorCustomFieldHeraldField' => 'infrastructure/customfield/herald/PhabricatorCustomFieldHeraldField.php',
'PhabricatorCustomFieldHeraldFieldGroup' => 'infrastructure/customfield/herald/PhabricatorCustomFieldHeraldFieldGroup.php',
'PhabricatorCustomFieldImplementationIncompleteException' => 'infrastructure/customfield/exception/PhabricatorCustomFieldImplementationIncompleteException.php', 'PhabricatorCustomFieldImplementationIncompleteException' => 'infrastructure/customfield/exception/PhabricatorCustomFieldImplementationIncompleteException.php',
'PhabricatorCustomFieldIndexStorage' => 'infrastructure/customfield/storage/PhabricatorCustomFieldIndexStorage.php', 'PhabricatorCustomFieldIndexStorage' => 'infrastructure/customfield/storage/PhabricatorCustomFieldIndexStorage.php',
'PhabricatorCustomFieldInterface' => 'infrastructure/customfield/interface/PhabricatorCustomFieldInterface.php', 'PhabricatorCustomFieldInterface' => 'infrastructure/customfield/interface/PhabricatorCustomFieldInterface.php',
@ -3059,6 +3072,7 @@ phutil_register_library_map(array(
'PholioMockEmbedView' => 'applications/pholio/view/PholioMockEmbedView.php', 'PholioMockEmbedView' => 'applications/pholio/view/PholioMockEmbedView.php',
'PholioMockHasTaskEdgeType' => 'applications/pholio/edge/PholioMockHasTaskEdgeType.php', 'PholioMockHasTaskEdgeType' => 'applications/pholio/edge/PholioMockHasTaskEdgeType.php',
'PholioMockHeraldField' => 'applications/pholio/herald/PholioMockHeraldField.php', 'PholioMockHeraldField' => 'applications/pholio/herald/PholioMockHeraldField.php',
'PholioMockHeraldFieldGroup' => 'applications/pholio/herald/PholioMockHeraldFieldGroup.php',
'PholioMockImagesView' => 'applications/pholio/view/PholioMockImagesView.php', 'PholioMockImagesView' => 'applications/pholio/view/PholioMockImagesView.php',
'PholioMockListController' => 'applications/pholio/controller/PholioMockListController.php', 'PholioMockListController' => 'applications/pholio/controller/PholioMockListController.php',
'PholioMockMailReceiver' => 'applications/pholio/mail/PholioMockMailReceiver.php', 'PholioMockMailReceiver' => 'applications/pholio/mail/PholioMockMailReceiver.php',
@ -3246,6 +3260,7 @@ phutil_register_library_map(array(
'PhrictionDocumentController' => 'applications/phriction/controller/PhrictionDocumentController.php', 'PhrictionDocumentController' => 'applications/phriction/controller/PhrictionDocumentController.php',
'PhrictionDocumentHeraldAdapter' => 'applications/phriction/herald/PhrictionDocumentHeraldAdapter.php', 'PhrictionDocumentHeraldAdapter' => 'applications/phriction/herald/PhrictionDocumentHeraldAdapter.php',
'PhrictionDocumentHeraldField' => 'applications/phriction/herald/PhrictionDocumentHeraldField.php', 'PhrictionDocumentHeraldField' => 'applications/phriction/herald/PhrictionDocumentHeraldField.php',
'PhrictionDocumentHeraldFieldGroup' => 'applications/phriction/herald/PhrictionDocumentHeraldFieldGroup.php',
'PhrictionDocumentPHIDType' => 'applications/phriction/phid/PhrictionDocumentPHIDType.php', 'PhrictionDocumentPHIDType' => 'applications/phriction/phid/PhrictionDocumentPHIDType.php',
'PhrictionDocumentPathHeraldField' => 'applications/phriction/herald/PhrictionDocumentPathHeraldField.php', 'PhrictionDocumentPathHeraldField' => 'applications/phriction/herald/PhrictionDocumentPathHeraldField.php',
'PhrictionDocumentQuery' => 'applications/phriction/query/PhrictionDocumentQuery.php', 'PhrictionDocumentQuery' => 'applications/phriction/query/PhrictionDocumentQuery.php',
@ -3800,6 +3815,7 @@ phutil_register_library_map(array(
'DifferentialAuthorField' => 'DifferentialCustomField', 'DifferentialAuthorField' => 'DifferentialCustomField',
'DifferentialBlameRevisionField' => 'DifferentialStoredCustomField', 'DifferentialBlameRevisionField' => 'DifferentialStoredCustomField',
'DifferentialBranchField' => 'DifferentialCustomField', 'DifferentialBranchField' => 'DifferentialCustomField',
'DifferentialChangeHeraldFieldGroup' => 'HeraldFieldGroup',
'DifferentialChangeType' => 'Phobject', 'DifferentialChangeType' => 'Phobject',
'DifferentialChangesSinceLastUpdateField' => 'DifferentialCustomField', 'DifferentialChangesSinceLastUpdateField' => 'DifferentialCustomField',
'DifferentialChangeset' => array( 'DifferentialChangeset' => array(
@ -3864,6 +3880,7 @@ phutil_register_library_map(array(
'DifferentialDiffCreateController' => 'DifferentialController', 'DifferentialDiffCreateController' => 'DifferentialController',
'DifferentialDiffEditor' => 'PhabricatorApplicationTransactionEditor', 'DifferentialDiffEditor' => 'PhabricatorApplicationTransactionEditor',
'DifferentialDiffHeraldField' => 'HeraldField', 'DifferentialDiffHeraldField' => 'HeraldField',
'DifferentialDiffHeraldFieldGroup' => 'HeraldFieldGroup',
'DifferentialDiffInlineCommentQuery' => 'PhabricatorDiffInlineCommentQuery', 'DifferentialDiffInlineCommentQuery' => 'PhabricatorDiffInlineCommentQuery',
'DifferentialDiffPHIDType' => 'PhabricatorPHIDType', 'DifferentialDiffPHIDType' => 'PhabricatorPHIDType',
'DifferentialDiffProperty' => 'DifferentialDAO', 'DifferentialDiffProperty' => 'DifferentialDAO',
@ -3977,6 +3994,7 @@ phutil_register_library_map(array(
'DifferentialRevisionHasReviewerEdgeType' => 'PhabricatorEdgeType', 'DifferentialRevisionHasReviewerEdgeType' => 'PhabricatorEdgeType',
'DifferentialRevisionHasTaskEdgeType' => 'PhabricatorEdgeType', 'DifferentialRevisionHasTaskEdgeType' => 'PhabricatorEdgeType',
'DifferentialRevisionHeraldField' => 'HeraldField', 'DifferentialRevisionHeraldField' => 'HeraldField',
'DifferentialRevisionHeraldFieldGroup' => 'HeraldFieldGroup',
'DifferentialRevisionIDField' => 'DifferentialCustomField', 'DifferentialRevisionIDField' => 'DifferentialCustomField',
'DifferentialRevisionLandController' => 'DifferentialController', 'DifferentialRevisionLandController' => 'DifferentialController',
'DifferentialRevisionListController' => 'DifferentialController', 'DifferentialRevisionListController' => 'DifferentialController',
@ -4028,6 +4046,7 @@ phutil_register_library_map(array(
'DiffusionBrowseTableView' => 'DiffusionView', 'DiffusionBrowseTableView' => 'DiffusionView',
'DiffusionCachedResolveRefsQuery' => 'DiffusionLowLevelQuery', 'DiffusionCachedResolveRefsQuery' => 'DiffusionLowLevelQuery',
'DiffusionChangeController' => 'DiffusionController', 'DiffusionChangeController' => 'DiffusionController',
'DiffusionChangeHeraldFieldGroup' => 'HeraldFieldGroup',
'DiffusionCommitAffectedFilesHeraldField' => 'DiffusionCommitHeraldField', 'DiffusionCommitAffectedFilesHeraldField' => 'DiffusionCommitHeraldField',
'DiffusionCommitAuthorHeraldField' => 'DiffusionCommitHeraldField', 'DiffusionCommitAuthorHeraldField' => 'DiffusionCommitHeraldField',
'DiffusionCommitAutocloseHeraldField' => 'DiffusionCommitHeraldField', 'DiffusionCommitAutocloseHeraldField' => 'DiffusionCommitHeraldField',
@ -4045,6 +4064,7 @@ phutil_register_library_map(array(
'DiffusionCommitHasTaskEdgeType' => 'PhabricatorEdgeType', 'DiffusionCommitHasTaskEdgeType' => 'PhabricatorEdgeType',
'DiffusionCommitHash' => 'Phobject', 'DiffusionCommitHash' => 'Phobject',
'DiffusionCommitHeraldField' => 'HeraldField', 'DiffusionCommitHeraldField' => 'HeraldField',
'DiffusionCommitHeraldFieldGroup' => 'HeraldFieldGroup',
'DiffusionCommitHookEngine' => 'Phobject', 'DiffusionCommitHookEngine' => 'Phobject',
'DiffusionCommitHookRejectException' => 'Exception', 'DiffusionCommitHookRejectException' => 'Exception',
'DiffusionCommitMessageHeraldField' => 'DiffusionCommitHeraldField', 'DiffusionCommitMessageHeraldField' => 'DiffusionCommitHeraldField',
@ -4165,6 +4185,7 @@ phutil_register_library_map(array(
'DiffusionPreCommitContentRevisionSubscribersHeraldField' => 'DiffusionPreCommitContentHeraldField', 'DiffusionPreCommitContentRevisionSubscribersHeraldField' => 'DiffusionPreCommitContentHeraldField',
'DiffusionPreCommitRefChangeHeraldField' => 'DiffusionPreCommitRefHeraldField', 'DiffusionPreCommitRefChangeHeraldField' => 'DiffusionPreCommitRefHeraldField',
'DiffusionPreCommitRefHeraldField' => 'HeraldField', 'DiffusionPreCommitRefHeraldField' => 'HeraldField',
'DiffusionPreCommitRefHeraldFieldGroup' => 'HeraldFieldGroup',
'DiffusionPreCommitRefNameHeraldField' => 'DiffusionPreCommitRefHeraldField', 'DiffusionPreCommitRefNameHeraldField' => 'DiffusionPreCommitRefHeraldField',
'DiffusionPreCommitRefPusherHeraldField' => 'DiffusionPreCommitRefHeraldField', 'DiffusionPreCommitRefPusherHeraldField' => 'DiffusionPreCommitRefHeraldField',
'DiffusionPreCommitRefPusherProjectsHeraldField' => 'DiffusionPreCommitRefHeraldField', 'DiffusionPreCommitRefPusherProjectsHeraldField' => 'DiffusionPreCommitRefHeraldField',
@ -4609,6 +4630,7 @@ phutil_register_library_map(array(
'HeraldAlwaysField' => 'HeraldField', 'HeraldAlwaysField' => 'HeraldField',
'HeraldAnotherRuleField' => 'HeraldField', 'HeraldAnotherRuleField' => 'HeraldField',
'HeraldApplyTranscript' => 'Phobject', 'HeraldApplyTranscript' => 'Phobject',
'HeraldBasicFieldGroup' => 'HeraldFieldGroup',
'HeraldCommitAdapter' => 'HeraldAdapter', 'HeraldCommitAdapter' => 'HeraldAdapter',
'HeraldCondition' => 'HeraldDAO', 'HeraldCondition' => 'HeraldDAO',
'HeraldConditionTranscript' => 'Phobject', 'HeraldConditionTranscript' => 'Phobject',
@ -4620,10 +4642,12 @@ phutil_register_library_map(array(
'HeraldDifferentialDiffAdapter' => 'HeraldDifferentialAdapter', 'HeraldDifferentialDiffAdapter' => 'HeraldDifferentialAdapter',
'HeraldDifferentialRevisionAdapter' => 'HeraldDifferentialAdapter', 'HeraldDifferentialRevisionAdapter' => 'HeraldDifferentialAdapter',
'HeraldDisableController' => 'HeraldController', 'HeraldDisableController' => 'HeraldController',
'HeraldEditFieldGroup' => 'HeraldFieldGroup',
'HeraldEffect' => 'Phobject', 'HeraldEffect' => 'Phobject',
'HeraldEmptyFieldValue' => 'HeraldFieldValue', 'HeraldEmptyFieldValue' => 'HeraldFieldValue',
'HeraldEngine' => 'Phobject', 'HeraldEngine' => 'Phobject',
'HeraldField' => 'Phobject', 'HeraldField' => 'Phobject',
'HeraldFieldGroup' => 'Phobject',
'HeraldFieldTestCase' => 'PhutilTestCase', 'HeraldFieldTestCase' => 'PhutilTestCase',
'HeraldFieldValue' => 'Phobject', 'HeraldFieldValue' => 'Phobject',
'HeraldInvalidActionException' => 'Exception', 'HeraldInvalidActionException' => 'Exception',
@ -4639,6 +4663,7 @@ phutil_register_library_map(array(
'HeraldPreCommitRefAdapter' => 'HeraldPreCommitAdapter', 'HeraldPreCommitRefAdapter' => 'HeraldPreCommitAdapter',
'HeraldProjectsField' => 'HeraldField', 'HeraldProjectsField' => 'HeraldField',
'HeraldRecursiveConditionsException' => 'Exception', 'HeraldRecursiveConditionsException' => 'Exception',
'HeraldRelatedFieldGroup' => 'HeraldFieldGroup',
'HeraldRemarkupRule' => 'PhabricatorObjectRemarkupRule', 'HeraldRemarkupRule' => 'PhabricatorObjectRemarkupRule',
'HeraldRepetitionPolicyConfig' => 'Phobject', 'HeraldRepetitionPolicyConfig' => 'Phobject',
'HeraldRule' => array( 'HeraldRule' => array(
@ -4664,6 +4689,7 @@ phutil_register_library_map(array(
'HeraldSelectFieldValue' => 'HeraldFieldValue', 'HeraldSelectFieldValue' => 'HeraldFieldValue',
'HeraldSpaceField' => 'HeraldField', 'HeraldSpaceField' => 'HeraldField',
'HeraldSubscribersField' => 'HeraldField', 'HeraldSubscribersField' => 'HeraldField',
'HeraldSupportFieldGroup' => 'HeraldFieldGroup',
'HeraldTestConsoleController' => 'HeraldController', 'HeraldTestConsoleController' => 'HeraldController',
'HeraldTextFieldValue' => 'HeraldFieldValue', 'HeraldTextFieldValue' => 'HeraldFieldValue',
'HeraldTokenizerFieldValue' => 'HeraldFieldValue', 'HeraldTokenizerFieldValue' => 'HeraldFieldValue',
@ -4823,6 +4849,7 @@ phutil_register_library_map(array(
'ManiphestTaskHasMockEdgeType' => 'PhabricatorEdgeType', 'ManiphestTaskHasMockEdgeType' => 'PhabricatorEdgeType',
'ManiphestTaskHasRevisionEdgeType' => 'PhabricatorEdgeType', 'ManiphestTaskHasRevisionEdgeType' => 'PhabricatorEdgeType',
'ManiphestTaskHeraldField' => 'HeraldField', 'ManiphestTaskHeraldField' => 'HeraldField',
'ManiphestTaskHeraldFieldGroup' => 'HeraldFieldGroup',
'ManiphestTaskListController' => 'ManiphestController', 'ManiphestTaskListController' => 'ManiphestController',
'ManiphestTaskListView' => 'ManiphestView', 'ManiphestTaskListView' => 'ManiphestView',
'ManiphestTaskMailReceiver' => 'PhabricatorObjectMailReceiver', 'ManiphestTaskMailReceiver' => 'PhabricatorObjectMailReceiver',
@ -5531,6 +5558,7 @@ phutil_register_library_map(array(
'PhabricatorCustomFieldConfigOptionType' => 'PhabricatorConfigOptionType', 'PhabricatorCustomFieldConfigOptionType' => 'PhabricatorConfigOptionType',
'PhabricatorCustomFieldDataNotAvailableException' => 'Exception', 'PhabricatorCustomFieldDataNotAvailableException' => 'Exception',
'PhabricatorCustomFieldHeraldField' => 'HeraldField', 'PhabricatorCustomFieldHeraldField' => 'HeraldField',
'PhabricatorCustomFieldHeraldFieldGroup' => 'HeraldFieldGroup',
'PhabricatorCustomFieldImplementationIncompleteException' => 'Exception', 'PhabricatorCustomFieldImplementationIncompleteException' => 'Exception',
'PhabricatorCustomFieldIndexStorage' => 'PhabricatorLiskDAO', 'PhabricatorCustomFieldIndexStorage' => 'PhabricatorLiskDAO',
'PhabricatorCustomFieldList' => 'Phobject', 'PhabricatorCustomFieldList' => 'Phobject',
@ -7021,6 +7049,7 @@ phutil_register_library_map(array(
'PholioMockEmbedView' => 'AphrontView', 'PholioMockEmbedView' => 'AphrontView',
'PholioMockHasTaskEdgeType' => 'PhabricatorEdgeType', 'PholioMockHasTaskEdgeType' => 'PhabricatorEdgeType',
'PholioMockHeraldField' => 'HeraldField', 'PholioMockHeraldField' => 'HeraldField',
'PholioMockHeraldFieldGroup' => 'HeraldFieldGroup',
'PholioMockImagesView' => 'AphrontView', 'PholioMockImagesView' => 'AphrontView',
'PholioMockListController' => 'PholioController', 'PholioMockListController' => 'PholioController',
'PholioMockMailReceiver' => 'PhabricatorObjectMailReceiver', 'PholioMockMailReceiver' => 'PhabricatorObjectMailReceiver',
@ -7263,6 +7292,7 @@ phutil_register_library_map(array(
'PhrictionDocumentController' => 'PhrictionController', 'PhrictionDocumentController' => 'PhrictionController',
'PhrictionDocumentHeraldAdapter' => 'HeraldAdapter', 'PhrictionDocumentHeraldAdapter' => 'HeraldAdapter',
'PhrictionDocumentHeraldField' => 'HeraldField', 'PhrictionDocumentHeraldField' => 'HeraldField',
'PhrictionDocumentHeraldFieldGroup' => 'HeraldFieldGroup',
'PhrictionDocumentPHIDType' => 'PhabricatorPHIDType', 'PhrictionDocumentPHIDType' => 'PhabricatorPHIDType',
'PhrictionDocumentPathHeraldField' => 'PhrictionDocumentHeraldField', 'PhrictionDocumentPathHeraldField' => 'PhrictionDocumentHeraldField',
'PhrictionDocumentQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhrictionDocumentQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',

View file

@ -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;
}
}

View file

@ -9,6 +9,10 @@ final class DifferentialDiffAffectedFilesHeraldField
return pht('Affected files'); return pht('Affected files');
} }
public function getFieldGroupKey() {
return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadAffectedPaths(); return $this->getAdapter()->loadAffectedPaths();
} }

View file

@ -9,6 +9,10 @@ final class DifferentialDiffContentAddedHeraldField
return pht('Added file content'); return pht('Added file content');
} }
public function getFieldGroupKey() {
return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadAddedContentDictionary(); return $this->getAdapter()->loadAddedContentDictionary();
} }

View file

@ -9,6 +9,10 @@ final class DifferentialDiffContentHeraldField
return pht('Changed file content'); return pht('Changed file content');
} }
public function getFieldGroupKey() {
return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadContentDictionary(); return $this->getAdapter()->loadContentDictionary();
} }

View file

@ -9,6 +9,10 @@ final class DifferentialDiffContentRemovedHeraldField
return pht('Removed file content'); return pht('Removed file content');
} }
public function getFieldGroupKey() {
return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadRemovedContentDictionary(); return $this->getAdapter()->loadRemovedContentDictionary();
} }

View file

@ -6,4 +6,8 @@ abstract class DifferentialDiffHeraldField extends HeraldField {
return ($object instanceof DifferentialDiff); return ($object instanceof DifferentialDiff);
} }
public function getFieldGroupKey() {
return DifferentialDiffHeraldFieldGroup::FIELDGROUPKEY;
}
} }

View file

@ -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;
}
}

View file

@ -9,6 +9,10 @@ final class DifferentialRevisionAffectedFilesHeraldField
return pht('Affected files'); return pht('Affected files');
} }
public function getFieldGroupKey() {
return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadAffectedPaths(); return $this->getAdapter()->loadAffectedPaths();
} }

View file

@ -9,6 +9,10 @@ final class DifferentialRevisionContentAddedHeraldField
return pht('Added file content'); return pht('Added file content');
} }
public function getFieldGroupKey() {
return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadAddedContentDictionary(); return $this->getAdapter()->loadAddedContentDictionary();
} }

View file

@ -9,6 +9,10 @@ final class DifferentialRevisionContentHeraldField
return pht('Changed file content'); return pht('Changed file content');
} }
public function getFieldGroupKey() {
return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadContentDictionary(); return $this->getAdapter()->loadContentDictionary();
} }

View file

@ -9,6 +9,10 @@ final class DifferentialRevisionContentRemovedHeraldField
return pht('Removed file content'); return pht('Removed file content');
} }
public function getFieldGroupKey() {
return DifferentialChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadRemovedContentDictionary(); return $this->getAdapter()->loadRemovedContentDictionary();
} }

View file

@ -6,4 +6,8 @@ abstract class DifferentialRevisionHeraldField extends HeraldField {
return ($object instanceof DifferentialRevision); return ($object instanceof DifferentialRevision);
} }
public function getFieldGroupKey() {
return DifferentialRevisionHeraldFieldGroup::FIELDGROUPKEY;
}
} }

View file

@ -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;
}
}

View file

@ -9,6 +9,10 @@ final class DifferentialRevisionPackageHeraldField
return pht('Affected packages'); return pht('Affected packages');
} }
public function getFieldGroupKey() {
return HeraldRelatedFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
$packages = $this->getAdapter()->loadAffectedPackages(); $packages = $this->getAdapter()->loadAffectedPackages();
return mpull($packages, 'getPHID'); return mpull($packages, 'getPHID');

View file

@ -9,6 +9,10 @@ final class DifferentialRevisionPackageOwnerHeraldField
return pht('Affected package owners'); return pht('Affected package owners');
} }
public function getFieldGroupKey() {
return HeraldRelatedFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
$packages = $this->getAdapter()->loadAffectedPackages(); $packages = $this->getAdapter()->loadAffectedPackages();
if (!$packages) { if (!$packages) {

View file

@ -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;
}
}

View file

@ -9,6 +9,10 @@ final class DiffusionCommitAffectedFilesHeraldField
return pht('Affected files'); return pht('Affected files');
} }
public function getFieldGroupKey() {
return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadAffectedPaths(); return $this->getAdapter()->loadAffectedPaths();
} }

View file

@ -9,6 +9,10 @@ final class DiffusionCommitDiffContentAddedHeraldField
return pht('Diff content added'); return pht('Diff content added');
} }
public function getFieldGroupKey() {
return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadDiffContent('+'); return $this->getAdapter()->loadDiffContent('+');
} }

View file

@ -9,6 +9,10 @@ final class DiffusionCommitDiffContentHeraldField
return pht('Diff content'); return pht('Diff content');
} }
public function getFieldGroupKey() {
return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadDiffContent('*'); return $this->getAdapter()->loadDiffContent('*');
} }

View file

@ -9,6 +9,10 @@ final class DiffusionCommitDiffContentRemovedHeraldField
return pht('Diff content removed'); return pht('Diff content removed');
} }
public function getFieldGroupKey() {
return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadDiffContent('-'); return $this->getAdapter()->loadDiffContent('-');
} }

View file

@ -9,6 +9,10 @@ final class DiffusionCommitDiffEnormousHeraldField
return pht('Change is enormous'); return pht('Change is enormous');
} }
public function getFieldGroupKey() {
return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->isDiffEnormous(); return $this->getAdapter()->isDiffEnormous();
} }

View file

@ -6,4 +6,8 @@ abstract class DiffusionCommitHeraldField extends HeraldField {
return ($object instanceof PhabricatorRepositoryCommit); return ($object instanceof PhabricatorRepositoryCommit);
} }
public function getFieldGroupKey() {
return DiffusionCommitHeraldFieldGroup::FIELDGROUPKEY;
}
} }

View file

@ -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;
}
}

View file

@ -9,6 +9,10 @@ final class DiffusionCommitPackageAuditHeraldField
return pht('Affected packages that need audit'); return pht('Affected packages that need audit');
} }
public function getFieldGroupKey() {
return HeraldRelatedFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
$packages = $this->getAdapter()->loadAuditNeededPackages(); $packages = $this->getAdapter()->loadAuditNeededPackages();
if (!$packages) { if (!$packages) {

View file

@ -9,6 +9,10 @@ final class DiffusionCommitPackageHeraldField
return pht('Affected packages'); return pht('Affected packages');
} }
public function getFieldGroupKey() {
return HeraldRelatedFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
$packages = $this->getAdapter()->loadAffectedPackages(); $packages = $this->getAdapter()->loadAffectedPackages();
return mpull($packages, 'getPHID'); return mpull($packages, 'getPHID');

View file

@ -9,6 +9,10 @@ final class DiffusionCommitPackageOwnerHeraldField
return pht('Affected package owners'); return pht('Affected package owners');
} }
public function getFieldGroupKey() {
return HeraldRelatedFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
$packages = $this->getAdapter()->loadAffectedPackages(); $packages = $this->getAdapter()->loadAffectedPackages();
if (!$packages) { if (!$packages) {

View file

@ -9,6 +9,10 @@ final class DiffusionCommitRevisionAcceptedHeraldField
return pht('Accepted Differential revision'); return pht('Accepted Differential revision');
} }
public function getFieldGroupKey() {
return HeraldRelatedFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
$revision = $this->getAdapter()->loadDifferentialRevision(); $revision = $this->getAdapter()->loadDifferentialRevision();
if (!$revision) { if (!$revision) {

View file

@ -9,6 +9,10 @@ final class DiffusionCommitRevisionHeraldField
return pht('Differential revision'); return pht('Differential revision');
} }
public function getFieldGroupKey() {
return HeraldRelatedFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
$revision = $this->getAdapter()->loadDifferentialRevision(); $revision = $this->getAdapter()->loadDifferentialRevision();

View file

@ -9,6 +9,10 @@ final class DiffusionCommitRevisionReviewersHeraldField
return pht('Differential reviewers'); return pht('Differential reviewers');
} }
public function getFieldGroupKey() {
return HeraldRelatedFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
$revision = $this->getAdapter()->loadDifferentialRevision(); $revision = $this->getAdapter()->loadDifferentialRevision();

View file

@ -9,6 +9,10 @@ final class DiffusionCommitRevisionSubscribersHeraldField
return pht('Differential subscribers'); return pht('Differential subscribers');
} }
public function getFieldGroupKey() {
return HeraldRelatedFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
$revision = $this->getAdapter()->loadDifferentialRevision(); $revision = $this->getAdapter()->loadDifferentialRevision();

View file

@ -9,6 +9,10 @@ final class DiffusionPreCommitContentAffectedFilesHeraldField
return pht('Affected files'); return pht('Affected files');
} }
public function getFieldGroupKey() {
return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->getDiffContent('name'); return $this->getAdapter()->getDiffContent('name');
} }

View file

@ -9,6 +9,10 @@ final class DiffusionPreCommitContentDiffContentAddedHeraldField
return pht('Added diff content'); return pht('Added diff content');
} }
public function getFieldGroupKey() {
return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->getDiffContent('+'); return $this->getAdapter()->getDiffContent('+');
} }

View file

@ -9,6 +9,10 @@ final class DiffusionPreCommitContentDiffContentHeraldField
return pht('Diff content'); return pht('Diff content');
} }
public function getFieldGroupKey() {
return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->getDiffContent('*'); return $this->getAdapter()->getDiffContent('*');
} }

View file

@ -9,6 +9,10 @@ final class DiffusionPreCommitContentDiffContentRemovedHeraldField
return pht('Removed diff content'); return pht('Removed diff content');
} }
public function getFieldGroupKey() {
return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->getDiffContent('-'); return $this->getAdapter()->getDiffContent('-');
} }

View file

@ -9,6 +9,10 @@ final class DiffusionPreCommitContentDiffEnormousHeraldField
return pht('Diff is enormous'); return pht('Diff is enormous');
} }
public function getFieldGroupKey() {
return DiffusionChangeHeraldFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->isDiffEnormous(); return $this->getAdapter()->isDiffEnormous();
} }

View file

@ -14,4 +14,8 @@ abstract class DiffusionPreCommitContentHeraldField extends HeraldField {
return true; return true;
} }
public function getFieldGroupKey() {
return DiffusionCommitHeraldFieldGroup::FIELDGROUPKEY;
}
} }

View file

@ -9,6 +9,10 @@ final class DiffusionPreCommitContentRevisionAcceptedHeraldField
return pht('Accepted Differential revision'); return pht('Accepted Differential revision');
} }
public function getFieldGroupKey() {
return HeraldRelatedFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
$revision = $this->getAdapter()->getRevision(); $revision = $this->getAdapter()->getRevision();

View file

@ -9,6 +9,10 @@ final class DiffusionPreCommitContentRevisionHeraldField
return pht('Differential revision'); return pht('Differential revision');
} }
public function getFieldGroupKey() {
return HeraldRelatedFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
$revision = $this->getAdapter()->getRevision(); $revision = $this->getAdapter()->getRevision();

View file

@ -9,6 +9,10 @@ final class DiffusionPreCommitContentRevisionReviewersHeraldField
return pht('Differential reviewers'); return pht('Differential reviewers');
} }
public function getFieldGroupKey() {
return HeraldRelatedFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
$revision = $this->getAdapter()->getRevision(); $revision = $this->getAdapter()->getRevision();

View file

@ -9,6 +9,10 @@ final class DiffusionPreCommitContentRevisionSubscribersHeraldField
return pht('Differential subscribers'); return pht('Differential subscribers');
} }
public function getFieldGroupKey() {
return HeraldRelatedFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
$revision = $this->getAdapter()->getRevision(); $revision = $this->getAdapter()->getRevision();

View file

@ -14,4 +14,8 @@ abstract class DiffusionPreCommitRefHeraldField extends HeraldField {
return true; return true;
} }
public function getFieldGroupKey() {
return DiffusionPreCommitRefHeraldFieldGroup::FIELDGROUPKEY;
}
} }

View file

@ -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;
}
}

View file

@ -312,6 +312,16 @@ abstract class HeraldAdapter extends Phobject {
return mpull($this->getFieldImplementationMap(), 'getHeraldFieldName'); return mpull($this->getFieldImplementationMap(), 'getHeraldFieldName');
} }
public function getFieldGroupKey($field_key) {
$field = $this->getFieldImplementation($field_key);
if (!$field) {
return null;
}
return $field->getFieldGroupKey();
}
/* -( Conditions )--------------------------------------------------------- */ /* -( Conditions )--------------------------------------------------------- */

View file

@ -435,14 +435,43 @@ final class HeraldRuleController extends HeraldController {
} }
} }
$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 = array();
$config_info['fields'] = $field_map; $config_info['fields'] = $groups;
$config_info['conditions'] = $all_conditions; $config_info['conditions'] = $all_conditions;
$config_info['actions'] = $action_map; $config_info['actions'] = $action_map;
$config_info['valueMap'] = array(); $config_info['valueMap'] = array();
foreach ($config_info['fields'] as $field => $name) { foreach ($field_map as $field => $name) {
try { try {
$field_conditions = $adapter->getConditionsForField($field); $field_conditions = $adapter->getConditionsForField($field);
} catch (Exception $ex) { } catch (Exception $ex) {
@ -451,7 +480,7 @@ final class HeraldRuleController extends HeraldController {
$config_info['conditionMap'][$field] = $field_conditions; $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) { foreach ($config_info['conditionMap'][$field] as $condition) {
$value_key = $adapter->getValueTypeForFieldAndCondition( $value_key = $adapter->getValueTypeForFieldAndCondition(
$field, $field,

View file

@ -8,6 +8,10 @@ final class HeraldAlwaysField extends HeraldField {
return pht('Always'); return pht('Always');
} }
public function getFieldGroupKey() {
return HeraldBasicFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return true; return true;
} }

View file

@ -8,6 +8,10 @@ final class HeraldAnotherRuleField extends HeraldField {
return pht('Another Herald rule'); return pht('Another Herald rule');
} }
public function getFieldGroupKey() {
return HeraldBasicFieldGroup::FIELDGROUPKEY;
}
public function supportsObject($object) { public function supportsObject($object) {
return true; return true;
} }

View file

@ -0,0 +1,15 @@
<?php
final class HeraldBasicFieldGroup extends HeraldFieldGroup {
const FIELDGROUPKEY = 'herald';
public function getGroupLabel() {
return pht('Herald');
}
protected function getGroupOrder() {
return 10000;
}
}

View file

@ -8,6 +8,10 @@ final class HeraldContentSourceField extends HeraldField {
return pht('Content source'); return pht('Content source');
} }
public function getFieldGroupKey() {
return HeraldEditFieldGroup::FIELDGROUPKEY;
}
public function getHeraldFieldValue($object) { public function getHeraldFieldValue($object) {
return $this->getAdapter()->getContentSource()->getSource(); return $this->getAdapter()->getContentSource()->getSource();
} }

View file

@ -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;
}
}

View file

@ -16,6 +16,10 @@ abstract class HeraldField extends Phobject {
abstract public function getHeraldFieldName(); abstract public function getHeraldFieldName();
abstract public function getHeraldFieldValue($object); abstract public function getHeraldFieldValue($object);
public function getFieldGroupKey() {
return null;
}
protected function getHeraldFieldStandardType() { protected function getHeraldFieldStandardType() {
throw new PhutilMethodNotImplementedException(); throw new PhutilMethodNotImplementedException();
} }

View file

@ -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();
}
}

View file

@ -8,6 +8,10 @@ final class HeraldNewObjectField extends HeraldField {
return pht('Is newly created'); return pht('Is newly created');
} }
public function getFieldGroupKey() {
return HeraldEditFieldGroup::FIELDGROUPKEY;
}
public function supportsObject($object) { public function supportsObject($object) {
return !$this->getAdapter()->isSingleEventAdapter(); return !$this->getAdapter()->isSingleEventAdapter();
} }

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -2,6 +2,10 @@
abstract class ManiphestTaskHeraldField extends HeraldField { abstract class ManiphestTaskHeraldField extends HeraldField {
public function getFieldGroupKey() {
return ManiphestTaskHeraldFieldGroup::FIELDGROUPKEY;
}
public function supportsObject($object) { public function supportsObject($object) {
return ($object instanceof ManiphestTask); return ($object instanceof ManiphestTask);
} }

View file

@ -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;
}
}

View file

@ -6,7 +6,11 @@ final class PhabricatorMetaMTAApplicationEmailHeraldField
const FIELDCONST = 'application-email'; const FIELDCONST = 'application-email';
public function getHeraldFieldName() { public function getHeraldFieldName() {
return pht('Receiving email address'); return pht('Receiving email addresses');
}
public function getFieldGroupKey() {
return HeraldEditFieldGroup::FIELDGROUPKEY;
} }
public function supportsObject($object) { public function supportsObject($object) {

View file

@ -6,4 +6,8 @@ abstract class PholioMockHeraldField extends HeraldField {
return ($object instanceof PholioMock); return ($object instanceof PholioMock);
} }
public function getFieldGroupKey() {
return PholioMockHeraldFieldGroup::FIELDGROUPKEY;
}
} }

View file

@ -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;
}
}

View file

@ -6,4 +6,7 @@ abstract class PhrictionDocumentHeraldField extends HeraldField {
return ($object instanceof PhrictionDocument); return ($object instanceof PhrictionDocument);
} }
public function getFieldGroupKey() {
return PhrictionDocumentHeraldFieldGroup::FIELDGROUPKEY;
}
} }

View file

@ -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;
}
}

View file

@ -8,6 +8,10 @@ final class HeraldProjectsField extends HeraldField {
return pht('Projects'); return pht('Projects');
} }
public function getFieldGroupKey() {
return HeraldSupportFieldGroup::FIELDGROUPKEY;
}
public function supportsObject($object) { public function supportsObject($object) {
return ($object instanceof PhabricatorProjectInterface); return ($object instanceof PhabricatorProjectInterface);
} }

View file

@ -8,6 +8,10 @@ final class HeraldSpaceField extends HeraldField {
return pht('Space'); return pht('Space');
} }
public function getFieldGroupKey() {
return HeraldSupportFieldGroup::FIELDGROUPKEY;
}
public function supportsObject($object) { public function supportsObject($object) {
return ($object instanceof PhabricatorSpacesInterface); return ($object instanceof PhabricatorSpacesInterface);
} }

View file

@ -8,6 +8,10 @@ final class HeraldSubscribersField extends HeraldField {
return pht('Subscribers'); return pht('Subscribers');
} }
public function getFieldGroupKey() {
return HeraldSupportFieldGroup::FIELDGROUPKEY;
}
public function supportsObject($object) { public function supportsObject($object) {
return ($object instanceof PhabricatorSubscribableInterface); return ($object instanceof PhabricatorSubscribableInterface);
} }

View file

@ -15,6 +15,10 @@ final class PhabricatorCustomFieldHeraldField extends HeraldField {
return $this->customField; return $this->customField;
} }
public function getFieldGroupKey() {
return PhabricatorCustomFieldHeraldFieldGroup::FIELDGROUPKEY;
}
public function supportsObject($object) { public function supportsObject($object) {
return ($object instanceof PhabricatorCustomFieldInterface); return ($object instanceof PhabricatorCustomFieldInterface);
} }

View file

@ -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;
}
}

View file

@ -320,10 +320,25 @@ JX.install('HeraldRuleEditor', {
this._onfieldchange(r); this._onfieldchange(r);
}, },
_renderCondition : function(row_id) { _renderCondition : function(row_id) {
var field_select = this._renderSelect( var groups = this._config.info.fields;
this._config.info.fields,
this._config.conditions[row_id][0], var optgroups = [];
'field-select'); 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 field_cell = JX.$N('td', {sigil: 'field-cell'}, field_select);
var condition_cell = JX.$N('td', {sigil: 'condition-cell'}); var condition_cell = JX.$N('td', {sigil: 'condition-cell'});