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
F18649305: D17154.diff
Sep 20 2025, 7:58 PM
F18649272: D17154.diff
Sep 20 2025, 7:53 PM
F18649239: D17154.diff
Sep 20 2025, 7:42 PM
F18622746: D17154.id41258.diff
Sep 15 2025, 12:50 PM
F18604465: D17154.diff
Sep 13 2025, 6:54 PM
F18566029: D17154.id.diff
Sep 9 2025, 2:14 PM
F18513777: D17154.diff
Sep 5 2025, 9:44 AM
F18500422: D17154.diff
Sep 4 2025, 9:03 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
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.