Homec4science

Fix literally thousands of drag-to-reorder priority bugs

Authored by epriestley <git@epriestley.com> on Mar 21 2015, 01:38.

Description

Fix literally thousands of drag-to-reorder priority bugs

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.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: chad, epriestley

Maniphest Tasks: T5201, T7563

Differential Revision: https://secure.phabricator.com/D12121

Details

Committed
epriestley <git@epriestley.com>Mar 21 2015, 01:38
Pushed
aubortJan 31 2017, 17:16
Parents
rPHac029d0a50e7: Fix a self-XSS hole in Diffusion
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH5aca52998058: Fix literally thousands of drag-to-reorder priority bugs (authored by epriestley <git@epriestley.com>).Mar 21 2015, 01:38