Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsminto2005-08-31 18:32:18 +0000
committersminto2005-08-31 18:32:18 +0000
commit5b4bf347a9f16a9bfa649d2bcc55070f9e9ce53a (patch)
tree0a55ed74d212d34954090beaf62e4a02976bef45
parent1db74d55175e367f4ad2f7e4a9466dcbd5072648 (diff)
downloadorg.eclipse.mylyn.tasks-5b4bf347a9f16a9bfa649d2bcc55070f9e9ce53a.tar.gz
org.eclipse.mylyn.tasks-5b4bf347a9f16a9bfa649d2bcc55070f9e9ce53a.tar.xz
org.eclipse.mylyn.tasks-5b4bf347a9f16a9bfa649d2bcc55070f9e9ce53a.zip
added support for override and update
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/offline/OfflineReportsFile.java13
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTask.java5
2 files changed, 12 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/offline/OfflineReportsFile.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/offline/OfflineReportsFile.java
index fe713c8a8..146087264 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/offline/OfflineReportsFile.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/offline/OfflineReportsFile.java
@@ -106,12 +106,15 @@ public class OfflineReportsFile
if(in.getCompareResult() == null){
return true;
} else if(oldBug.hasChanges()){
- if(!MessageDialog.openQuestion(null, "Update Local Copy", "Local copy of Bug# " + entry.getId() + " Has Changes.\nYour added comment will be saved, but all other changes will be lost .\nDo you want to continue?")){
- return false;
+ if(!MessageDialog.openQuestion(null, "Update Local Copy", "Local copy of Bug# " + entry.getId() + " Has Changes.\nWould you like to override local changes? Note: if you select No, your added comment will be saved with the updated bug, but all other changes will be lost.")){
+ ((BugReport)entry).setNewComment(((BugReport)oldBug).getNewComment());
+ ((BugReport)entry).setHasChanged(true);
+ status = BugzillaOfflineStaus.CONFLICT;
+ } else {
+ ((BugReport)entry).setHasChanged(false);
+ status = BugzillaOfflineStaus.SAVED;
}
- ((BugReport)entry).setNewComment(((BugReport)oldBug).getNewComment());
- ((BugReport)entry).setHasChanged(true);
- status = BugzillaOfflineStaus.CONFLICT;
+
} else {
DiffNode node = (DiffNode)in.getCompareResult();
IDiffElement[] children = node.getChildren();
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTask.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTask.java
index 3d417f16d..b41357a6b 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTask.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTask.java
@@ -635,8 +635,11 @@ public class BugzillaTask extends Task {
private BugReportSyncState syncState = BugReportSyncState.OK;
public void setSyncState(BugReportSyncState syncState) {
- if((this.syncState != BugReportSyncState.INCOMMING && syncState != BugReportSyncState.OK))
+ if((this.syncState == BugReportSyncState.INCOMMING && syncState == BugReportSyncState.OK)){
+ // do nothing
+ } else {
this.syncState = syncState;
+ }
}
public static String getHandle(IBugzillaBug bug) {

Back to the top