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)
Mon, Mar 4, 7:51 PM
Unknown Object (File)
Feb 13 2024, 11:05 PM
Unknown Object (File)
Feb 9 2024, 4:30 AM
Unknown Object (File)
Feb 3 2024, 7:21 PM
Unknown Object (File)
Feb 3 2024, 2:38 AM
Unknown Object (File)
Jan 19 2024, 12:47 PM
Unknown Object (File)
Dec 21 2023, 10:16 PM
Unknown Object (File)
Dec 21 2023, 10:16 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 4935
Build 4953: [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.