Page MenuHomePhabricator

Allow projects to have subprojects
Closed, DuplicatePublic

Description

See also T237. This is technically fairly easy but there are a few UI things to sort out:

  • When you view a Project page, do we pull in tasks for subprojects?
  • When you filter tasks by a project, do we pull in subprojects?
  • If the answers for these questions are different, how bewildered are users going to be?

My gut on this is to just show a list of subprojects with an open task count, rather than pulling in the actual subtasks. I think this will provide a good balance between getting an overview of the project as a whole, having filters behave consistently, and not creating any queries that are difficult to scale.

Revisions and Commits

Event Timeline

epriestley triaged this task as Normal priority.
epriestley added a project: Projects.
epriestley added subscribers: epriestley, danielraffel.

@cadamo, this is related to T135 if you want to take a shot at it (just steal it from me if you do). Rough guide for implementation:

  • Add a subprojectPHIDs field to projects.
  • Add a join table which gets updated on save (so we can do parent queries performantly), see D603 for a good simple example of something similar.
  • Add a tokenizer to the "Edit Project" interface so you can specify subprojects.
  • Detect cycles introduced between subprojects. This is kind of tricky. There's an example in D595 but that diff is nasty. You can ignore this for now if you want since the world won't end if there's a graph cycle, but we should definitely land this soonish. Since this is a semi-common and semi-tricky problem, I might try to just factor out the code so we can reuse it.
  • On the project page, show subprojects. I think the easiest thing is just to use the same table on /project/ (convert it into a View) but only select the subprojects.

We might be able to do better with the UI too, but I think that's a good starting point and then we can play around with stuff.

Oh, also the project page should query the join table and display any parent projects.

epriestley changed file(s), attached 0: ; detached 0: .Jul 15 2011, 5:47 PM
cadamo claimed this task.Jul 15 2011, 8:39 PM

Hey! I'm back! ... okay, I'll give it a shot.

Awesome! There's a generic solution for the cycle detection stuff in D670 that I think should make it easier to deal with when you get there.

epriestley changed file(s), attached 0: ; detached 0: .Jul 18 2011, 8:20 PM

I was thinking about cycle detection, what you want to do with that is:

    • Detect "circular" inclusion, I mean, let say we have A, B and C as projects. A is the parent project for B and B is the parent of C, but C (or even B) have 'A' as subproject. Is true that these are transitives but not backward, so we have to denied the addition of A or B as subproject on C.
  • Detect transitivity and add a subproject of a subproject as subproject of the main project ( sounds weird hahaha)

right, wront? more or less? haha

Yeah, I want to detect circular inclusion and reject it. D670 should let us do that pretty easily.

I don't think we need/want to add all grandchild-projects as child-projects. I think that will make the hierarchy less useful. We might eventually want to query all descendants in some interfaces (e.g., show me every task related to this project in any way) but I don't think that's too important for now.

yeah I think that (2) is not useful and it could make, in some cases, the amount of project to be included could be huge and will mess the ui without any "advantage"

Good thanks, I'll take a look on this.

Is this still something you want to do @epriestley?

epriestley closed this task as Wontfix.Aug 13 2012, 9:22 PM

Maybe after {T390}/T603: Support permissions/policies in all Phabricator applications, but I'm going to close this incarnation until after that.

unitof added a subscriber: unitof.Jul 31 2015, 4:48 PM
unitof closed this task as a duplicate of T3670: Add subprojects.Jul 31 2015, 5:06 PM
chad changed the visibility from "All Users" to "Public (No Login Required)".Jul 31 2015, 5:43 PM