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
Unknown Object (File)
Thu, Apr 25, 1:38 AM
Unknown Object (File)
Thu, Apr 11, 9:25 AM
Unknown Object (File)
Mon, Apr 1, 7:36 PM
Unknown Object (File)
Mar 17 2024, 7:13 PM
Unknown Object (File)
Mar 13 2024, 3:23 AM
Unknown Object (File)
Mar 10 2024, 10:39 PM
Unknown Object (File)
Jan 21 2024, 8:21 AM
Unknown Object (File)
Jan 13 2024, 9:33 PM
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
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 17282
Build 23151: Run Core Tests
Build 23150: arc lint + arc unit

Event Timeline

epriestley added inline comments.
src/applications/project/engineextension/PhabricatorProjectsMembershipIndexEngineExtension.php
42–56

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
58–61

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
42–56

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.