mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
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
This commit is contained in:
parent
f6af1c4374
commit
31e623afcc
1 changed files with 11 additions and 1 deletions
|
@ -54,6 +54,7 @@ abstract class PhabricatorApplicationTransactionEditor
|
|||
private $heraldTranscript;
|
||||
private $subscribers;
|
||||
private $unmentionablePHIDMap = array();
|
||||
private $transactionGroupID;
|
||||
private $applicationEmail;
|
||||
|
||||
private $isPreview;
|
||||
|
@ -975,6 +976,14 @@ abstract class PhabricatorApplicationTransactionEditor
|
|||
return $this->cancelURI;
|
||||
}
|
||||
|
||||
protected function getTransactionGroupID() {
|
||||
if ($this->transactionGroupID === null) {
|
||||
$this->transactionGroupID = Filesystem::readRandomCharacters(32);
|
||||
}
|
||||
|
||||
return $this->transactionGroupID;
|
||||
}
|
||||
|
||||
final public function applyTransactions(
|
||||
PhabricatorLiskDAO $object,
|
||||
array $xactions) {
|
||||
|
@ -1164,7 +1173,7 @@ abstract class PhabricatorApplicationTransactionEditor
|
|||
throw $ex;
|
||||
}
|
||||
|
||||
$group_id = Filesystem::readRandomCharacters(32);
|
||||
$group_id = $this->getTransactionGroupID();
|
||||
|
||||
foreach ($xactions as $xaction) {
|
||||
if ($was_locked) {
|
||||
|
@ -4666,6 +4675,7 @@ abstract class PhabricatorApplicationTransactionEditor
|
|||
}
|
||||
|
||||
$editor->mustEncrypt = $this->mustEncrypt;
|
||||
$editor->transactionGroupID = $this->getTransactionGroupID();
|
||||
|
||||
return $editor;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue