Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14017166
D14849.id35897.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
D14849.id35897.diff
View Options
diff --git a/src/applications/maniphest/editor/ManiphestTransactionEditor.php b/src/applications/maniphest/editor/ManiphestTransactionEditor.php
--- a/src/applications/maniphest/editor/ManiphestTransactionEditor.php
+++ b/src/applications/maniphest/editor/ManiphestTransactionEditor.php
@@ -371,20 +371,22 @@
$new = $unblock_xaction->getNewValue();
foreach ($blocked_tasks as $blocked_task) {
- $unblock_xactions = array();
-
- $unblock_xactions[] = id(new ManiphestTransaction())
+ $parent_xaction = id(new ManiphestTransaction())
->setTransactionType(ManiphestTransaction::TYPE_UNBLOCK)
->setOldValue(array($object->getPHID() => $old))
->setNewValue(array($object->getPHID() => $new));
+ if ($this->getIsNewObject()) {
+ $parent_xaction->setMetadataValue('blocker.new', true);
+ }
+
id(new ManiphestTransactionEditor())
->setActor($this->getActor())
->setActingAsPHID($this->getActingAsPHID())
->setContentSource($this->getContentSource())
->setContinueOnNoEffect(true)
->setContinueOnMissingFields(true)
- ->applyTransactions($blocked_task, $unblock_xactions);
+ ->applyTransactions($blocked_task, array($parent_xaction));
}
}
}
diff --git a/src/applications/maniphest/storage/ManiphestTransaction.php b/src/applications/maniphest/storage/ManiphestTransaction.php
--- a/src/applications/maniphest/storage/ManiphestTransaction.php
+++ b/src/applications/maniphest/storage/ManiphestTransaction.php
@@ -167,6 +167,21 @@
return parent::shouldHide();
}
+ public function shouldHideForFeed() {
+ switch ($this->getTransactionType()) {
+ case self::TYPE_UNBLOCK:
+ // Hide "alice created X, a task blocking Y." from feed because it
+ // will almost always appear adjacent to "alice created Y".
+ $is_new = $this->getMetadataValue('blocker.new');
+ if ($is_new) {
+ return true;
+ }
+ break;
+ }
+
+ return parent::shouldHideForFeed();
+ }
+
public function getActionStrength() {
switch ($this->getTransactionType()) {
case self::TYPE_TITLE:
@@ -479,7 +494,12 @@
$old_name = ManiphestTaskStatus::getTaskStatusName($old_status);
$new_name = ManiphestTaskStatus::getTaskStatusName($new_status);
- if ($old_closed && !$new_closed) {
+ if ($this->getMetadataValue('blocker.new')) {
+ return pht(
+ '%s created blocking task %s.',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($blocker_phid));
+ } else if ($old_closed && !$new_closed) {
return pht(
'%s reopened blocking task %s as "%s".',
$this->renderHandleLink($author_phid),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 5, 2:28 PM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6742127
Default Alt Text
D14849.id35897.diff (2 KB)
Attached To
Mode
D14849: Improve strings for creating blocking subtasks
Attached
Detach File
Event Timeline
Log In to Comment