Home GnuPG

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

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

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

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.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12074

Differential Revision: https://secure.phabricator.com/D17154

Details

Provenance
epriestley <git@epriestley.com>Authored on Jan 8 2017, 8:39 PM
Parents
rPHABe03103f34920: Return milestone information in project.search
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHABc0bec6c0ed81: Add "parent" and "ancestor" information to the project.search API (authored by epriestley <git@epriestley.com>).Jan 8 2017, 10:14 PM