Re: [Planner Dev] Re: Roadmap



Jani Tiainen wrote:
Bug 140536: Critical path broken
>>>

Fixed:

I just changed backpass to go through all child tasks
if such exists.

Seems to work with few testcases I made.

Bug 154253: Milestones shouldn't be able to have subtasks


Fixed. There is still possibilty to load file that has
subtasks for milestones. (Faulty file attached)

Bug 151730: Toolbar buttons unavailable after indenting a task


Fixed:

It actually destroyed selection and blocked selection change signal. If signal was unblocked it selected first (in reverse order I guess) item only.

Now it selects all items that were selected, despite the fact were they intended or not.

Indent/undent still works in a pretty unpredictable way when you have multiple tasks selected that are not grouped together. That should be fixed in the future so that you can't even try indent in such a cases.

Other notes:

GUI should really reflect state of selections. Now it has many options available that is purely impossible, like indent/unindent in cases where it is not even possible. It looks like not polished.

This also sometimes creates unwanted indents/unindents if many tasks are selected...


Attachmets: Bugfix patch for bugs above, expanded testcase for bug 140536, faulty file for bug 154253.
--

Jani Tiainen
? bugfixes_200502060921.patch
? data/planner.desktop.in
Index: libplanner/mrp-task-manager.c
===================================================================
RCS file: /cvs/gnome/planner/libplanner/mrp-task-manager.c,v
retrieving revision 1.12
diff -B -u -b -r1.12 mrp-task-manager.c
--- libplanner/mrp-task-manager.c	4 Oct 2004 22:29:19 -0000	1.12
+++ libplanner/mrp-task-manager.c	6 Feb 2005 07:29:21 -0000
@@ -1744,18 +1744,34 @@
 		}
 
 		successors = imrp_task_peek_successors (task);
+				
 		for (s = successors; s; s = s->next) {
 			MrpRelation *relation;
-			MrpTask     *successor;
+			MrpTask     *successor, *child;
 
 			relation = s->data;
 			successor = mrp_relation_get_successor (relation);
 			
+			child = mrp_task_get_first_child(successor);
+			if (child) {
+				/* If successor has childs  go through them instead of successor itself*/
+				for (; child; child = mrp_task_get_next_sibling(child)) {
+					successor = child;
+					
 			t2 = mrp_task_get_latest_start (successor) -
 				mrp_relation_get_lag (relation);
 			
 			t1 = MIN (t1, t2);
 		}
+			} else {
+				/* No childs, check real successor */
+				t2 = mrp_task_get_latest_start (successor) -
+					mrp_relation_get_lag (relation);
+				
+				t1 = MIN (t1, t2);
+			}
+			
+		}
 
 		imrp_task_set_latest_finish (task, t1);
 
Index: src/planner-task-tree.c
===================================================================
RCS file: /cvs/gnome/planner/src/planner-task-tree.c,v
retrieving revision 1.46
diff -B -u -b -r1.46 planner-task-tree.c
--- src/planner-task-tree.c	13 Oct 2004 17:49:44 -0000	1.46
+++ src/planner-task-tree.c	6 Feb 2005 07:29:28 -0000
@@ -2900,7 +2900,9 @@
 	task = list->data;
 	
 	new_parent = planner_gantt_model_get_indent_task_target (model, task);
-	if (new_parent == NULL) {
+	if (new_parent == NULL || 
+		mrp_task_get_task_type(new_parent) == MRP_TASK_TYPE_MILESTONE) {
+		/* Toplevel item, or parent task would be milestone */
 		g_list_free (list);
 		return;
 	}
@@ -2918,6 +2920,7 @@
 	g_list_free (list);
 
 	indent_tasks = g_list_reverse (indent_tasks);
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree));
 
 	for (l = indent_tasks; l; l = l->next) {
 		TaskCmdMove *cmd;
@@ -2938,17 +2941,13 @@
 			gtk_widget_destroy (dialog);
 			g_error_free (error);
 		}
-	}
 
 	path = planner_gantt_model_get_path_from_task (PLANNER_GANTT_MODEL (model), 
-						       indent_tasks->data);
-
-	task_tree_block_selection_changed (tree);
-	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree));
+								task);
 	gtk_tree_selection_select_path (selection, path);
-	task_tree_unblock_selection_changed (tree);
 
 	gtk_tree_path_free (path);
+	}
 
 	g_list_free (indent_tasks);
 }
@@ -3000,22 +2999,20 @@
 	g_list_free (list);
 
 	unindent_tasks = g_list_reverse (unindent_tasks);
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree));
 
 	for (l = unindent_tasks; l; l = l->next) {
 		task = l->data;
 
 		task_cmd_move (tree, task, NULL, new_parent, FALSE, NULL);
-	}
 
 	path = planner_gantt_model_get_path_from_task (PLANNER_GANTT_MODEL (model), 
-						       unindent_tasks->data);
+						       task);
 
-	task_tree_block_selection_changed (tree);
-	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree));
 	gtk_tree_selection_select_path (selection, path);
-	task_tree_unblock_selection_changed (tree);
 
 	gtk_tree_path_free (path);
+	}
 
 	g_list_free (unindent_tasks);
 }

Attachment: bug140536_test.planner
Description: application/planner

Attachment: milestone_subtask_bug.planner
Description: application/planner



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