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

Use the same transaction group ID for transactions applied indirectly by a sub-editor

Summary:
Ref T13283. Currently, each Editor sets its own group ID, so if you create a revision and then Herald does some stuff, the two groups of transactions get different group IDs.

This means the test console is slightly misleading (it will only pick up the Herald transactions). It's going to be misleading anyway (Herald obviously can't evaluate Herald transactions) but this is at least a little closer to reality and stops Herald actions from masking non-Herald actions.

Test Plan:
- Created a revision. Herald applied one transaction.
- Used the test console.
- Before: The test console only picked up the single most recent Herald transaction.
- After: The test console picked up the whole transaction group.

{F6464059}

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13283

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

+11 -1
+11 -1
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 54 54 private $heraldTranscript; 55 55 private $subscribers; 56 56 private $unmentionablePHIDMap = array(); 57 + private $transactionGroupID; 57 58 private $applicationEmail; 58 59 59 60 private $isPreview; ··· 975 976 return $this->cancelURI; 976 977 } 977 978 979 + protected function getTransactionGroupID() { 980 + if ($this->transactionGroupID === null) { 981 + $this->transactionGroupID = Filesystem::readRandomCharacters(32); 982 + } 983 + 984 + return $this->transactionGroupID; 985 + } 986 + 978 987 final public function applyTransactions( 979 988 PhabricatorLiskDAO $object, 980 989 array $xactions) { ··· 1164 1173 throw $ex; 1165 1174 } 1166 1175 1167 - $group_id = Filesystem::readRandomCharacters(32); 1176 + $group_id = $this->getTransactionGroupID(); 1168 1177 1169 1178 foreach ($xactions as $xaction) { 1170 1179 if ($was_locked) { ··· 4666 4675 } 4667 4676 4668 4677 $editor->mustEncrypt = $this->mustEncrypt; 4678 + $editor->transactionGroupID = $this->getTransactionGroupID(); 4669 4679 4670 4680 return $editor; 4671 4681 }