Commit 64fae39e authored by Daniel Stone's avatar Daniel Stone Committed by Ana Rute Mendes
Browse files

Preserve silent and time when updating blocked tasks

Ref T13042. Updating blocked tasks creates a new ManiphestTransactionEditor instance from within the current transaction application, which fails to carry over all of the current properties. Failing to update silent means that mails will be generated for updates to blocked tasks, regardless of the setting for the original transaction editor.

Failing to preserve the time can also give large time deltas in corner cases, such as running an importer which pulls tasks from yesteryear.

This equally applies to inverse-edge transactions, though I don't have a ready-made usecase for those.
parent ff6f24db
......@@ -123,13 +123,15 @@ final class ManiphestTransactionEditor
$old = $unblock_xaction->getOldValue();
$new = $unblock_xaction->getNewValue();
$date = $unblock_xaction->getDateCreated();
foreach ($blocked_tasks as $blocked_task) {
$parent_xaction = id(new ManiphestTransaction())
->setOldValue(array($object->getPHID() => $old))
->setNewValue(array($object->getPHID() => $new));
->setNewValue(array($object->getPHID() => $new))
if ($this->getIsNewObject()) {
$parent_xaction->setMetadataValue('', true);
......@@ -138,6 +140,7 @@ final class ManiphestTransactionEditor
->applyTransactions($blocked_task, array($parent_xaction));
......@@ -4167,6 +4167,7 @@ abstract class PhabricatorApplicationTransactionEditor
->setMetadataValue('edge:type', $inverse_type)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment