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
F14046118: D15276.id36857.diff
Wed, Nov 13, 6:23 PM
F14004865: D15276.id36857.diff
Sun, Oct 27, 4:05 AM
Unknown Object (File)
Oct 9 2024, 9:41 AM
Unknown Object (File)
Sep 30 2024, 4:56 PM
Unknown Object (File)
Sep 21 2024, 3:22 PM
Unknown Object (File)
Sep 9 2024, 11:19 PM
Unknown Object (File)
Sep 6 2024, 7:14 AM
Unknown Object (File)
Sep 5 2024, 10:04 AM
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);
``