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

fix Maniphest search for null-like values edge case

Summary: wishlist has priority value of 0 which was messing things up. also fix search text so we can search for "0".

Test Plan: searched for stuff, got results

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1878

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

+4 -7
+4 -7
src/applications/maniphest/controller/ManiphestTaskListController.php
··· 31 31 $task_ids = nonempty($task_ids, null); 32 32 33 33 $search_text = $request->getStr('set_search'); 34 - $search_text = nonempty($search_text, null); 35 34 36 35 $min_priority = $request->getInt('set_lpriority'); 37 - $min_priority = nonempty($min_priority, null); 38 36 39 37 $max_priority = $request->getInt('set_hpriority'); 40 - $max_priority = nonempty($max_priority, null); 41 38 42 39 $uri = $request->getRequestURI() 43 40 ->alter('users', $this->getArrToStrList('set_users')) ··· 230 227 ->setValue($tokens)); 231 228 232 229 $priority = ManiphestTaskPriority::getLowestPriority(); 233 - if ($low_priority) { 230 + if ($low_priority !== null) { 234 231 $priority = $low_priority; 235 232 } 236 233 ··· 243 240 ManiphestTaskPriority::getTaskPriorityMap(), true))); 244 241 245 242 $priority = ManiphestTaskPriority::getHighestPriority(); 246 - if ($high_priority) { 243 + if ($high_priority !== null) { 247 244 $priority = $high_priority; 248 245 } 249 246 ··· 426 423 $author_phids = $search_query->getParameter('authorPHIDs', array()); 427 424 428 425 $low_priority = $search_query->getParameter('lowPriority'); 429 - $low_priority = nonempty($low_priority, 426 + $low_priority = coalesce($low_priority, 430 427 ManiphestTaskPriority::getLowestPriority()); 431 428 $high_priority = $search_query->getParameter('highPriority'); 432 - $high_priority = nonempty($high_priority, 429 + $high_priority = coalesce($high_priority, 433 430 ManiphestTaskPriority::getHighestPriority()); 434 431 435 432 $query = new ManiphestTaskQuery();