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
F15428451: D17154.diff
Sun, Mar 23, 8:26 PM
F15416433: D17154.diff
Thu, Mar 20, 11:02 AM
F15412217: D17154.id41258.diff
Wed, Mar 19, 11:50 AM
F15400381: D17154.diff
Mon, Mar 17, 11:20 AM
F15391625: D17154.diff
Sat, Mar 15, 10:46 AM
F15389654: D17154.diff
Sat, Mar 15, 5:32 AM
F15388911: D17154.id.diff
Sat, Mar 15, 4:38 AM
F15376110: D17154.diff
Thu, Mar 13, 1:48 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.