Page MenuHomePhabricator

Fix literally thousands of drag-to-reorder priority bugs
ClosedPublic

Authored by epriestley on Mar 21 2015, 12:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 21, 3:25 AM
Unknown Object (File)
Sun, Dec 8, 10:23 PM
Unknown Object (File)
Wed, Dec 4, 2:57 AM
Unknown Object (File)
Mon, Dec 2, 11:39 AM
Unknown Object (File)
Nov 20 2024, 8:16 AM
Unknown Object (File)
Nov 19 2024, 3:17 PM
Unknown Object (File)
Nov 18 2024, 7:45 AM
Unknown Object (File)
Nov 14 2024, 1:15 PM
Subscribers
Tokens
"Mountain of Wealth" token, awarded by btrahan."Yellow Medal" token, awarded by chad."Mountain of Wealth" token, awarded by nicolast."Love" token, awarded by Taskle.

Details

Summary

Fixes T7563. Fixes T5201. Reframe this as two separate operations:

  • Move before or after a task.
  • Move to the beginning or end of a priority.

Then:

  • Make all the order queries unambiguous and properly reversible, with an explicit id order.
  • Just reuse ManiphestTask to get results in the correct order.
  • Simplify the actual transaction apply logic.
  • Detect and recover from cases where tasks have identical or similar subpriorities.
Test Plan
  • Wrote and executed unit tests.
  • Dragged and dropped tasks within priorities and between priorities in the main Maniphest view.
  • Dragged and dropped tasks within priorities in the workboard view, when ordered by priority.
  • Also poked at the "natural" order, but that shouldn't be affected.

Diff Detail

Repository
rP Phabricator
Branch
mdragorder
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 4934
Build 4952: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

epriestley retitled this revision from to Fix literally thousands of drag-to-reorder priority bugs.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
src/applications/maniphest/query/ManiphestTaskQuery.php
771–775

This change guarantees we get an explicit task.id order, which is important for reverse-order queries. MySQL will order by ID by default, but won't know how to reverse it.

1070–1072

This selection clause was not consistent with the ORDER clause.

chad added a reviewer: chad.
chad added a subscriber: chad.

My opinion means little, but this is a fine diff with many test cases that look a-ok to me.

This revision is now accepted and ready to land.Mar 21 2015, 12:27 AM

I'll land this if you arc patch it locally and can't break it either? I don't think @btrahan needs to look at it but you might be able to find something I missed.

(Or your local test tasks could be spookier than mine.)

patched and tested Maniphest, Workboards, and reordering Application Pins

This revision was automatically updated to reflect the committed changes.