@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 WILLEDITTASK and DIDEDITTASK events

Summary: Fixes T9851. I'll hold this for a while to give users some time to update per T9860.

Test Plan:
Edited a task via:

- Conduit
- Comments field
- Edit form
- New task form

Reviewers: chad

Reviewed By: chad

Subscribers: Krenair

Maniphest Tasks: T9851

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

+4 -64
-25
src/applications/maniphest/conduit/ManiphestConduitAPIMethod.php
··· 192 192 return; 193 193 } 194 194 195 - $event = new PhabricatorEvent( 196 - PhabricatorEventType::TYPE_MANIPHEST_WILLEDITTASK, 197 - array( 198 - 'task' => $task, 199 - 'new' => $is_new, 200 - 'transactions' => $transactions, 201 - )); 202 - $event->setUser($request->getUser()); 203 - $event->setConduitRequest($request); 204 - PhutilEventEngine::dispatchEvent($event); 205 - 206 - $task = $event->getValue('task'); 207 - $transactions = $event->getValue('transactions'); 208 - 209 195 $content_source = PhabricatorContentSource::newForSource( 210 196 PhabricatorContentSource::SOURCE_CONDUIT, 211 197 array()); ··· 220 206 } 221 207 222 208 $editor->applyTransactions($task, $transactions); 223 - 224 - $event = new PhabricatorEvent( 225 - PhabricatorEventType::TYPE_MANIPHEST_DIDEDITTASK, 226 - array( 227 - 'task' => $task, 228 - 'new' => $is_new, 229 - 'transactions' => $transactions, 230 - )); 231 - $event->setUser($request->getUser()); 232 - $event->setConduitRequest($request); 233 - PhutilEventEngine::dispatchEvent($event); 234 209 235 210 // reload the task now that we've done all the fun stuff 236 211 return id(new ManiphestTaskQuery())
+4 -36
src/docs/user/userguide/events.diviner
··· 5 5 6 6 = Overview = 7 7 8 + (WARNING) The event system is an artifact of a bygone era. Use of the event 9 + system is strongly discouraged. We have been removing events since 2013 and 10 + will continue to remove events in the future. 11 + 8 12 Phabricator and Arcanist allow you to install custom runtime event listeners 9 13 which can react to certain things happening (like a Maniphest Task being edited 10 14 or a user creating a new Differential Revision) and run custom code to perform ··· 129 133 130 134 - `specification` Parameters that will be used to invoke the 131 135 `differential.createrevision` Conduit call. 132 - 133 - == Maniphest: Will Edit Task == 134 - 135 - The constant for this event is 136 - `PhabricatorEventType::TYPE_MANIPHEST_WILLEDITTASK`. 137 - 138 - This event is dispatched before a task is edited, and allows you to respond to 139 - or alter the edit. Data available on this event: 140 - 141 - - `task` The @{class:ManiphestTask} being edited. 142 - - `transactions` The list of edits (objects of class 143 - @{class:ManiphestTransaction}) being applied. 144 - - `new` A boolean indicating if this task is being created. 145 - - `mail` If this edit originates from email, the 146 - @{class:PhabricatorMetaMTAReceivedMail} object. 147 - 148 - This is similar to the next event (did edit task) but occurs before the edit 149 - begins. 150 - 151 - == Maniphest: Did Edit Task == 152 - 153 - The constant for this event is 154 - `PhabricatorEventType::TYPE_MANIPHEST_DIDEDITTASK`. 155 - 156 - This event is dispatched after a task is edited, and allows you to react to the 157 - edit. Data available on this event: 158 - 159 - - `task` The @{class:ManiphestTask} that was edited. 160 - - `transactions` The list of edits (objects of class 161 - @{class:ManiphestTransaction}) that were applied. 162 - - `new` A boolean indicating if this task was newly created. 163 - - `mail` If this edit originates from email, the 164 - @{class:PhabricatorMetaMTAReceivedMail} object. 165 - 166 - This is similar to the previous event (will edit task) but occurs after the 167 - edit completes. 168 136 169 137 == Differential: Will Mark Generated == 170 138
-3
src/infrastructure/events/constant/PhabricatorEventType.php
··· 6 6 */ 7 7 final class PhabricatorEventType extends PhutilEventType { 8 8 9 - const TYPE_MANIPHEST_WILLEDITTASK = 'maniphest.willEditTask'; 10 - const TYPE_MANIPHEST_DIDEDITTASK = 'maniphest.didEditTask'; 11 - 12 9 const TYPE_DIFFERENTIAL_WILLMARKGENERATED = 'differential.willMarkGenerated'; 13 10 14 11 const TYPE_DIFFUSION_DIDDISCOVERCOMMIT = 'diffusion.didDiscoverCommit';