Page MenuHomePhabricator

Add "parent" and "ancestor" information to the project.search API
ClosedPublic

Authored by epriestley on Jan 8 2017, 7:48 PM.
Tags
None
Referenced Files
F15468642: D17154.diff
Fri, Apr 4, 3:28 AM
F15464864: D17154.id41258.diff
Wed, Apr 2, 12:57 PM
F15460424: D17154.diff
Mon, Mar 31, 11:00 PM
F15453580: D17154.diff
Sat, Mar 29, 12:47 PM
F15448572: D17154.id41258.diff
Fri, Mar 28, 5:40 AM
F15443258: D17154.id41252.diff
Thu, Mar 27, 3:22 AM
F15442796: D17154.diff
Thu, Mar 27, 12:30 AM
F15436770: D17154.id41258.diff
Tue, Mar 25, 4:32 PM
Subscribers
None

Details

Summary

Ref T12074.

  • Adds a new "parent" property on main results. This shows an abbreviated version of the project's parent, or null if the project is a root project.
  • Adds a new "ancestor" attachment to pull the entire ancestor list.
  • Adds a new "depth" property on main results.
  • You can use "parent" or "depth" to tell if a project is a subproject or not.

These attempt to balance convenience, power, and performance: the full ancestor list can be big so I made it an attachment, but the other stuff isn't too big and is cheap and seems reasonable to always include.

Test Plan

In API results:

  • Saw null parent (root projects) and non-null parent (subprojects/milestones).
  • Used "ancestors" attchment, got full list of ancestors.
  • Saw appropriate "depth" values.

Diff Detail

Repository
rP Phabricator
Branch
project2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 15140
Build 19882: Run Core Tests
Build 19881: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Jan 8 2017, 8:13 PM
This revision was automatically updated to reflect the committed changes.