After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 604169 - Using a GtkCombo for edit->task->predecessors can give incorrect predecessor
Using a GtkCombo for edit->task->predecessors can give incorrect predecessor
Status: RESOLVED FIXED
Product: planner
Classification: Other
Component: General
0.14.x
Other Linux
: Normal normal
: 0.15
Assigned To: planner-maint
planner-maint
: 303251 342320 611049 667789 678857 709949 (view as bug list)
Depends on:
Blocks: 575129
 
 
Reported: 2009-12-09 12:31 UTC by Caolan McNamara
Modified: 2013-10-13 09:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to migrate to GtkComboBoxEntry (7.04 KB, patch)
2009-12-09 12:31 UTC, Caolan McNamara
none Details | Review
update patch (6.99 KB, patch)
2010-01-11 09:02 UTC, Caolan McNamara
none Details | Review
extend patch (9.20 KB, patch)
2010-01-25 10:33 UTC, Caolan McNamara
none Details | Review
update to apply against 0.14.5 (9.19 KB, patch)
2011-07-11 10:36 UTC, Caolan McNamara
needs-work Details | Review
Switch from GtkComboEntry to GtkCombo (10.39 KB, patch)
2013-05-13 16:06 UTC, Alexandre Franke
committed Details | Review

Description Caolan McNamara 2009-12-09 12:31:48 UTC
Created attachment 149422 [details] [review]
patch to migrate to GtkComboBoxEntry

If there are two or more tasks with the same name, then selecting an entry that has a duplicate name earlier in the list can result in the GtkCombo returning the first entry with that name as the one to use. See https://bugzilla.redhat.com/show_bug.cgi?id=545711 for an example .planner file and a standalone pygtk demo of the problem

The GtkCombo is deprecated, and moving to a GtkComboBoxEntry solves the problem, killing two birds with one stone.
Comment 1 Caolan McNamara 2010-01-11 09:02:29 UTC
Created attachment 151157 [details] [review]
update patch
Comment 2 Alexandre Franke 2010-01-16 18:05:27 UTC
*** Bug 303251 has been marked as a duplicate of this bug. ***
Comment 3 Caolan McNamara 2010-01-25 10:33:54 UTC
Created attachment 152213 [details] [review]
extend patch

The original patch does what its supposed to do, which is to select the correct backend task depending on the selected task in the UI and avoid the combobox selection bustage.

This one extends the patch to add in the WBS string to the front of the UI list to make it easier to see which task is being selected when they share a name.
Comment 4 Alexandre Franke 2010-02-25 11:48:49 UTC
*** Bug 611049 has been marked as a duplicate of this bug. ***
Comment 5 Caolan McNamara 2011-07-11 10:36:41 UTC
Created attachment 191696 [details] [review]
update to apply against 0.14.5
Comment 6 Alexandre Franke 2012-01-12 16:05:25 UTC
*** Bug 667789 has been marked as a duplicate of this bug. ***
Comment 7 Alexandre Franke 2012-03-10 15:16:34 UTC
*** Bug 342320 has been marked as a duplicate of this bug. ***
Comment 8 Alexandre Franke 2012-06-26 10:30:38 UTC
*** Bug 678857 has been marked as a duplicate of this bug. ***
Comment 9 Alexandre Franke 2013-05-13 16:05:55 UTC
Review of attachment 191696 [details] [review]:

There were some trailing whitespaces which I have fixed.

::: planner-0.14.4.orig/src/planner-gantt-model.c
@@ +1129,3 @@
 }
 
+gchar *get_wbs_from_task(MrpTask *task)

Our coding style has returned type on a first line and function name at the beginning of the second line.
Also I added a prototype for this function at the beginning of the file.

::: planner-0.14.4.orig/src/planner-task-dialog.c
@@ +357,3 @@
+	GtkListStore *store;
+	GtkTreeIter iter;
+	GtkCellRenderer *renderer;

This renderer variable is unused. I removed it.

@@ +368,2 @@
 	for (l = tasks; l; l = l->next) {
+		GString *scratch;

I renamed this variable to a more explicit "task_label".
Comment 10 Alexandre Franke 2013-05-13 16:06:58 UTC
Created attachment 244063 [details] [review]
Switch from GtkComboEntry to GtkCombo
Comment 11 Alexandre Franke 2013-05-13 16:13:42 UTC
Attachment 244063 [details] pushed as 7b003e5 - Switch from GtkComboEntry to GtkCombo
Comment 12 Alexandre Franke 2013-10-13 09:46:31 UTC
*** Bug 709949 has been marked as a duplicate of this bug. ***