Use the latest transaction modification time fore the hash

This commit is contained in:
2023-01-27 16:13:16 +01:00
parent 8eaab28e2e
commit 21d145c9dd
2 changed files with 12 additions and 2 deletions

View File

@@ -240,7 +240,7 @@ function GetRevisionHash($revision) {
$xaction = id(new DifferentialTransactionQuery())
->setViewer($viewer)
->withObjectPHIDs(array($revision->getPHID()))
->setOrder('newest')
->setOrder('updated')
->setLimit(1)
->executeOne();
@@ -405,7 +405,7 @@ function GetTaskHash($task) {
$xaction = id(new ManiphestTransactionQuery())
->setViewer($viewer)
->withObjectPHIDs(array($task->getPHID()))
->setOrder('newest')
->setOrder('updated')
->setLimit(1)
->executeOne();

View File

@@ -304,6 +304,7 @@ abstract class PhabricatorApplicationTransactionQuery
protected function newPagingMapFromPartialObject($object) {
return parent::newPagingMapFromPartialObject($object) + array(
'created' => $object->getDateCreated(),
'updated' => $object->getDateModified(),
'phid' => $object->getPHID(),
);
}
@@ -314,6 +315,10 @@ abstract class PhabricatorApplicationTransactionQuery
'vector' => array('created', 'phid'),
'name' => pht('Global'),
),
'updated' => array(
'vector' => array('updated', 'id'),
'name' => pht('Date Updated (Latest First)'),
),
);
}
@@ -324,6 +329,11 @@ abstract class PhabricatorApplicationTransactionQuery
'column' => 'dateCreated',
'type' => 'int',
),
'updated' => array(
'table' => 'x',
'column' => 'dateModified',
'type' => 'int',
),
'phid' => array(
'table' => 'x',
'column' => 'phid',