Page MenuHomePhabricator

Fix an issue where newly created tasks could appear at the bottom of columns
ClosedPublic

Authored by epriestley on Feb 15 2016, 10:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 1:43 AM
Unknown Object (File)
Fri, Apr 19, 2:25 AM
Unknown Object (File)
Fri, Apr 19, 2:25 AM
Unknown Object (File)
Fri, Apr 19, 2:25 AM
Unknown Object (File)
Thu, Apr 11, 3:45 AM
Unknown Object (File)
Wed, Apr 10, 8:30 AM
Unknown Object (File)
Tue, Apr 9, 6:04 AM
Unknown Object (File)
Thu, Mar 28, 12:45 PM
Subscribers
None

Details

Summary

Ref T10349. At HEAD, if you create a task on a board, it floats to the top correctly.

If you create a task elsewhere and tag it with the board, you were subject to the whims of the layout engine and it would generally end up on the bottom.

Instead, make the rules consistent so that "virtual" positions (of tasks which haven't been committed to a particular position yet) still float to the top.

Test Plan
  • Created tasks from a board.
  • Created tasks from Maniphest, then looked at them on a board.
  • Moved tasks around.
  • In all cases, newly created tasks floated to the top.
  • Sorted by natural and priority.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Fix an issue where newly created tasks could appear at the bottom of columns.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Feb 15 2016, 11:17 PM
This revision was automatically updated to reflect the committed changes.
src/applications/project/storage/PhabricatorProjectColumnPosition.php
64–68

I have a clever way in mind to rewrite this so it's actually human-readable, but haven't gotten around to implementing it yet. But at some point in the future these methods should look something like:

return id(new SortThing())
  ->addAscendingInteger($x)
  ->addDescendingInteger($y)
  ->addDescendingInteger($z);
``