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

Enrich "priority" transactions in Maniphest for "transaction.search"

Summary:
Ref T13187. See <https://discourse.phabricator-community.org/t/task-priority-change-info-missing-in-firehose-webhook/1832/2>. We can reasonably enrich these transactions.

Since priorities don't have unique authorative string identifiers, I've mostly mimicked the `maniphest.search` structure.

Test Plan: Called `transaction.search` on tasks which were: created normally, created with a priority change, saw a priority change after creation. All the output looked useful and sensible.

Reviewers: amckinley

Maniphest Tasks: T13187

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

+29
+29
src/applications/maniphest/xaction/ManiphestTaskPriorityTransaction.php
··· 172 172 return $errors; 173 173 } 174 174 175 + public function getTransactionTypeForConduit($xaction) { 176 + return 'priority'; 177 + } 178 + 179 + public function getFieldValuesForConduit($xaction, $data) { 180 + $old = $xaction->getOldValue(); 181 + if ($old !== null) { 182 + $old = (int)$old; 183 + $old_name = ManiphestTaskPriority::getTaskPriorityName($old); 184 + } else { 185 + $old_name = null; 186 + } 187 + 188 + $new = $xaction->getNewValue(); 189 + $new = (int)$new; 190 + $new_name = ManiphestTaskPriority::getTaskPriorityName($new); 191 + 192 + return array( 193 + 'old' => array( 194 + 'value' => $old, 195 + 'name' => $old_name, 196 + ), 197 + 'new' => array( 198 + 'value' => $new, 199 + 'name' => $new_name, 200 + ), 201 + ); 202 + } 203 + 175 204 }