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

After reloading transactions for the recipient while building transaction mail, put them in the input order

Summary:
Ref T13303. In D20525 I fixed an issue where transaction rendering could use cached values with the wrong viewer by reloading transactions.

However, reloading transactions may also reorder them as a side effect, since `withPHIDs(...)` does not imply an order. This can make transaction rendering order in mail wrong/inconsistent.

Instead, reorder the transactions before continuing so mail transaction order is consistent.

Test Plan: Applied a group of transactions to a task, saw a more consistent rendering order in mail after the change.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13303

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

+5
+5
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 3084 3084 ->withObjectPHIDs(array($object->getPHID())) 3085 3085 ->withPHIDs($xaction_phids) 3086 3086 ->execute(); 3087 + 3088 + // Sort the mail transactions in the input order. 3089 + $mail_xactions = mpull($mail_xactions, null, 'getPHID'); 3090 + $mail_xactions = array_select_keys($mail_xactions, $xaction_phids); 3091 + $mail_xactions = array_values($mail_xactions); 3087 3092 } else { 3088 3093 $mail_xactions = array(); 3089 3094 }