Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2694529
D25775.1734787279.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25775.1734787279.diff
View Options
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
@@ -2061,6 +2061,35 @@
$this->getActor(),
$new_texts);
+ // Do not re-subscribe mentioned users when editing task description
+ if ($object instanceof ManiphestTask) {
+ foreach ($xactions as $xaction) {
+ $type = $xaction->getTransactionType();
+ if ($type == PhabricatorTransactions::TYPE_CREATE) {
+ break; // assume when core:create exists, it is first in $xactions
+ }
+ if ($type == ManiphestTaskDescriptionTransaction::TRANSACTIONTYPE) {
+ // get current task subscribers
+ $subscribers_query = id(new PhabricatorEdgeQuery())
+ ->withSourcePHIDs(array($object->getPHID()))
+ ->withEdgeTypes(
+ array(PhabricatorObjectHasSubscriberEdgeType::EDGECONST));
+ $subscribers_query->execute();
+ $subscribed_phids = $subscribers_query->getDestinationPHIDs(
+ array($object->getPHID()),
+ array(PhabricatorObjectHasSubscriberEdgeType::EDGECONST));
+
+ // unset phids in task description who are not already subscribers
+ foreach ($new_phids as $description_mentioned_phid) {
+ if (!in_array($description_mentioned_phid, $subscribed_phids)) {
+ unset($new_phids[$description_mentioned_phid]);
+ }
+ }
+ break;
+ }
+ }
+ }
+
$phids = array_diff($new_phids, $old_phids);
} else {
$phids = array();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 13:21 (18 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1024692
Default Alt Text
D25775.1734787279.diff (1 KB)
Attached To
Mode
D25775: Do not re-subscribe @mentions when editing task description
Attached
Detach File
Event Timeline
Log In to Comment