Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14351845
D10922.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10922.diff
View Options
diff --git a/src/applications/transactions/editor/PhabricatorApplicationTransactionCommentEditor.php b/src/applications/transactions/editor/PhabricatorApplicationTransactionCommentEditor.php
--- a/src/applications/transactions/editor/PhabricatorApplicationTransactionCommentEditor.php
+++ b/src/applications/transactions/editor/PhabricatorApplicationTransactionCommentEditor.php
@@ -69,7 +69,26 @@
$xaction->setViewPolicy($comment->getViewPolicy());
$xaction->setEditPolicy($comment->getEditPolicy());
$xaction->save();
-
+ $xaction->attachComment($comment);
+
+ $object = id(new PhabricatorObjectQuery())
+ ->withPHIDs(array($xaction->getObjectPHID()))
+ ->setViewer($this->getActor())
+ ->executeOne();
+ if ($object &&
+ $object instanceof PhabricatorApplicationTransactionInterface) {
+ $editor = $object->getApplicationTransactionEditor();
+ $editor->setActor($this->getActor());
+ $support_xactions = $editor->getExpandedSupportTransactions(
+ $object,
+ $xaction);
+ if ($support_xactions) {
+ $editor
+ ->setContentSource($this->getContentSource())
+ ->setContinueOnNoEffect(true)
+ ->applyTransactions($object, $support_xactions);
+ }
+ }
$xaction->endReadLocking();
$xaction->saveTransaction();
@@ -85,8 +104,6 @@
$editor->save();
}
- $xaction->attachComment($comment);
-
return $this;
}
diff --git a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
--- a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
+++ b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
@@ -1117,6 +1117,29 @@
}
+ public function getExpandedSupportTransactions(
+ PhabricatorLiskDAO $object,
+ PhabricatorApplicationTransaction $xaction) {
+
+ $xactions = array($xaction);
+ $xactions = $this->expandSupportTransactions(
+ $object,
+ $xactions);
+
+ if (count($xactions) == 1) {
+ return array();
+ }
+
+ foreach ($xactions as $index => $cxaction) {
+ if ($cxaction === $xaction) {
+ unset($xactions[$index]);
+ break;
+ }
+ }
+
+ return $xactions;
+ }
+
private function expandSupportTransactions(
PhabricatorLiskDAO $object,
array $xactions) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 10:51 AM (21 h, 11 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6910200
Default Alt Text
D10922.diff (2 KB)
Attached To
Mode
D10922: Transactions - make sure to do fancy remarkup stuff on edit too
Attached
Detach File
Event Timeline
Log In to Comment