Commit c5e5cc40 authored by Maurice van der Pot's avatar Maurice van der Pot Committed by Maurice van der Pot

Don't let fixed duration tasks run during non-working intervals on a

2008-02-09  Maurice van der Pot  <griffon26@kfk4ever.com>

	* libplanner/mrp-task-manager.c:
	(task_manager_calculate_task_finish),
	(task_manager_calculate_task_start_from_finish):
	Don't let fixed duration tasks run during non-working intervals on a working
	day (such as lunch time). This fixes the incorrect duration of fixed duration 
	tasks as reported in bug #486990 by Sebastien Roy <sebastien.roy@sun.com>.

	* libplanner/mrp-task.c: (task_class_init): 
	Fixed typo in property description.

	* src/planner-gantt-row.c: (gantt_row_notify_cb):
	Allow changes in scheduling mode to update the gantt bar appearance.


svn path=/trunk/; revision=879
parent f4d6b001
2008-02-09 Maurice van der Pot <griffon26@kfk4ever.com>
* libplanner/mrp-task-manager.c:
(task_manager_calculate_task_finish),
(task_manager_calculate_task_start_from_finish):
Don't let fixed duration tasks run during non-working intervals on a working
day (such as lunch time). This fixes the incorrect duration of fixed duration
tasks as reported in bug #486990 by Sebastien Roy <sebastien.roy@sun.com>.
* libplanner/mrp-task.c: (task_class_init):
Fixed typo in property description.
* src/planner-gantt-row.c: (gantt_row_notify_cb):
Allow changes in scheduling mode to update the gantt bar appearance.
2008-02-02 Maurice van der Pot <griffon26@kfk4ever.com>
* libplanner/mrp-sql.c: (mrp_sql_load_project),
......
......@@ -1702,8 +1702,7 @@ task_manager_calculate_task_finish (MrpTaskManager *manager,
MrpUnitsInterval *unit_ival;
MrpTaskType type;
MrpTaskSched sched;
priv = manager->priv;
if (task == priv->root) {
......@@ -1802,8 +1801,10 @@ task_manager_calculate_task_finish (MrpTaskManager *manager,
}
else if (sched == MRP_TASK_SCHED_FIXED_DURATION) {
delta = t2 - t1;
if (effort + delta >= *duration) {
if (unit_ival->units_full == 0) {
delta = 0;
} else if (effort + delta >= *duration) {
/* Done, make sure we don't spill. */
finish = t1 + *duration - effort;
goto done;
......@@ -1865,7 +1866,7 @@ task_manager_calculate_task_start_from_finish (MrpTaskManager *manager,
MrpUnitsInterval *unit_ival;
MrpTaskType type;
MrpTaskSched sched;
priv = manager->priv;
if (task == priv->root) {
......@@ -1956,7 +1957,9 @@ task_manager_calculate_task_start_from_finish (MrpTaskManager *manager,
else if (sched == MRP_TASK_SCHED_FIXED_DURATION) {
delta = t2 - t1;
if (effort + delta >= *duration) {
if (unit_ival->units_full == 0) {
delta = 0;
} else if (effort + delta >= *duration) {
/* Done, make sure we don't spill. */
start = t2 - (*duration - effort);
goto done;
......
......@@ -371,7 +371,7 @@ task_class_init (MrpTaskClass *klass)
object_class,
PROP_SCHED,
g_param_spec_enum ("sched",
"Sceduling type",
"Scheduling type",
"Task scheduling type",
MRP_TYPE_TASK_SCHED,
MRP_TASK_SCHED_FIXED_WORK,
......
......@@ -2074,8 +2074,9 @@ gantt_row_notify_cb (MrpTask *task, GParamSpec *pspec, PlannerGanttRow *row)
* it since it's a good optimization.
*/
else if (strcmp (pspec->name, "critical") != 0 &&
strcmp (pspec->name, "priority") != 0 &&
strcmp (pspec->name, "percent-complete")) {
strcmp (pspec->name, "sched") != 0 &&
strcmp (pspec->name, "priority") != 0 &&
strcmp (pspec->name, "percent-complete")) {
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment