diff --git a/src/applications/harbormaster/storage/configuration/HarbormasterBuildPlan.php b/src/applications/harbormaster/storage/configuration/HarbormasterBuildPlan.php --- a/src/applications/harbormaster/storage/configuration/HarbormasterBuildPlan.php +++ b/src/applications/harbormaster/storage/configuration/HarbormasterBuildPlan.php @@ -233,15 +233,31 @@ ->setKey('status') ->setType('map') ->setDescription(pht('The current status of this build plan.')), + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('behaviors') + ->setType('map') + ->setDescription(pht('Behavior configuration for the build plan.')), ); } public function getFieldValuesForConduit() { + $behavior_map = array(); + + $behaviors = HarbormasterBuildPlanBehavior::newPlanBehaviors(); + foreach ($behaviors as $behavior) { + $option = $behavior->getPlanOption($this); + + $behavior_map[$behavior->getKey()] = array( + 'value' => $option->getKey(), + ); + } + return array( 'name' => $this->getName(), 'status' => array( 'value' => $this->getPlanStatus(), ), + 'behaviors' => $behavior_map, ); }