mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-11 07:11:04 +01:00
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
This commit is contained in:
parent
9a32a563f0
commit
81134d7e7d
1 changed files with 5 additions and 0 deletions
|
@ -3084,6 +3084,11 @@ abstract class PhabricatorApplicationTransactionEditor
|
|||
->withObjectPHIDs(array($object->getPHID()))
|
||||
->withPHIDs($xaction_phids)
|
||||
->execute();
|
||||
|
||||
// Sort the mail transactions in the input order.
|
||||
$mail_xactions = mpull($mail_xactions, null, 'getPHID');
|
||||
$mail_xactions = array_select_keys($mail_xactions, $xaction_phids);
|
||||
$mail_xactions = array_values($mail_xactions);
|
||||
} else {
|
||||
$mail_xactions = array();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue