Page MenuHomePhabricator

Support subtypes in Projects

Authored by epriestley on Jan 27 2019, 4:59 PM.



Ref T13242. See PHI1039. Maniphest subtypes generally seem to be working well. I designed them as a general capability that might be extended to other EditEngine objects later, and PHI1039 describes a situation where extending subtypes to projects would give us some reasonable tools.

(Some installs also already use icons/colors as a sort of lightweight version of subtypes, so I believe this is generally useful capability.)

Some of this is a little bit copy-pasted and could probably be shared, but I'd like to wait a bit longer before merging it. For example, both configs have exactly the same structure right now, but Projects should possibly have some different flags (for example: to disable creating subprojects / milestones).

This implementation is pretty basic for now: notably, subprojects/milestones don't get the nice "choose from among subtype forms" treatment that tasks do. If this ends up being part of a solution to PHI1039, I'd plan to fill that in later on.

Test Plan

Defined multiple subtypes, created subtype forms, created projects with appropriate subtypes. Filtered them by subtype. Saw subtype information on list/detail views.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Jan 27 2019, 4:59 PM
Owners added a subscriber: Restricted Owners Package.Jan 27 2019, 4:59 PM
epriestley requested review of this revision.Jan 27 2019, 5:00 PM
epriestley updated this revision to Diff 47855.Jan 27 2019, 8:07 PM
  • Actually make query filtering work.
  • Add "subtype" to Conduit.
amckinley edited the summary of this revision. (Show Details)Jan 29 2019, 2:12 AM
amckinley accepted this revision.Jan 29 2019, 2:25 AM

FWIW I only read the last few comments on PHI1039, but I think I got the gist of this change. I definitely think we should merge the Maniphest and Projects subtype implementations before adding a third subtype Edit Engine, though. On the other hand, I'm not sure what object would be next in line to get the subtype treatment, so maybe this is all fine.


"Search for projects"

This revision is now accepted and ready to land.Jan 29 2019, 2:25 AM
epriestley updated this revision to Diff 47881.Jan 29 2019, 2:27 AM
  • Correct copy/pasted comment.
epriestley added inline comments.Jan 29 2019, 2:29 AM

Like 95% of these descriptions feel pretty useless/obvious, maybe in some future version I'll try to align the UI to be more like "Optional Notes" and then just specify them when there's something interesting to say (e.g., this flag does specific thing X or you can use this field in weird way Y). They only show up in the Conduit help for *.search and *.edit methods, today.

Idle thought, but maybe the next object is User. "Mailing List" and "Bot" would be reasonably natural fits. But this might create more complexity than it reduces, and letting installs customize user subtypes seems like asking for trouble...

This revision was automatically updated to reflect the committed changes.