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
F13273652: D20161.diff
Fri, May 31, 2:20 AM
F13258266: D20161.id48190.diff
Sun, May 26, 7:57 AM
F13236705: D20161.diff
Tue, May 21, 10:32 AM
F13233751: D20161.diff
Tue, May 21, 2:33 AM
F13221358: D20161.id.diff
Sun, May 19, 2:41 AM
F13211951: D20161.diff
Fri, May 17, 6:15 AM
F13197005: D20161.diff
Sun, May 12, 11:44 PM
Unknown Object (File)
May 3 2024, 8:02 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable