Drag and drop in workview always remove parents

Bug #1011932 reported by Izidor Matušov on 2012-06-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Getting Things GNOME!
Medium
Unassigned

Bug Description

Have tasks:
A
 -> B

1, Swtich to WorkView -> only B is shown
2, Drag B and drop it somewhere

Expected result:
Nothing change.

Actual result:
The relation between A and B is discarded and A is also shown in WorkView.

The same issue can be reproduced when filtering with a tag.

Nimit Shah (nimit-svnit) wrote :

Hi Izidor,
   I am unable to understand the bug.
   When we drag drop B into some other task, B becomes a child of that bug and A looses that child. Hence A is shown in workview. Isn't that the expected result?

Izidor Matušov (izidor) wrote :

Nimit> when you drag B somewhere but not under another task. For instance, you start dragging B under C but then you would like to not do it. You put it somewhere else (white space). Expected result is that nothing happens (B is still under A). Actual result is that B is put as standalone task -- something I wouldn't expect in WorkView.

Pankaj Kumar (pankajxdx) on 2014-03-12
Changed in gtg:
assignee: nobody → Pankaj Kumar (pankajxdx)
status: Confirmed → In Progress
Pankaj Kumar (pankajxdx) wrote :

I disable drag and drop for all the views apart from 'All tasks'. Implemented a 'remove_dnd_name()' in liblarch.

Pankaj Kumar (pankajxdx) on 2014-03-13
Changed in gtg:
status: In Progress → Fix Committed
Nimit Shah (nimit-svnit) on 2014-03-13
Changed in gtg:
status: Fix Committed → In Progress
Izidor Matušov (izidor) wrote :

Hi, I don't agree with your patch adding remove_dnd_name(). I still want to be able to drag tasks under another one. Disabling DnD does not solve the root of the problem.

Ideal solution would be to have a check before moving if any of task parents are visible in the current view and task is moved to the root. Psuedo code:

parent_shown = any(parent in tree.get_nodes()for parent in node.get_parents())
is_moved_to_root = ...
if is_moved_to_root and not parent_shown:
    return
else:
   move_to_the_new_parent()

Izidor Matušov (izidor) on 2015-03-15
tags: added: github
Changed in gtg:
assignee: Pankaj Kumar (pankajxdx) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers