Page MenuHomePhabricator

Workboards are too ambitious when re-prioritizing tasks
Closed, ResolvedPublic

Description

  • Create a workboard with two columns.
  • In one column, put a "High" priority task and a "Low" priority task.
  • In the other column, put a "Normal" priority task.
  • Drag the "Normal" priority task between the "High" and "Low" priority tasks.

Expected behavior:

  • Task priority is not adjusted.

Actual behavior:

  • Task priority is adjusted to "High".

Here are screenshots showing this process:

{F131593}

{F131595}

{F131597}

The reason this happens is because we share code with the Maniphest list view, which has slightly different constraints.

On the list view, it is not possible to generate a drag operation which does not change priority (or change sub-priority). The only place you can drag a task and have it keep the same priority/sub-priority is its current spot -- drags within a priority level may not require a top-level change, but the "subpriority" will always need to change. However, on the workboards, drags between columns do not always need to change priority.

The current behavior is correct for drags which do need to change priority. If the task had been "Unbreak Now!" or "Wishlist", it would be appropriate for it to end up with "High" priority. However, for tasks with a priority which satisfies the existing constraints, we shouldn't do a priority change.

Event Timeline

epriestley raised the priority of this task from to Normal.
epriestley updated the task description. (Show Details)
epriestley added a project: Workboards.
epriestley added subscribers: epriestley, btrahan, mbishopim3.

The simplest fix that leaps to mind is

  • right now we send the "above phid" to the server and upgrade the task to the "above phid" task's priority
  • instead send the "below phid" and upgrade the task's priority IFF the "below phid" task has the same priority (subpriority update) or higher priority (priority and subpriority update)

Does this sound right algorithmically?

Without looking at the code, I'd guess we'd want to do something like:

  • Send both "above" and "below".
  • If priority is between above and below already, no priority change.
  • Slightly tricky handling the various above-or-below-are-null cases (dragging to the top or bottom of a list, or dragging a task to be the only item in an previously empty list). We probably get this mostly right already but I don't remember exactly how the logic goes.

Could be possible to add separators in the columns "wishlist, low, normal.." like the screenshot that Chad posted at https://secure.phabricator.com/T1344 ? In this case, the user is able to move the task to an specific column and change the priority too.

Let us know if this still seems funky.