Page MenuHomePhabricator

Add basic, rough support for changing field behavior based on object subtype
ClosedPublic

Authored by epriestley on Feb 13 2019, 5:19 PM.
Tags
None
Referenced Files
F15464456: D20161.id.diff
Wed, Apr 2, 9:43 AM
F15462285: D20161.id.diff
Tue, Apr 1, 1:40 PM
F15459335: D20161.diff
Mon, Mar 31, 12:00 PM
F15456302: D20161.diff
Sun, Mar 30, 8:30 AM
F15444851: D20161.diff
Thu, Mar 27, 11:36 AM
F15430933: D20161.id48190.diff
Mon, Mar 24, 9:46 AM
F15424778: D20161.diff
Sun, Mar 23, 12:18 AM
F15422805: D20161.id48190.diff
Sat, Mar 22, 10:49 AM
Subscribers

Details

Summary

Ref T13248. This will probably need quite a bit of refinement, but we can reasonably allow subtype definitions to adjust custom field behavior.

Some places where we use fields are global, and always need to show all the fields. For example, on /maniphest/, where you can search across all tasks, you need to be able to search across all fields that are present on any task.

Likewise, if you "export" a bunch of tasks into a spreadsheet, we need to have columns for every field.

However, when you're clearly in the scope of a particular task (like viewing or editing T123), there's no reason we can't hide fields based on the task subtype.

To start with, allow subtypes to override "disabled" and "name" for custom fields.

Test Plan
  • Defined several custom fields and several subtypes.
  • Disabled/renamed some fields for some subtypes.
  • Viewed/edited tasks of different subtypes, got desired field behavior.

Diff Detail

Repository
rP Phabricator
Branch
subfield2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21984
Build 30027: Run Core Tests
Build 30026: arc lint + arc unit