@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix confusing ordering of similar actions in transaction groups

Summary:
Fixes T7250. Currently, if a display group of transactions (multiple transactions by the same author in a short period of time with no intervening comments) has several transactions of similar strength (e.g., several status change transactions) we can end up displaying them in reverse chronological order, which is confusing.

Instead, make sure transactions of the same type/strength are always in logical order.

Test Plan:
- Merged a task into another task, then reopened the merged task.
- Before patch: merge/reopen showed in wrong order.

{F1014954}

- After patch: merge/reopen show in correct order.

{F1014955}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7250

Differential Revision: https://secure.phabricator.com/D14680

+13 -3
+13 -3
src/applications/transactions/view/PhabricatorApplicationTransactionView.php
··· 383 383 } 384 384 385 385 foreach ($groups as $key => $group) { 386 - $group = msort($group, 'getActionStrength'); 387 - $group = array_reverse($group); 388 - $groups[$key] = $group; 386 + $results = array(); 387 + 388 + // Sort transactions within the group by action strength, then by 389 + // within actions of similar strength. 390 + $strength_groups = mgroup($group, 'getActionStrength'); 391 + krsort($strength_groups); 392 + foreach ($strength_groups as $strength_group) { 393 + foreach (msort($strength_group, 'getID') as $xaction) { 394 + $results[] = $xaction; 395 + } 396 + } 397 + 398 + $groups[$key] = $results; 389 399 } 390 400 391 401 return $groups;