GNOME Bugzilla – Bug 138368
Altering resource assignments does not trigger save reminder
Last modified: 2004-12-22 21:47:04 UTC
If I load in an existing project and alter a resource assignment (in this particular case, I adjusted the load of one person from 50% to 35% on one task), the "save" button and menu items do not become sensitive.
Note the following diff works, though my own sandbox has other stuff in planner-task-dialog.c so the actual lines will be offset. Around line 902 in task_dialog_resource_units_cell_edited() we need to insert, mrp_object_changed (MRP_OBJECT (resource)); Diff is thus... Index: src/planner-task-dialog.c =================================================================== RCS file: /cvs/gnome/planner/src/planner-task-dialog.c,v retrieving revision 1.3 diff -u -B -b -p -r1.3 planner-task-dialog.c --- src/planner-task-dialog.c 17 Mar 2004 19:28:12 -0000 1.3 +++ src/planner-task-dialog.c 29 Mar 2004 02:32:47 -0000 @@ -900,6 +957,7 @@ task_dialog_resource_units_cell_edited ( g_object_set (assignment, "units", atoi (new_text), NULL); + mrp_object_changed (MRP_OBJECT (resource)); } } I think the issue is that adding assignments and other big stuff eventually gets a changed message but editing this cell didn't. Warning - none of the planner-task-dialog.c raises a undo/redo anyway but at least with that change above the Save button gets activated. Rgds, Lincoln.
This isn't quite right, it should be done in libplanner/ somewhere.
Created attachment 26676 [details] [review] This tweaks libplanner/mrp-assignment.c and planner-task-dialog.c. See the patch - it has the cludge to get over fact that object->priv->project doesn't exist for assignments so calling mrp_object_changed with an assignment as your object won't work expecially for setting units.
Committed a variant of this, thanks! Closing this since it does't make a lot of sense to keep it open and the bug is not very critical (in a real-fix way).