Page MenuHomePhabricator

Index Project milestones to accurately reflect milestone membership
ClosedPublic

Authored by amckinley on May 26 2017, 7:56 PM.
Tags
None
Referenced Files
F15479888: D18033.id43374.diff
Tue, Apr 8, 9:59 AM
F15468370: D18033.id43373.diff
Thu, Apr 3, 11:54 PM
F15467146: D18033.id.diff
Thu, Apr 3, 1:08 PM
F15464880: D18033.diff
Wed, Apr 2, 1:00 PM
F15412609: D18033.id43372.diff
Wed, Mar 19, 1:59 PM
F15407551: D18033.diff
Tue, Mar 18, 6:15 PM
F15403477: D18033.id43373.diff
Tue, Mar 18, 3:32 AM
F15337267: D18033.diff
Mar 9 2025, 5:03 AM
Subscribers
Tokens
"Doubloon" token, awarded by epriestley.

Details

Summary

Fixes T12505. PhabricatorProjectsMembershipIndexEngineExtension->materializeProject() was incorrectly bailing early for milestone objects, which prevented milestone members from being calculated correctly. This was causing problems where (for example) an Owners package owned by a milestone wasn't being satisfied when a member of the milestone approved a revision.

Test Plan

Invoked migration, observed that a user's milestones correctly showed up when searched for. Also observed that accepting a revision on behalf of a milestone now satisfies Owners rules.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley added inline comments.
src/applications/project/engineextension/PhabricatorProjectsMembershipIndexEngineExtension.php
41–61

We could do the isMilestone() test earlier and skip this extra query I think -- we know milestones never have subprojects or descendants.

This revision is now accepted and ready to land.May 26 2017, 7:57 PM
src/applications/project/engineextension/PhabricatorProjectsMembershipIndexEngineExtension.php
63–66

Actually, since milestones can't have sub-milestones, this is probably better written by adding another clause to the existing if statement.

src/applications/project/engineextension/PhabricatorProjectsMembershipIndexEngineExtension.php
41–61

Jinx, I owe you a coke!

  • dont check for subprojects on milestones

(That update looks right to me.)

This revision was automatically updated to reflect the committed changes.