Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-10-28 17:07:00 -0400
committermkersten2005-10-28 17:07:00 -0400
commit95f372e52f09f70851f60c4000c9b39587b920a5 (patch)
tree444fab886304dbfed72a44eb7e6d0ba67826a066
parent9a6141293c6ecd61f075dc953ab79e5ecf75e3c1 (diff)
downloadorg.eclipse.mylyn.tasks-95f372e52f09f70851f60c4000c9b39587b920a5.tar.gz
org.eclipse.mylyn.tasks-95f372e52f09f70851f60c4000c9b39587b920a5.tar.xz
org.eclipse.mylyn.tasks-95f372e52f09f70851f60c4000c9b39587b920a5.zip
Patch for Bug #108305: Commenting from Mylar's Bugzilla UI doesn't update CC
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/editor/ExistingBugEditor.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/editor/ExistingBugEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/editor/ExistingBugEditor.java
index 25203dc2b..a261b0c1d 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/editor/ExistingBugEditor.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/editor/ExistingBugEditor.java
@@ -41,6 +41,7 @@ import org.eclipse.mylar.bugzilla.core.BugPost;
import org.eclipse.mylar.bugzilla.core.BugReport;
import org.eclipse.mylar.bugzilla.core.BugzillaException;
import org.eclipse.mylar.bugzilla.core.BugzillaPlugin;
+import org.eclipse.mylar.bugzilla.core.BugzillaPreferences;
import org.eclipse.mylar.bugzilla.core.BugzillaRepository;
import org.eclipse.mylar.bugzilla.core.Comment;
import org.eclipse.mylar.bugzilla.core.IBugzillaBug;
@@ -326,6 +327,9 @@ public class ExistingBugEditor extends AbstractBugEditor
// set the url for the bug to be submitted to
setURL(form, "process_bug.cgi");
+ //Add the user's address to the CC list if they haven't specified a CC
+ setDefaultCCValue();
+
// go through all of the attributes and add them to the bug post
for (Iterator<Attribute> it = bug.getAttributes().iterator(); it.hasNext(); ) {
Attribute a = it.next();
@@ -959,6 +963,20 @@ public class ExistingBugEditor extends AbstractBugEditor
}
}
+ /**
+ * Sets the cc field to the user's address if a cc has not been
+ * specified to ensure that commenters are on the cc list.
+ * @author Wesley Coelho
+ */
+ private void setDefaultCCValue(){
+ Attribute attr = bug.getAttributeForKnobName("newcc");
+ if(attr != null) {
+ if (attr.getNewValue().equals("")){
+ attr.setNewValue(BugzillaPreferences.getUserName());
+ }
+ }
+ }
+
// TODO used for spell checking. Add back when we want to support this
// protected Button checkSpellingButton;
//

Back to the top