From 1b0d53ec650f8c2d06e6050639eafe2d1fe03a24 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 26 Apr 2014 12:44:05 -0700 Subject: [PATCH] Fix Differential transaction strengths Summary: Fixes T4899. Action strengths got lost somewhere along the way; actions like "Accepted" should be stronger than "Changed Subscribers". Test Plan: Verified things sort as expected now, with major actions at the top. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T4899 Differential Revision: https://secure.phabricator.com/D8857 --- .../storage/DifferentialTransaction.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/applications/differential/storage/DifferentialTransaction.php b/src/applications/differential/storage/DifferentialTransaction.php index 88301f7e73..25d877f15f 100644 --- a/src/applications/differential/storage/DifferentialTransaction.php +++ b/src/applications/differential/storage/DifferentialTransaction.php @@ -112,6 +112,21 @@ final class DifferentialTransaction extends PhabricatorApplicationTransaction { return $phids; } + public function getActionStrength() { + + switch ($this->getTransactionType()) { + case self::TYPE_ACTION: + return 3; + case self::TYPE_UPDATE: + return 2; + case self::TYPE_INLINE: + return 0.25; + } + + return parent::getActionStrength(); + } + + public function getActionName() { switch ($this->getTransactionType()) { case self::TYPE_INLINE: