[Planner Dev] cost of tasks with subtasks
- From: Doroszlai Attila <eti pga hu>
- To: planner-dev lists imendio com
- Subject: [Planner Dev] cost of tasks with subtasks
- Date: Sat, 17 Apr 2004 13:46:28 +0200
Hi,
I'm working on the caching of task cost (part of #138475) and I
need some advice.
1. The cached value has to be invalidated when assignments get
added or removed, and when task duration (or work?) is changed.
I've solved this with a function in mrp-task that marks the
cached value as stale, so that on the next request, cost is
recalculated. Staleness also propagates to parent tasks. This
function is called from
- task_assignment_removed_cb,
- task_remove_assignments,
- imrp_task_add_assignment,
- imrp_task_set_duration.
Question: is this OK, or is there another, preferred way to do
it?
2. Invalidation also must happen when the cost of a resource is
changed. For this, I added a function that invalidates the
cached cost for all tasks that a resource is assigned to. This
is called from resource_dialog_cost_changed_cb in
planner-resource-dialog.c.
Question: how do I handle the cost-change event if it happens
in the resource view, not the dialog? The problem is that in
the view, cost is a custom property, while for the dialog,
there is a callback explicitly for cost change.
-Attila
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]