diff --git a/src/applications/transactions/query/PhabricatorApplicationTransactionQuery.php b/src/applications/transactions/query/PhabricatorApplicationTransactionQuery.php index f15522a087..1db622163d 100644 --- a/src/applications/transactions/query/PhabricatorApplicationTransactionQuery.php +++ b/src/applications/transactions/query/PhabricatorApplicationTransactionQuery.php @@ -3,6 +3,7 @@ abstract class PhabricatorApplicationTransactionQuery extends PhabricatorCursorPagedPolicyAwareQuery { + private $ids; private $phids; private $objectPHIDs; private $authorPHIDs; @@ -35,6 +36,11 @@ abstract class PhabricatorApplicationTransactionQuery abstract public function getTemplateApplicationTransaction(); + public function withIDs(array $ids) { + $this->ids = $ids; + return $this; + } + public function withPHIDs(array $phids) { $this->phids = $phids; return $this; @@ -157,6 +163,13 @@ abstract class PhabricatorApplicationTransactionQuery protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { $where = parent::buildWhereClauseParts($conn); + if ($this->ids !== null) { + $where[] = qsprintf( + $conn, + 'x.id IN (%Ld)', + $this->ids); + } + if ($this->phids !== null) { $where[] = qsprintf( $conn,