Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/storage/ManiphestTransaction.php
Show First 20 Lines • Show All 161 Lines • ▼ Show 20 Lines | switch ($this->getTransactionType()) { | ||||
sort($new_cols); | sort($new_cols); | ||||
return ($old_cols === $new_cols); | return ($old_cols === $new_cols); | ||||
} | } | ||||
return parent::shouldHide(); | 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() { | public function getActionStrength() { | ||||
switch ($this->getTransactionType()) { | switch ($this->getTransactionType()) { | ||||
case self::TYPE_TITLE: | case self::TYPE_TITLE: | ||||
return 1.4; | return 1.4; | ||||
case self::TYPE_STATUS: | case self::TYPE_STATUS: | ||||
return 1.3; | return 1.3; | ||||
case self::TYPE_OWNER: | case self::TYPE_OWNER: | ||||
return 1.2; | return 1.2; | ||||
▲ Show 20 Lines • Show All 296 Lines • ▼ Show 20 Lines | switch ($this->getTransactionType()) { | ||||
$new_status = head($new); | $new_status = head($new); | ||||
$old_closed = ManiphestTaskStatus::isClosedStatus($old_status); | $old_closed = ManiphestTaskStatus::isClosedStatus($old_status); | ||||
$new_closed = ManiphestTaskStatus::isClosedStatus($new_status); | $new_closed = ManiphestTaskStatus::isClosedStatus($new_status); | ||||
$old_name = ManiphestTaskStatus::getTaskStatusName($old_status); | $old_name = ManiphestTaskStatus::getTaskStatusName($old_status); | ||||
$new_name = ManiphestTaskStatus::getTaskStatusName($new_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( | return pht( | ||||
'%s reopened blocking task %s as "%s".', | '%s reopened blocking task %s as "%s".', | ||||
$this->renderHandleLink($author_phid), | $this->renderHandleLink($author_phid), | ||||
$this->renderHandleLink($blocker_phid), | $this->renderHandleLink($blocker_phid), | ||||
$new_name); | $new_name); | ||||
} else if (!$old_closed && $new_closed) { | } else if (!$old_closed && $new_closed) { | ||||
return pht( | return pht( | ||||
'%s closed blocking task %s as "%s".', | '%s closed blocking task %s as "%s".', | ||||
▲ Show 20 Lines • Show All 443 Lines • Show Last 20 Lines |