Page MenuHomePhabricator

Support subtypes in Projects
ClosedPublic

Authored by epriestley on Jan 27 2019, 4:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 9:30 AM
Unknown Object (File)
Sat, Apr 6, 12:43 AM
Unknown Object (File)
Mon, Apr 1, 12:32 AM
Unknown Object (File)
Sun, Mar 31, 6:23 AM
Unknown Object (File)
Sat, Mar 30, 7:04 PM
Unknown Object (File)
Wed, Mar 27, 10:08 PM
Unknown Object (File)
Wed, Mar 27, 5:20 PM
Unknown Object (File)
Wed, Mar 27, 5:20 PM
Subscribers
Restricted Owners Package

Details

Summary

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

Repository
rP Phabricator
Branch
subtype1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21735
Build 29656: Run Core Tests
Build 29655: arc lint + arc unit

Event Timeline

Owners added a subscriber: Restricted Owners Package.Jan 27 2019, 4:59 PM
  • Actually make query filtering work.
  • Add "subtype" to Conduit.

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.

src/applications/project/query/PhabricatorProjectSearchEngine.php
73

"Search for projects"

This revision is now accepted and ready to land.Jan 29 2019, 2:25 AM
  • Correct copy/pasted comment.
src/applications/project/query/PhabricatorProjectSearchEngine.php
73

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.