Page MenuHomePhabricator

Fix errant rules for associating projects when dragging tasks within a milestone column
ClosedPublic

Authored by epriestley on May 3 2016, 11:54 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 19, 3:35 AM
Unknown Object (File)
Wed, Dec 18, 10:59 AM
Unknown Object (File)
Mon, Dec 16, 6:36 PM
Unknown Object (File)
Wed, Dec 11, 1:35 PM
Unknown Object (File)
Tue, Dec 10, 5:06 PM
Unknown Object (File)
Wed, Nov 27, 2:08 AM
Unknown Object (File)
Sat, Nov 23, 9:45 PM
Unknown Object (File)
Thu, Nov 21, 10:05 AM
Subscribers
None

Details

Summary

Fixes T10912. When you drag tasks within a milestone, we currently apply an overbroad, API-focused rule and add the parent board's project. This logic was added fairly recently, as part of T6027, to improve the behavior of API-originated moves.

Later on, this causes the task to toggle in and out of the parent project on every alternate drag.

This logic is also partially duplicated in the MoveController.

  • Add test coverage for this interaction.
  • Fix the logic so it accounts for subproject / milestone columns correctly.
  • Put all of the logic into the TransactionEditor, so the API gets the exact same rules.
Test Plan
  • Added a failing test and made it pass.
  • Dragged tasks around within a milestone column:
    • Before patch: they got bogus project swaps on every other move.
    • After patch: projects didn't change (correct).
  • Dragged tasks around between normal and milestone columns.
    • Before patch: worked properly.
    • After patch: still works properly.

Here's what the bad changes look like, the task is swapping projects with every other move:

Screen Shot 2016-05-03 at 4.50.36 AM.png (166×698 px, 57 KB)

The "every other" is because the logic was trying to do this:

  • Add both the parent and milestone project.
  • Whichever one exists already gets dropped from the change list because it would have no effect.
  • The other one then applies.
  • In applying, it forces removal of the first one.
  • Then this process repeats in the other direction the next time through.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Fix errant rules for associating projects when dragging tasks within a milestone column.
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.May 3 2016, 1:49 PM
This revision was automatically updated to reflect the committed changes.