From 27ecedd1d5d839bdf5259eab9a7824491d595e28 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 9 Jan 2017 07:35:54 -0800 Subject: [PATCH] Use some more human-readable Conduit keys in updated API methods Summary: Ref T12074. This uses more consistent Conduit keys for constraint names. This is a minor compatibility break on watchers/members but since these methods are more useful now this is probably a good time to try to get away with it, and a more consistent API is better in the long run. I need to issue compatibility guidance for the milestones thing anyway and that one isn't avoidable, so try to rip the bandage off all in one go. Test Plan: Reviewed new constraint names from console, called methods using them. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12074 Differential Revision: https://secure.phabricator.com/D17161 --- .../project/query/PhabricatorProjectColumnSearchEngine.php | 1 + .../project/query/PhabricatorProjectSearchEngine.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/applications/project/query/PhabricatorProjectColumnSearchEngine.php b/src/applications/project/query/PhabricatorProjectColumnSearchEngine.php index 421ba37929..0658ec75b0 100644 --- a/src/applications/project/query/PhabricatorProjectColumnSearchEngine.php +++ b/src/applications/project/query/PhabricatorProjectColumnSearchEngine.php @@ -20,6 +20,7 @@ final class PhabricatorProjectColumnSearchEngine id(new PhabricatorPHIDsSearchField()) ->setLabel(pht('Projects')) ->setKey('projectPHIDs') + ->setConduitKey('projects') ->setAliases(array('project', 'projects', 'projectPHID')), ); } diff --git a/src/applications/project/query/PhabricatorProjectSearchEngine.php b/src/applications/project/query/PhabricatorProjectSearchEngine.php index 49a989eb4b..5c153be5a4 100644 --- a/src/applications/project/query/PhabricatorProjectSearchEngine.php +++ b/src/applications/project/query/PhabricatorProjectSearchEngine.php @@ -24,10 +24,12 @@ final class PhabricatorProjectSearchEngine id(new PhabricatorUsersSearchField()) ->setLabel(pht('Members')) ->setKey('memberPHIDs') + ->setConduitKey('members') ->setAliases(array('member', 'members')), id(new PhabricatorUsersSearchField()) ->setLabel(pht('Watchers')) ->setKey('watcherPHIDs') + ->setConduitKey('watchers') ->setAliases(array('watcher', 'watchers')), id(new PhabricatorSearchSelectField()) ->setLabel(pht('Status')) @@ -55,11 +57,13 @@ final class PhabricatorProjectSearchEngine id(new PhabricatorPHIDsSearchField()) ->setLabel(pht('Parent Projects')) ->setKey('parentPHIDs') + ->setConduitKey('parents') ->setAliases(array('parent', 'parents', 'parentPHID')) ->setDescription(pht('Find direct subprojects of specified parents.')), id(new PhabricatorPHIDsSearchField()) ->setLabel(pht('Ancestor Projects')) ->setKey('ancestorPHIDs') + ->setConduitKey('ancestors') ->setAliases(array('ancestor', 'ancestors', 'ancestorPHID')) ->setDescription( pht('Find all subprojects beneath specified ancestors.')),