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):
- With Tags = #Data-Platform-SRE https://phabricator.wikimedia.org/maniphest/query/Sy6OU1BCQoDE/#R returns task T358268 as expected
- With Tags = Not In #Data-Platform-SRE https://phabricator.wikimedia.org/maniphest/query/QrhqcVd72bLV/#R returns task T358268 (tagged with the direct milestone Data-Platform-SRE (2024.03.25 - 2024.04.14))
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