1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 03:12:41 +01:00
phorge-phorge/src/applications/maniphest
epriestley cac26c8824 Fix errant rules for associating projects when dragging tasks within a milestone column
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:

{F1255957}

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.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10912

Differential Revision: https://secure.phabricator.com/D15834
2016-05-03 07:59:05 -07:00
..
__tests__ Modularize content sources 2016-03-26 11:59:45 -07:00
application Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
bulk Fix "Add Project" in bulk editor 2015-07-02 14:24:15 -07:00
capability Simplify the implementation of PhabricatorPolicyCapability subclasses 2014-07-25 08:25:42 +10:00
command Mention !status explicitly in the documentation for !close 2016-01-05 15:08:52 -08:00
conduit Modularize content sources 2016-03-26 11:59:45 -07:00
config Update Maniphest for PHUITwoColumnView 2016-03-04 17:26:38 -08:00
constants Update Maniphest for PHUITwoColumnView 2016-03-04 17:26:38 -08:00
controller Normalize casing on property boxes 2016-04-06 15:33:15 -07:00
edge Modernize Pholio edges 2015-01-02 10:11:41 +11:00
editor Fix errant rules for associating projects when dragging tasks within a milestone column 2016-05-03 07:59:05 -07:00
engineextension Move PhabricatorHovercard to PHUIHovercard 2016-02-03 16:26:30 +00:00
export Consistently refer to 'Projects' as 'Tags' 2016-04-19 16:48:21 +00:00
field Add "and" support to "ref" 2015-05-05 07:14:15 +10:00
herald Allow "Assign task" Herald Action in Maniphest to accept "None" to unassign 2015-12-05 12:39:45 -08:00
httpparametertype Make "Create Subtask" work properly in EditEngine 2015-12-08 14:29:58 -08:00
lipsum Modularize content sources 2016-03-26 11:59:45 -07:00
mail Add Maniphest Task email creator to CCs 2015-09-09 14:07:07 -07:00
phid Mark PhabricatorPHIDType::getPHIDTypeApplicationClass() as abstract 2015-11-03 06:47:12 +11:00
policyrule Allow PolicyRules to serve as "Object Policies" 2015-06-13 15:44:38 -07:00
query Introduce "bridged" objects 2016-03-22 15:06:57 -07:00
remarkup Rename PhutilRemarkupRule subclasses 2014-08-05 00:55:43 +10:00
search Convert all "DocumentIndexers" into "FulltextEngines" 2015-12-21 17:25:23 -08:00
storage Merge TYPE_PROJECT_COLUMNS and TYPE_COLUMN transactions into a more general TYPE_COLUMNS transaction 2016-04-06 09:13:31 -07:00
typeahead Allow Maniphest statuses and priorities to be disabled 2015-12-05 11:01:41 -08:00
view Drop "-pro" suffix and "editpro" URIs for EditEngine in Maniphest 2015-12-08 17:56:59 -08:00