Re: Fixing bug #382548



On Fri, Jan 04, 2008 at 08:54:18AM +0100, Massimiliano Franco wrote:
> Hi,
> 
> Let's try ...
> 
> In the first scenario, you change the status of an entry from a task to
> a summary.
> A summary task should not have a dependency on his subtasks or am I
> wrong. If not, you could simply remove any T2 => T1 dependency while
> indenting.
> 
> Max

Planner's current behaviour is to pop up a dialog telling you that what
you are trying to do would result in a loop and this is what should
happen for scenario 1 as well.

The code responsible for checking this is in
mrp_task_manager_check_move(). The bug is that this function does not
detect the loop in all cases. That is what needs to be fixed.

Compare it to the scenario where you have t1 as a predecessor of t2 and
then try to indent t2. Try it out, it will show you what should happen.


I thought about what I said earlier and it won't work: 
> My first thought was to add all predecessors of the parent task t1 to                                                                                                                                
> the t2 and its children when t2 was added (using                                                                                                                                                     
> imrp_task_peek_predecessors() to get them). Because predecessors are                                                                                                                                 
> always added recursively to all children of a task it should be enough                                                                                                                               
> to look only at the parent's predecessors.                                                                                                                                                           

The reason that it will not work is that predecessors are only added
recursively to children in the dependency graph, not in the list of
predecessors that you get by calling imrp_task_peek_predecessors.
Once those relations are in the dependency graph they cannot be
distinguished from child-to-parent relationships, so getting them there
is also not an option.


Maurice.

-- 
Maurice van der Pot

Gentoo Linux Developer   griffon26 gentoo org    http://www.gentoo.org
Gnome Planner Developer  griffon26 kfk4ever com  http://live.gnome.org/Planner

Attachment: pgp8Bcy0MREpF.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]