Open Davidmattei opened 3 weeks ago
If we change this we can also update the recompute:
We are signing the new revision twice, because we first need to be able to see if something has changed. Setting the finalized by to SYSTEM_RECOMPUTE will allways result in a new revision, see description ticket.
$revision->close(new \DateTime('now'));
$newRevision->setDraft(false);
$this->dataService->sign($revision);
$this->dataService->sign($newRevision);
if ($this->isChanged && $revision->getHash() === $newRevision->getHash()) {
$this->revisionRepository->unlockRevision($revisionId);
$progress->advance();
continue;
}
$newRevision->setFinalizedBy(self::LOCK_BY);
$newRevision->setRawDataFinalizedBy(self::LOCK_BY);
$this->dataService->sign($newRevision);
Should become
$revision->close(new \DateTime('now'));
$newRevision->setDraft(false);
$newRevision->setFinalizedBy(self::LOCK_BY);
$this->dataService->sign($revision);
$this->dataService->sign($newRevision);
if ($this->isChanged && $revision->getHash() === $newRevision->getHash()) {
$this->revisionRepository->unlockRevision($revisionId);
$progress->advance();
continue;
}
Discussed: the signing raw can excluded all fields starting with an underscore. at the root level
Revision Entity:
dataService:
Issues with this code:
Solution: