Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/controller/HeraldTestConsoleController.php
Show First 20 Lines • Show All 265 Lines • ▼ Show 20 Lines | private function loadAppliedTransactions($object) { | ||||
$xactions = new PhabricatorQueryIterator($query); | $xactions = new PhabricatorQueryIterator($query); | ||||
$applied = array(); | $applied = array(); | ||||
$recent_id = null; | $recent_id = null; | ||||
$hard_limit = 1000; | $hard_limit = 1000; | ||||
foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
// If this transaction has Herald transcript metadata, it was applied by | |||||
// Herald. Exclude it from the list because the Herald rule engine always | |||||
// runs before Herald transactions apply, so there's no way that real | |||||
// rules would have seen this transaction. | |||||
$transcript_id = $xaction->getMetadataValue('herald:transcriptID'); | |||||
if ($transcript_id !== null) { | |||||
continue; | |||||
} | |||||
$group_id = $xaction->getTransactionGroupID(); | $group_id = $xaction->getTransactionGroupID(); | ||||
// If this is the first transaction, save the group ID: we want to | // If this is the first transaction, save the group ID: we want to | ||||
// select all transactions in the same group. | // select all transactions in the same group. | ||||
if (!$applied) { | if (!$applied) { | ||||
$recent_id = $group_id; | $recent_id = $group_id; | ||||
if ($recent_id === null) { | if ($recent_id === null) { | ||||
// If the first transaction has no group ID, it is likely an older | // If the first transaction has no group ID, it is likely an older | ||||
Show All 30 Lines |