Page MenuHomePhorge

"Any" & "Not In" query operators should also involve project's direct milestones
Open, LowPublic

Description

The "Any" & "Not In" query operators don't work as expected if a given project has milestones (and/or subprojects? but we have only good examples about milestones).

Example (filtering out tasks assigned to specific teams):

I would expect the "Not In: Data-Platform-SRE" operator to filter the tasks out if they are related to its direct milestones.

Note that stuff tagged on a milestone is always about the related project, because milestones cannot have their own members (so, their members scope is the same of the project).

Non-workarounds:

  • stuff tagged on a milestone cannot be also tagged on a project as workaround
  • we cannot use a workaround filter by Not In(project, its_milestone1, its_milestone2, its_milestone3, its_milestone4... 9999) to include all the project milestones, since milestones are potentially so much, and we would need to update such filter every month/week/day just because the default is wrong and just because a week is passed and another milestone (/sprint) was created.
  • we should not create another weird function like Not In Project And Not in its Milestones. The reason is, even with that function, we should then note that the old function really does Not in Project but in its Milestones and it's still nonsense, and probably nobody will use that (or, if they would really love to use a Not in Project but in its Milestones that should be be a weird advanced feature - not the default).

. Just improving the current Not In would complete the missing feature, to cover the missing milestones support.

Known Possible Pitfalls:

  • note that technically a milestone is a "sub-project", but this task is not about including sub-projects in general, but only about including direct milestones

Non-features:

  • this task is not about including all milestones from all sub-projects, but only about including direct-milestones of a project - see https://we.phorge.it/T15828#22480

Proposed Solution

Change the default Not In: project:

  • πŸ”΄ from Not in Project but yes in its direct Milestones
  • πŸ’š to: Not in Project and not in its direct Milestones

@valerio.bozzolan pointed out that this was captured in a (still open) Phabricator bug https://secure.phabricator.com/T12438 (archive URL: https://web.archive.org/web/20250126121619/https://secure.phabricator.com/T12438).

Downstream bug report: https://phabricator.wikimedia.org/T386830

Event Timeline

Super-useful comment:

I also ran into this issue, as reported in https://secure.phabricator.com/T12438 it also affects the "In Any" (or any()) searches, and makes it impossible to search for tasks that are in projectA or projectB, which seems quite a common use case:

  • Searching for projectA returns both tasks tagged with projectA and tasks tagged with any milestone of projectA
  • Searching for any(projectA) any(projectB) returns tasks tagged with either projectA or projectB, but does not return tasks that are tagged with a milestone associated with projectA or projectB.

@valerio.bozzolan thanks for copy-pasting my comment, I didn't see a task was already created because I only checked the Bug Reports workboard. Should the Bug Reports tag be added to this task?

Interesting triage. In legacy upstream this was a "feature request 🌈" - https://secure.phabricator.com/T12438

Let's wait a blessed comment from experienced Blessed Committers

A_smart_kitten subscribed.

Gonna boldly call it a bug, given that I was about to file an upstream bug report for https://phabricator.wikimedia.org/T386830 before I came across this task :)

I'll reframe this task to also include the "any" query, given that the Phabricator task linked from here also grouped those two query functions together.

A_smart_kitten renamed this task from "Not In" query operator is not respected when searching for project milestones to "Any" & "Not In" query operators are not respected when searching for subprojects/milestones of a given project.Fri, May 16, 10:25
A_smart_kitten updated the task description. (Show Details)

OK hackers, thanks for stimulating a follow-up. I've studied this a bit and I have a more clear opinion. Let's write some notes down.

