From 8f4a63d7083d07836e6851f2aeb238bda5141c98 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 3 Aug 2016 16:14:17 -0700 Subject: [PATCH] Use consistent tag order in Maniphest list views and workboard cards Summary: Fixes T11420. These are selected in newest-to-oldest order from the database, but we should show them in oldest-to-newest order in the UI. Test Plan: Tagged a couple tasks with "A, B, C" projects, saw correct order in UI: {F1749351} {F1749352} Reviewers: chad Reviewed By: chad Maniphest Tasks: T11420 Differential Revision: https://secure.phabricator.com/D16367 --- src/applications/maniphest/view/ManiphestTaskListView.php | 2 +- src/applications/project/view/ProjectBoardTaskCard.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/applications/maniphest/view/ManiphestTaskListView.php b/src/applications/maniphest/view/ManiphestTaskListView.php index 5c01a2d9fb..6f714d0c5c 100644 --- a/src/applications/maniphest/view/ManiphestTaskListView.php +++ b/src/applications/maniphest/view/ManiphestTaskListView.php @@ -96,7 +96,7 @@ final class ManiphestTaskListView extends ManiphestView { $project_handles = array_select_keys( $handles, - $task->getProjectPHIDs()); + array_reverse($task->getProjectPHIDs())); $item->addAttribute( id(new PHUIHandleTagListView()) diff --git a/src/applications/project/view/ProjectBoardTaskCard.php b/src/applications/project/view/ProjectBoardTaskCard.php index a7ee93dd76..ba5213a623 100644 --- a/src/applications/project/view/ProjectBoardTaskCard.php +++ b/src/applications/project/view/ProjectBoardTaskCard.php @@ -128,6 +128,7 @@ final class ProjectBoardTaskCard extends Phobject { } if ($project_handles) { + $project_handles = array_reverse($project_handles); $tag_list = id(new PHUIHandleTagListView()) ->setSlim(true) ->setHandles($project_handles);