Page MenuHomePhabricator

Change Maniphest AdvancedSearch default for "Group by" to "None" and for "Order by" to "Updated"
Closed, ResolvedPublic

Description

When I use https://phabricator.wikimedia.org/maniphest/query/advanced/ , I would file in the Query for example: Query: wgExtensionDirectory and immediately press ⏎. The resulting search gives me bunch of results that are grouped and ordered by Priority.

I then change it to:
Group By: None
Order By: Date Updated (Latest First)

Press ⏎ again and get what I expected: tasks recently acted on that contains the term.

I am not sure there is much point in grouping by Priority (and when doing so, why explicitly ordering by priority given that within a given priority group, all tasks have .. the same priority).

I suggest changing the default to order by latest date updated and not grouping ?

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Change default Maniphest Search values for "Group by" and "Order by"repos/phabricator/phabricator!102aklapperT404843wmf/stable
Customize query in GitLab

Event Timeline

FWIW, my personal opinion on this is something like:

  • Group By: Yeah, I can't recall a time where I've wanted to group the results by task priority (or by any of the other "Group By" options). On my personal default Maniphest search query, I have it set to None - I'd be happy with this becoming the default :)
  • Order By: I'd also be happy with the current default for this setting being changed. Personally I mostly use a combination of Relevance & Creation (Newest First) for this option; but to be fair, Date Updated (Latest First) sounds like a better default than Priority, so I probably wouldn't mind too much if that was changed to be the default.

On a side note, as a change to these defaults might affect the workflows of folks who often use the Maniphest search feature, maybe it might be worth an email to wikitech-l to advertise this task?

Aklapper renamed this task from Change Maniphest AdvancedSearch defaults for "group by" and "order by" to Change Maniphest AdvancedSearch default for "Group by" to "None" and for "Order by" to "Updated".Sep 22 2025, 11:16 AM
Aklapper triaged this task as Low priority.

I agree that Priority as a default in our installation makes less sense than in that unknown organization which uses Phorge and always prioritizes every single ticket.

Implementing this via a downstream patch seems pretty maintainable:

diff --git a/src/applications/maniphest/query/ManiphestTaskQuery.php b/src/applications/maniphest/query/ManiphestTaskQuery.php
index 3b45c26f73..15c743df07 100644
--- a/src/applications/maniphest/query/ManiphestTaskQuery.php
+++ b/src/applications/maniphest/query/ManiphestTaskQuery.php
@@ -876,9 +876,9 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
     $orders = array_select_keys(
       $orders,
       array(
-        'priority',
         'updated',
         'outdated',
+        'priority',
         'newest',
         'oldest',
         'closed',
diff --git a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
index 40ea471916..7cedef2dff 100644
--- a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
+++ b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
@@ -340,21 +340,21 @@ final class ManiphestTaskSearchEngine
 
   private function getGroupOptions() {
     return array(
+      'none'     => pht('None'),
       'priority' => pht('Priority'),
       'assigned' => pht('Assigned'),
       'status'   => pht('Status'),
       'project'  => pht('Project'),
-      'none'     => pht('None'),
     );
   }
 
   private function getGroupValues() {
     return array(
+      'none'     => ManiphestTaskQuery::GROUP_NONE,
       'priority' => ManiphestTaskQuery::GROUP_PRIORITY,
       'assigned' => ManiphestTaskQuery::GROUP_OWNER,
       'status'   => ManiphestTaskQuery::GROUP_STATUS,
       'project'  => ManiphestTaskQuery::GROUP_PROJECT,
-      'none'     => ManiphestTaskQuery::GROUP_NONE,
     );
   }
 

This got deployed today.
Verified by going to https://phabricator.wikimedia.org/maniphest/query/advanced/ and looking at the "Group By" and "Order By" fields.

That is wonderful, thank you @Aklapper for the quick implementation :]

This is buggy when passing URI parameters, e.g. https://phabricator.wikimedia.org/maniphest/?projectPHIDs=PHID-PROJ-pjhy3ymh5pitgp2jflcb&statuses=open()#R still groups by Priority, but per each page in pagination. That's not good.
I wonder if a fix somewhere would be similar to https://we.phorge.it/rPa27f9cf22a071aad9d3cafd7a9a57a172c26be2d but haven't taken a look yet.