Resolves T4659. This implements support for sorting tasks by custom fields.
Some of this feels hacky in the way it's hooked up to the Maniphest search engine and task query.
Differential D10106
Support custom fields in "Order By" for Maniphest hach-que on Aug 1 2014, 3:19 AM. Authored by Tags None Referenced Files
Subscribers Tokens
Details
Resolves T4659. This implements support for sorting tasks by custom fields. Some of this feels hacky in the way it's hooked up to the Maniphest search engine and task query. Queryed on a custom date field, with a small page size, and moved back and forth through the result set.
Diff Detail
Event Timeline
Comment Actions This is awesome! I think I caught one real issue (incorrect construction of ORDER BY clause in the presence of a "Group by" selection in the UI). Some general rambling elsewhere, but all of that seems really nitpicky and easy to change later if we hit real issues. I think it largely does a good job of balancing complexity with making the feature work, since we don't need any of the full-power generalizations yet.
Comment Actions I'm going to hold off doing any generalisations or major refactorings. I think the Order By behaviour probably needs to be generalised (including the "built-in" order bys). While we're at it, generalising Group By would probably be good as well, by moving a lot of that query construction into PhabricatorCursorPagedPolicyAwareQuery. Moving this kind of logic into the base class would vastly simplify the ManiphestTaskQuery implementation, would allow other queries to take advantage of it and would probably make a bunch of this "if custom field ordering, ignore switch statement" kind of logic go away. This comment was removed by pyleaf. |