First of all, I see the point of @A_smart_kitten and we probably have something very do-able to be implemented, but let's limit the scope! let's split this task in 3 parts:

  • πŸ’š Part 1: the any(project) should consider its direct milestones (?)
    • πŸ’š the direct milestones were really the problem of the original task since 2017 https://web.archive.org/web/20250126121619/https://secure.phabricator.com/T12438#216588
    • πŸ’š the direct milestones are still the problem of this specific Phorge task (T15828) about #Data-Platform-SRE team of WMF that has milestones and they indeed are becoming crazy because of milestones
    • πŸ’š so β†’ the direct milestones are clearly creating confusing things in this workflow
    • πŸ’š all project Milestones are always semantically 1:1 with their project scope. A milestone cannot have their own members, their own team. So a milestone should be semantically considered as part of that project (this is 100% true at least its direct project)
    • πŸ’š a project can have infinite milestones and milestones can be so much, so much, sooooo much, e.g. one milestone for each week, so, a workaround filter like any(milestone1, milestone2, milestone3, ...) to be kept up to date would be not feasible and would be unfeasible and nonsense (also because milestones potentially grow like uncontrolled mushrooms in a rainy forest πŸ„, so, potentially with a very fast growing curve compared to sub-project)
    • πŸ’š short answer: yes! ⭐ direct milestones should be included as default in that filter. Direct milestones are semantically part of that project.
    • πŸ”Ά note that all tasks about this topic are completely stuck because we involve sub-projects in the discussion
  • πŸ”Ά Part 2: the any(project) should consider its sub-projects (?) UNKNOWN? NO(?) 🌈 β†’ probably completely separated task β†’ and probably declined
    • πŸ”Ά both bug reports are stuck while involving sub-projects in the discussion lol
    • πŸ”Ά the task since 2017 was not reporting a real-world example about involving sub-projects https://web.archive.org/web/20250126121619/https://secure.phabricator.com/T12438#216551
    • πŸ”Ά this task (T15828) is not reporting a real-world thing about this use with sub-projects
    • πŸ”Ά each sub-project is designed to allow different members, different purposes, different goals, different scopes, so, it's absolutely not obvious why we should change any(project) to automagically include also these sub-projects. Only 1 level? all levels? This is a semantic rabbit hole.
    • πŸ”Ά The direct sub-projects has usually a very reduced cardinality, compared to milestones, so , a workaround like any(sub-project1, sub-project2, sub-project3, ...) would make sense and it would be easy to be kept updated, since, again, sub-projects are usually not so much time-based (again, compared to milestones - because sub-projects potentially grow in number like the amount of startups 🏒 started by lumberjacks, so, usually less than milestones which, as already said, milestones usually grow in number like Β«uncontrolled mushrooms in a rainy forestΒ» bla bla πŸ„ lol)
    • πŸ”Ά Since 2017 Evan proposed 2 solutions to manage both milestones and sub-projects, one solution was over-engineered, the other solution was super-mega-iper-engineered instead but, interestingly, both solutions do not fix the very specific original report, that was "only" about direct-milestones and not about sub-projects, so both solutions could still give sub-project results that the original user did not want - https://web.archive.org/web/20250126121619/https://secure.phabricator.com/T12438#216588
    • πŸ”Ά short answer: probably no! πŸ”΄ Sub-projects should not be included as default until having a completely dedicated task and dedicated real-world examples that would not burn already-existing workflows (plus, I've already shared that a feasible search workaround exists for sub-projects).
  • πŸ”Ά Part 3: the any(project) should consider all its milestones, recursively (?) UNKNOWN? NO(?) 🌈
    • πŸ”Ά read again aloud the Part 2, since it has sense also for this point.

So, in order to be in line with the known real-world examples (that are about: direct milestones) and in order to be in line with what is actually feasible (that is, about: direct milestones)...


TL;DR

I boldly rename this task in a way that only involves "direct milestones" πŸ‘ and I invite people in creating a prototype patch that changes the default behavior of any(project) to also include its direct milestones. Also, I consider this as a feature, and I consider the "filter by milestone" as feature-incomplete. Feel free to tag accordingly.

Triaging a bit more than "Wishlist" and a bit less than "Normal" since a prototype is actionable but we still lived years without this... so, "Low".

valerio.bozzolan renamed this task from "Any" & "Not In" query operators are not respected when searching for subprojects/milestones of a given project to "Any" & "Not In" query operators should also involve project's direct milestones.Fri, May 16, 12:39
valerio.bozzolan triaged this task as Low priority.
valerio.bozzolan updated the task description. (Show Details)
  • πŸ”Ά this task (T15828) is not reporting a real-world thing about this use with sub-projects

FWIW, my use case from today in terms of sub-projects was attempting to search tasks on Wikimedia Phabricator that were tagged with either #MediaWiki-Recent-changes or #Edit-Review-Improvements (or a subproject thereof).

IMO the behaviour here should also be consistent between searching by a project itself, and searching by a project using any(): currently, the former type of search does include subprojects (e.g., https://phabricator.wikimedia.org/maniphest/query/X.VnbIJ47qTV/), while the latter does not.

From my perspective, feel free to split/reframe the task however is best :) - apologies if I shouldn't have conflated milestones and subprojects here!

@A_smart_kitten you are super-super-welcome if you create another parent task like this https://web.archive.org/web/20250218071010/https://secure.phabricator.com/T12486 so " Search any and exclude-by-tag doesn't work consistently with milestones and subprojects" - since I completely agree on your point but I'm unsure how to manage it, so here T15828 we become just one of your sub-tasks.