@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.

Remove "searchproject" typeahead datasource

Summary: Ref T4420. This is just "project", plus the special "no project" token, but that doesn't actually work. Replace it with a normal project typeahead. This is only used in Maniphest's reports.

Test Plan: Searched for a couple of projects in reports.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4420

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

+1 -41
+1 -1
src/applications/maniphest/controller/ManiphestReportController.php
··· 321 321 ->setUser($user) 322 322 ->appendChild( 323 323 id(new AphrontFormTokenizerControl()) 324 - ->setDatasource('/typeahead/common/searchproject/') 324 + ->setDatasource(new PhabricatorProjectDatasource()) 325 325 ->setLabel(pht('Project')) 326 326 ->setLimit(1) 327 327 ->setName('set_project')
-39
src/applications/typeahead/controller/PhabricatorTypeaheadCommonDatasourceController.php
··· 20 20 $raw_query = $request->getStr('raw'); 21 21 22 22 $need_users = false; 23 - $need_projs = false; 24 23 $need_upforgrabs = false; 25 - $need_noproject = false; 26 24 $need_rich_data = false; 27 25 switch ($this->type) { 28 26 case 'searchowner': 29 27 $need_users = true; 30 28 $need_upforgrabs = true; 31 29 break; 32 - case 'searchproject': 33 - $need_projs = true; 34 - $need_noproject = true; 35 - break; 36 30 } 37 31 38 32 $results = array(); ··· 42 36 ->setName('upforgrabs (Up For Grabs)') 43 37 ->setPHID(ManiphestTaskOwner::OWNER_UP_FOR_GRABS); 44 38 } 45 - 46 - if ($need_noproject) { 47 - $results[] = id(new PhabricatorTypeaheadResult()) 48 - ->setName('noproject (No Project)') 49 - ->setPHID(ManiphestTaskOwner::PROJECT_NO_PROJECT); 50 - } 51 - 52 39 53 40 if ($need_users) { 54 41 $columns = array( ··· 145 132 $result->setImageURI($handles[$user->getPHID()]->getImageURI()); 146 133 } 147 134 $results[] = $result; 148 - } 149 - } 150 - 151 - if ($need_projs) { 152 - $projs = id(new PhabricatorProjectQuery()) 153 - ->setViewer($viewer) 154 - ->needImages(true) 155 - ->execute(); 156 - foreach ($projs as $proj) { 157 - $closed = null; 158 - if ($proj->isArchived()) { 159 - $closed = pht('Archived'); 160 - } 161 - 162 - $proj_result = id(new PhabricatorTypeaheadResult()) 163 - ->setName($proj->getName()) 164 - ->setDisplayType('Project') 165 - ->setURI('/project/view/'.$proj->getID().'/') 166 - ->setPHID($proj->getPHID()) 167 - ->setIcon($proj->getIcon()) 168 - ->setPriorityType('proj') 169 - ->setClosed($closed); 170 - 171 - $proj_result->setImageURI($proj->getProfileImageURI()); 172 - 173 - $results[] = $proj_result; 174 135 } 175 136 } 176 137
-1
src/view/form/control/AphrontFormTokenizerControl.php
··· 96 96 97 97 $map = array( 98 98 'searchowner' => pht('Type a user name...'), 99 - 'searchproject' => pht('Type a project name...'), 100 99 ); 101 100 102 101 return idx($map, $request);