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

Convert "Created By" and "Invited" inputs in Calendar search to use `PhabricatorPeopleUserFunctionDatasource`

Summary: Closes T8046, Convert "Created By" and "Invited" inputs in Calendar search to use `PhabricatorPeopleUserFunctionDatasource`

Test Plan: {nav Calendar > Advanced Search}, search for "members:Calendar", created by and invited. Should autofill and search correctly.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8046

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

+7 -2
+7 -2
src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
··· 58 58 $min_range = $this->getDateFrom($saved)->getEpoch(); 59 59 $max_range = $this->getDateTo($saved)->getEpoch(); 60 60 61 + $user_datasource = id(new PhabricatorPeopleUserFunctionDatasource()) 62 + ->setViewer($viewer); 63 + 61 64 if ($this->isMonthView($saved) || 62 65 $this->isDayView($saved)) { 63 66 list($start_year, $start_month, $start_day) = ··· 124 127 } 125 128 126 129 $invited_phids = $saved->getParameter('invitedPHIDs'); 130 + $invited_phids = $user_datasource->evaluateTokens($invited_phids); 127 131 if ($invited_phids) { 128 132 $query->withInvitedPHIDs($invited_phids); 129 133 } 130 134 131 135 $creator_phids = $saved->getParameter('creatorPHIDs'); 136 + $creator_phids = $user_datasource->evaluateTokens($creator_phids); 132 137 if ($creator_phids) { 133 138 $query->withCreatorPHIDs($creator_phids); 134 139 } ··· 196 201 $form 197 202 ->appendControl( 198 203 id(new AphrontFormTokenizerControl()) 199 - ->setDatasource(new PhabricatorPeopleDatasource()) 204 + ->setDatasource(new PhabricatorPeopleUserFunctionDatasource()) 200 205 ->setName('creators') 201 206 ->setLabel(pht('Created By')) 202 207 ->setValue($creator_phids)) 203 208 ->appendControl( 204 209 id(new AphrontFormTokenizerControl()) 205 - ->setDatasource(new PhabricatorPeopleDatasource()) 210 + ->setDatasource(new PhabricatorPeopleUserFunctionDatasource()) 206 211 ->setName('invited') 207 212 ->setLabel(pht('Invited')) 208 213 ->setValue($invited_phids))