@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use SearchFields in Maniphest

Summary:
Ref T8441. Ref T7715. Move Maniphest to SearchFields.

The only new tech here is hiding fields, which we use to hide some fields on the dashboard query UI.

Test Plan:
- Queried by each field, including custom fields.
- Used some standrad queries.
- Used dashboards, used standard + custom queries.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

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

+174 -335
+146 -275
src/applications/maniphest/query/ManiphestTaskSearchEngine.php
··· 43 43 ->needProjectPHIDs(true); 44 44 } 45 45 46 - public function buildSavedQueryFromRequest(AphrontRequest $request) { 47 - $saved = new PhabricatorSavedQuery(); 46 + public function buildCustomSearchFields() { 47 + return array( 48 + id(new PhabricatorSearchOwnersField()) 49 + ->setLabel(pht('Assigned To')) 50 + ->setKey('assignedPHIDs') 51 + ->setAliases(array('assigned')), 52 + id(new PhabricatorSearchUsersField()) 53 + ->setLabel(pht('Authors')) 54 + ->setKey('authorPHIDs') 55 + ->setAliases(array('author', 'authors')), 56 + id(new PhabricatorSearchDatasourceField()) 57 + ->setLabel(pht('Statuses')) 58 + ->setKey('statuses') 59 + ->setAliases(array('status')) 60 + ->setDatasource(new ManiphestTaskStatusFunctionDatasource()), 61 + id(new PhabricatorSearchDatasourceField()) 62 + ->setLabel(pht('Priorities')) 63 + ->setKey('priorities') 64 + ->setAliases(array('priority')) 65 + ->setDatasource(new ManiphestTaskPriorityDatasource()), 66 + id(new PhabricatorSearchTextField()) 67 + ->setLabel(pht('Contains Words')) 68 + ->setKey('fulltext'), 69 + id(new PhabricatorSearchThreeStateField()) 70 + ->setLabel(pht('Blocking')) 71 + ->setKey('blocking') 72 + ->setOptions( 73 + pht('(Show All)'), 74 + pht('Show Only Tasks Blocking Other Tasks'), 75 + pht('Hide Tasks Blocking Other Tasks')), 76 + id(new PhabricatorSearchThreeStateField()) 77 + ->setLabel(pht('Blocked')) 78 + ->setKey('blocked') 79 + ->setOptions( 80 + pht('(Show All)'), 81 + pht('Show Only Task Blocked By Other Tasks'), 82 + pht('Hide Tasks Blocked By Other Tasks')), 83 + id(new PhabricatorSearchSelectField()) 84 + ->setLabel(pht('Group By')) 85 + ->setKey('group') 86 + ->setOptions($this->getGroupOptions()), 87 + id(new PhabricatorSearchStringListField()) 88 + ->setLabel(pht('Task IDs')) 89 + ->setKey('ids'), 90 + id(new PhabricatorSearchDateField()) 91 + ->setLabel(pht('Created After')) 92 + ->setKey('createdStart'), 93 + id(new PhabricatorSearchDateField()) 94 + ->setLabel(pht('Created Before')) 95 + ->setKey('createdEnd'), 96 + id(new PhabricatorSearchDateField()) 97 + ->setLabel(pht('Updated After')) 98 + ->setKey('modifiedStart'), 99 + id(new PhabricatorSearchDateField()) 100 + ->setLabel(pht('Updated Before')) 101 + ->setKey('modifiedEnd'), 102 + id(new PhabricatorSearchTextField()) 103 + ->setLabel(pht('Page Size')) 104 + ->setKey('limit'), 105 + ); 106 + } 48 107 49 - $saved->setParameter( 108 + public function getDefaultFieldOrder() { 109 + return array( 50 110 'assignedPHIDs', 51 - $this->readUsersFromRequest($request, 'assigned')); 52 - 53 - $saved->setParameter( 111 + 'projectPHIDs', 54 112 'authorPHIDs', 55 - $this->readUsersFromRequest($request, 'authors')); 56 - 57 - $saved->setParameter( 58 113 'subscriberPHIDs', 59 - $this->readSubscribersFromRequest($request, 'subscribers')); 60 - 61 - $saved->setParameter( 62 114 'statuses', 63 - $this->readListFromRequest($request, 'statuses')); 64 - 65 - $saved->setParameter( 66 115 'priorities', 67 - $this->readListFromRequest($request, 'priorities')); 68 - 69 - $saved->setParameter( 116 + 'fulltext', 70 117 'blocking', 71 - $this->readBoolFromRequest($request, 'blocking')); 72 - $saved->setParameter( 73 118 'blocked', 74 - $this->readBoolFromRequest($request, 'blocked')); 119 + 'group', 120 + 'order', 121 + 'ids', 122 + '...', 123 + 'createdStart', 124 + 'createdEnd', 125 + 'modifiedStart', 126 + 'modifiedEnd', 127 + 'limit', 128 + ); 129 + } 75 130 76 - $saved->setParameter('group', $request->getStr('group')); 77 - $saved->setParameter('order', $request->getStr('order')); 131 + public function getHiddenFields() { 132 + $keys = array(); 78 133 79 - $ids = $request->getStrList('ids'); 80 - foreach ($ids as $key => $id) { 81 - $id = trim($id, ' Tt'); 82 - if (!$id || !is_numeric($id)) { 83 - unset($ids[$key]); 84 - } else { 85 - $ids[$key] = $id; 86 - } 134 + if ($this->getIsBoardView()) { 135 + $keys[] = 'group'; 136 + $keys[] = 'order'; 137 + $keys[] = 'limit'; 87 138 } 88 - $saved->setParameter('ids', $ids); 89 139 90 - $saved->setParameter('fulltext', $request->getStr('fulltext')); 140 + return $keys; 141 + } 91 142 92 - $saved->setParameter( 93 - 'projects', 94 - $this->readProjectsFromRequest($request, 'projects')); 143 + public function buildQueryFromParameters(array $map) { 144 + $query = id(new ManiphestTaskQuery()) 145 + ->needProjectPHIDs(true); 95 146 96 - $saved->setParameter('createdStart', $request->getStr('createdStart')); 97 - $saved->setParameter('createdEnd', $request->getStr('createdEnd')); 98 - $saved->setParameter('modifiedStart', $request->getStr('modifiedStart')); 99 - $saved->setParameter('modifiedEnd', $request->getStr('modifiedEnd')); 147 + if ($map['assignedPHIDs']) { 148 + $query->withOwners($map['assignedPHIDs']); 149 + } 100 150 101 - $limit = $request->getInt('limit'); 102 - if ($limit > 0) { 103 - $saved->setParameter('limit', $limit); 151 + if ($map['authorPHIDs']) { 152 + $query->withAuthors($map['authorPHIDs']); 104 153 } 105 154 106 - $this->readCustomFieldsFromRequest($request, $saved); 155 + if ($map['statuses']) { 156 + $query->withStatuses($map['statuses']); 157 + } 107 158 108 - return $saved; 109 - } 110 - 111 - public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) { 112 - $query = $this->newQuery(); 113 - 114 - $viewer = $this->requireViewer(); 159 + if ($map['priorities']) { 160 + $query->withPriorities($map['priorities']); 161 + } 115 162 116 - $datasource = id(new PhabricatorPeopleUserFunctionDatasource()) 117 - ->setViewer($viewer); 163 + if ($map['createdStart']) { 164 + $query->withDateCreatedAfter($map['createdStart']); 165 + } 118 166 119 - $author_phids = $saved->getParameter('authorPHIDs', array()); 120 - $author_phids = $datasource->evaluateTokens($author_phids); 121 - if ($author_phids) { 122 - $query->withAuthors($author_phids); 167 + if ($map['createdEnd']) { 168 + $query->withDateCreatedBefore($map['createdEnd']); 123 169 } 124 170 125 - $datasource = id(new PhabricatorMetaMTAMailableFunctionDatasource()) 126 - ->setViewer($viewer); 127 - $subscriber_phids = $saved->getParameter('subscriberPHIDs', array()); 128 - $subscriber_phids = $datasource->evaluateTokens($subscriber_phids); 129 - if ($subscriber_phids) { 130 - $query->withSubscribers($subscriber_phids); 171 + if ($map['modifiedStart']) { 172 + $query->withDateModifiedAfter($map['modifiedStart']); 131 173 } 132 174 133 - $datasource = id(new PhabricatorPeopleOwnerDatasource()) 134 - ->setViewer($this->requireViewer()); 135 - 136 - $assigned_phids = $this->readAssignedPHIDs($saved); 137 - $assigned_phids = $datasource->evaluateTokens($assigned_phids); 138 - if ($assigned_phids) { 139 - $query->withOwners($assigned_phids); 175 + if ($map['modifiedEnd']) { 176 + $query->withDateModifiedBefore($map['modifiedEnd']); 140 177 } 141 178 142 - $datasource = id(new ManiphestTaskStatusFunctionDatasource()) 143 - ->setViewer($this->requireViewer()); 144 - $statuses = $saved->getParameter('statuses', array()); 145 - $statuses = $datasource->evaluateTokens($statuses); 146 - if ($statuses) { 147 - $query->withStatuses($statuses); 179 + if ($map['blocking'] !== null) { 180 + $query->withBlockingTasks($map['blocking']); 148 181 } 149 182 150 - $priorities = $saved->getParameter('priorities', array()); 151 - if ($priorities) { 152 - $query->withPriorities($priorities); 183 + if ($map['blocked'] !== null) { 184 + $query->withBlockedTasks($map['blocked']); 153 185 } 154 186 155 - 156 - $query->withBlockingTasks($saved->getParameter('blocking')); 157 - $query->withBlockedTasks($saved->getParameter('blocked')); 158 - 159 - // TODO: This is glue that will be obsolete soon. 160 - $order = $saved->getParameter('order'); 161 - $builtin = $query->getBuiltinOrderAliasMap(); 162 - if (strlen($order) && isset($builtin[$order])) { 163 - $query->setOrder($order); 164 - } else { 165 - $query->setOrder(head_key($builtin)); 187 + if (strlen($map['fulltext'])) { 188 + $query->withFullTextSearch($map['fulltext']); 166 189 } 167 190 168 - $group = $saved->getParameter('group'); 191 + $group = idx($map, 'group'); 169 192 $group = idx($this->getGroupValues(), $group); 170 193 if ($group) { 171 194 $query->setGroupBy($group); ··· 173 196 $query->setGroupBy(head($this->getGroupValues())); 174 197 } 175 198 176 - $ids = $saved->getParameter('ids'); 177 - if ($ids) { 178 - $query->withIDs($ids); 179 - } 199 + if ($map['ids']) { 200 + $ids = $map['ids']; 201 + foreach ($ids as $key => $id) { 202 + $id = trim($id, ' Tt'); 203 + if (!$id || !is_numeric($id)) { 204 + unset($ids[$key]); 205 + } else { 206 + $ids[$key] = $id; 207 + } 208 + } 180 209 181 - $fulltext = $saved->getParameter('fulltext'); 182 - if (strlen($fulltext)) { 183 - $query->withFullTextSearch($fulltext); 210 + if ($ids) { 211 + $query->withIDs($ids); 212 + } 184 213 } 185 214 186 - $projects = $this->readProjectTokens($saved); 187 - $adjusted = id(clone $saved)->setParameter('projects', $projects); 188 - $this->setQueryProjects($query, $adjusted); 189 - 190 - $start = $this->parseDateTime($saved->getParameter('createdStart')); 191 - $end = $this->parseDateTime($saved->getParameter('createdEnd')); 192 - 193 - if ($start) { 194 - $query->withDateCreatedAfter($start); 195 - } 196 - 197 - if ($end) { 198 - $query->withDateCreatedBefore($end); 199 - } 200 - 201 - $mod_start = $this->parseDateTime($saved->getParameter('modifiedStart')); 202 - $mod_end = $this->parseDateTime($saved->getParameter('modifiedEnd')); 203 - 204 - if ($mod_start) { 205 - $query->withDateModifiedAfter($mod_start); 206 - } 207 - 208 - if ($mod_end) { 209 - $query->withDateModifiedBefore($mod_end); 210 - } 211 - 212 - $this->applyCustomFieldsToQuery($query, $saved); 213 - 214 215 return $query; 215 216 } 216 217 217 - public function buildSearchForm( 218 - AphrontFormView $form, 219 - PhabricatorSavedQuery $saved) { 220 - 221 - $assigned_phids = $this->readAssignedPHIDs($saved); 222 - 223 - $author_phids = $saved->getParameter('authorPHIDs', array()); 224 - $projects = $this->readProjectTokens($saved); 225 - 226 - $subscriber_phids = $saved->getParameter('subscriberPHIDs', array()); 227 - 228 - $statuses = $saved->getParameter('statuses', array()); 229 - $priorities = $saved->getParameter('priorities', array()); 230 - 231 - $blocking_control = id(new AphrontFormSelectControl()) 232 - ->setLabel(pht('Blocking')) 233 - ->setName('blocking') 234 - ->setValue($this->getBoolFromQuery($saved, 'blocking')) 235 - ->setOptions(array( 236 - '' => pht('Show All Tasks'), 237 - 'true' => pht('Show Tasks Blocking Other Tasks'), 238 - 'false' => pht('Show Tasks Not Blocking Other Tasks'), 239 - )); 240 - 241 - $blocked_control = id(new AphrontFormSelectControl()) 242 - ->setLabel(pht('Blocked')) 243 - ->setName('blocked') 244 - ->setValue($this->getBoolFromQuery($saved, 'blocked')) 245 - ->setOptions(array( 246 - '' => pht('Show All Tasks'), 247 - 'true' => pht('Show Tasks Blocked By Other Tasks'), 248 - 'false' => pht('Show Tasks Not Blocked By Other Tasks'), 249 - )); 250 - 251 - $ids = $saved->getParameter('ids', array()); 252 - 253 - $all_orders = ipull($this->newQuery()->getBuiltinOrders(), 'name'); 254 - 255 - $form 256 - ->appendControl( 257 - id(new AphrontFormTokenizerControl()) 258 - ->setDatasource(new PhabricatorPeopleOwnerDatasource()) 259 - ->setName('assigned') 260 - ->setLabel(pht('Assigned To')) 261 - ->setValue($assigned_phids)) 262 - ->appendControl( 263 - id(new AphrontFormTokenizerControl()) 264 - ->setDatasource(new PhabricatorProjectLogicalDatasource()) 265 - ->setName('projects') 266 - ->setLabel(pht('Projects')) 267 - ->setValue($projects)) 268 - ->appendControl( 269 - id(new AphrontFormTokenizerControl()) 270 - ->setDatasource(new PhabricatorPeopleUserFunctionDatasource()) 271 - ->setName('authors') 272 - ->setLabel(pht('Authors')) 273 - ->setValue($author_phids)) 274 - ->appendControl( 275 - id(new AphrontFormTokenizerControl()) 276 - ->setDatasource(new PhabricatorMetaMTAMailableFunctionDatasource()) 277 - ->setName('subscribers') 278 - ->setLabel(pht('Subscribers')) 279 - ->setValue($subscriber_phids)) 280 - ->appendControl( 281 - id(new AphrontFormTokenizerControl()) 282 - ->setDatasource(new ManiphestTaskStatusFunctionDatasource()) 283 - ->setLabel(pht('Statuses')) 284 - ->setName('statuses') 285 - ->setValue($statuses)) 286 - ->appendControl( 287 - id(new AphrontFormTokenizerControl()) 288 - ->setDatasource(new ManiphestTaskPriorityDatasource()) 289 - ->setLabel(pht('Priorities')) 290 - ->setName('priorities') 291 - ->setValue($priorities)) 292 - ->appendChild( 293 - id(new AphrontFormTextControl()) 294 - ->setName('fulltext') 295 - ->setLabel(pht('Contains Words')) 296 - ->setValue($saved->getParameter('fulltext'))) 297 - ->appendChild($blocking_control) 298 - ->appendChild($blocked_control); 299 - 300 - if (!$this->getIsBoardView()) { 301 - $form 302 - ->appendChild( 303 - id(new AphrontFormSelectControl()) 304 - ->setName('group') 305 - ->setLabel(pht('Group By')) 306 - ->setValue($saved->getParameter('group')) 307 - ->setOptions($this->getGroupOptions())) 308 - ->appendChild( 309 - id(new AphrontFormSelectControl()) 310 - ->setName('order') 311 - ->setLabel(pht('Order By')) 312 - ->setValue($saved->getParameter('order')) 313 - ->setOptions($all_orders)); 314 - } 315 - 316 - $form 317 - ->appendChild( 318 - id(new AphrontFormTextControl()) 319 - ->setName('ids') 320 - ->setLabel(pht('Task IDs')) 321 - ->setValue(implode(', ', $ids))); 322 - 323 - $this->appendCustomFieldsToForm($form, $saved); 324 - 325 - $this->buildDateRange( 326 - $form, 327 - $saved, 328 - 'createdStart', 329 - pht('Created After'), 330 - 'createdEnd', 331 - pht('Created Before')); 332 - 333 - $this->buildDateRange( 334 - $form, 335 - $saved, 336 - 'modifiedStart', 337 - pht('Updated After'), 338 - 'modifiedEnd', 339 - pht('Updated Before')); 340 - 341 - if (!$this->getIsBoardView()) { 342 - $form 343 - ->appendChild( 344 - id(new AphrontFormTextControl()) 345 - ->setName('limit') 346 - ->setLabel(pht('Page Size')) 347 - ->setValue($saved->getParameter('limit', 100))); 348 - } 349 - } 350 - 351 218 protected function getURI($path) { 352 219 if ($this->baseURI) { 353 220 return $this->baseURI.$path; ··· 458 325 ->setShowBatchControls($this->showBatchControls); 459 326 } 460 327 461 - private function readAssignedPHIDs(PhabricatorSavedQuery $saved) { 328 + protected function willUseSavedQuery(PhabricatorSavedQuery $saved) { 329 + 330 + // The 'withUnassigned' parameter may be present in old saved queries from 331 + // before parameterized typeaheads, and is retained for compatibility. We 332 + // could remove it by migrating old saved queries. 462 333 $assigned_phids = $saved->getParameter('assignedPHIDs', array()); 463 - 464 - // This may be present in old saved queries from before parameterized 465 - // typeaheads, and is retained for compatibility. We could remove it by 466 - // migrating old saved queries. 467 334 if ($saved->getParameter('withUnassigned')) { 468 335 $assigned_phids[] = PhabricatorPeopleNoOwnerDatasource::FUNCTION_TOKEN; 469 336 } 337 + $saved->setParameter('assignedPHIDs', $assigned_phids); 470 338 471 - return $assigned_phids; 472 - } 339 + // The 'projects' and other parameters may be present in old saved queries 340 + // from before parameterized typeaheads. 341 + $project_phids = $saved->getParameter('projectPHIDs', array()); 473 342 474 - private function readProjectTokens(PhabricatorSavedQuery $saved) { 475 - $projects = $saved->getParameter('projects', array()); 343 + $old = $saved->getParameter('projects', array()); 344 + foreach ($old as $phid) { 345 + $project_phids[] = $phid; 346 + } 476 347 477 348 $all = $saved->getParameter('allProjectPHIDs', array()); 478 349 foreach ($all as $phid) { 479 - $projects[] = $phid; 350 + $project_phids[] = $phid; 480 351 } 481 352 482 353 $any = $saved->getParameter('anyProjectPHIDs', array()); 483 354 foreach ($any as $phid) { 484 - $projects[] = 'any('.$phid.')'; 355 + $project_phids[] = 'any('.$phid.')'; 485 356 } 486 357 487 358 $not = $saved->getParameter('excludeProjectPHIDs', array()); 488 359 foreach ($not as $phid) { 489 - $projects[] = 'not('.$phid.')'; 360 + $project_phids[] = 'not('.$phid.')'; 490 361 } 491 362 492 363 $users = $saved->getParameter('userProjectPHIDs', array()); 493 364 foreach ($users as $phid) { 494 - $projects[] = 'projects('.$phid.')'; 365 + $project_phids[] = 'projects('.$phid.')'; 495 366 } 496 367 497 368 $no = $saved->getParameter('withNoProject'); 498 369 if ($no) { 499 - $projects[] = 'null()'; 370 + $project_phids[] = 'null()'; 500 371 } 501 372 502 - return $projects; 373 + $saved->setParameter('projectPHIDs', $project_phids); 503 374 } 504 375 505 376 }
+28 -60
src/applications/search/engine/PhabricatorApplicationSearchEngine.php
··· 205 205 $this->willUseSavedQuery($saved); 206 206 207 207 $fields = $this->buildSearchFields(); 208 + $fields = $this->adjustFieldsForDisplay($fields); 208 209 $viewer = $this->requireViewer(); 209 210 210 211 foreach ($fields as $field) { ··· 266 267 $orders = ipull($orders, 'name'); 267 268 268 269 $fields[] = id(new PhabricatorSearchOrderField()) 269 - ->setLabel(pht('Order')) 270 + ->setLabel(pht('Order By')) 270 271 ->setKey('order') 271 272 ->setOptions($orders); 272 273 } ··· 284 285 $field_map[$key] = $field; 285 286 } 286 287 287 - return $this->adjustFieldsForDisplay($field_map); 288 + return $field_map; 288 289 } 289 290 290 291 private function adjustFieldsForDisplay(array $field_map) { ··· 310 311 $body = array_diff_key($field_map, array_fuse($tail_keys)); 311 312 $tail = array_select_keys($field_map, $tail_keys); 312 313 313 - return $head + $body + $tail; 314 + $result = $head + $body + $tail; 315 + 316 + foreach ($this->getHiddenFields() as $hidden_key) { 317 + unset($result[$hidden_key]); 318 + } 319 + 320 + return $result; 314 321 } 315 322 316 323 protected function buildCustomSearchFields() { ··· 343 350 * @return list<string> Default ordering for field keys. 344 351 */ 345 352 protected function getDefaultFieldOrder() { 353 + return array(); 354 + } 355 + 356 + /** 357 + * Return a list of field keys which should be hidden from the viewer. 358 + * 359 + * @return list<string> Fields to hide. 360 + */ 361 + protected function getHiddenFields() { 346 362 return array(); 347 363 } 348 364 ··· 924 940 925 941 926 942 public function getPageSize(PhabricatorSavedQuery $saved) { 927 - return $saved->getParameter('limit', 100); 943 + $limit = (int)$saved->getParameter('limit'); 944 + 945 + if ($limit > 0) { 946 + return $limit; 947 + } 948 + 949 + return 100; 928 950 } 929 951 930 952 ··· 1062 1084 1063 1085 1064 1086 /** 1065 - * Moves data from the request into a saved query. 1066 - * 1067 - * @param AphrontRequest Request to read. 1068 - * @param PhabricatorSavedQuery Query to write to. 1069 - * @return void 1070 - * @task appsearch 1071 - */ 1072 - protected function readCustomFieldsFromRequest( 1073 - AphrontRequest $request, 1074 - PhabricatorSavedQuery $saved) { 1075 - 1076 - $list = $this->getCustomFieldList(); 1077 - if (!$list) { 1078 - return; 1079 - } 1080 - 1081 - foreach ($list->getFields() as $field) { 1082 - $key = $this->getKeyForCustomField($field); 1083 - $value = $field->readApplicationSearchValueFromRequest( 1084 - $this, 1085 - $request); 1086 - $saved->setParameter($key, $value); 1087 - } 1088 - } 1089 - 1090 - 1091 - /** 1092 1087 * Applies data from a saved query to an executable query. 1093 1088 * 1094 1089 * @param PhabricatorCursorPagedPolicyAwareQuery Query to constrain. ··· 1105 1100 } 1106 1101 1107 1102 foreach ($list->getFields() as $field) { 1108 - $key = $this->getKeyForCustomField($field); 1109 1103 $value = $field->applyApplicationSearchConstraintToQuery( 1110 1104 $this, 1111 1105 $query, 1112 - $saved->getParameter($key)); 1106 + $saved->getParameter('custom:'.$field->getFieldIndex())); 1113 1107 } 1114 1108 } 1115 1109 1116 - /** 1117 - * Get a unique key identifying a field. 1118 - * 1119 - * @param PhabricatorCustomField Field to identify. 1120 - * @return string Unique identifier, suitable for use as an input name. 1121 - */ 1122 - public function getKeyForCustomField(PhabricatorCustomField $field) { 1123 - return 'custom:'.$field->getFieldIndex(); 1124 - } 1125 - 1126 1110 private function buildCustomFieldSearchFields() { 1127 1111 $list = $this->getCustomFieldList(); 1128 1112 if (!$list) { ··· 1135 1119 ->setSearchEngine($this) 1136 1120 ->setCustomField($field); 1137 1121 } 1138 - return $fields; 1139 - } 1140 1122 1141 - // TODO: Remove. 1142 - protected function appendCustomFieldsToForm( 1143 - AphrontFormView $form, 1144 - PhabricatorSavedQuery $saved) { 1145 - 1146 - $list = $this->getCustomFieldList(); 1147 - if (!$list) { 1148 - return; 1149 - } 1150 - 1151 - foreach ($list->getFields() as $field) { 1152 - $key = $this->getKeyForCustomField($field); 1153 - $value = $saved->getParameter($key); 1154 - $field->appendToApplicationSearchForm($this, $form, $value); 1155 - } 1123 + return $fields; 1156 1124 } 1157 1125 1158 1126 }