Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2010-04-07 16:21:02 +0000
committerfbecker2010-04-07 16:21:02 +0000
commit0001b3db1197dfba47fdc80afbf4dcd9a32b24af (patch)
treec2f248c27e98cb4c5f84f0347605e1ed8f8d17ba /org.eclipse.mylyn.bugzilla.core
parentb3fd22db7d35ec7046a8d63d25f37104ebf78aff (diff)
downloadorg.eclipse.mylyn.tasks-0001b3db1197dfba47fdc80afbf4dcd9a32b24af.tar.gz
org.eclipse.mylyn.tasks-0001b3db1197dfba47fdc80afbf4dcd9a32b24af.tar.xz
org.eclipse.mylyn.tasks-0001b3db1197dfba47fdc80afbf4dcd9a32b24af.zip
NEW - bug 289015: [upstream] changing timezones results in mid-air collisions
https://bugs.eclipse.org/bugs/show_bug.cgi?id=289015
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.core')
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java24
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaVersion.java8
2 files changed, 18 insertions, 14 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
index c17d569bb..9725e1962 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
@@ -1164,6 +1164,12 @@ public class BugzillaClient {
Iterator<TaskAttribute> itr = attributes.iterator();
boolean tokenFound = false;
boolean tokenRequired = false;
+ BugzillaVersion bugzillaVersion = null;
+ if (repositoryConfiguration != null) {
+ bugzillaVersion = repositoryConfiguration.getInstallVersion();
+ } else {
+ bugzillaVersion = BugzillaVersion.MIN_VERSION;
+ }
while (itr.hasNext()) {
TaskAttribute a = itr.next();
@@ -1183,12 +1189,6 @@ public class BugzillaClient {
|| id.equals(BugzillaAttribute.VOTES.getKey())) {
continue;
} else if (id.equals(BugzillaAttribute.NEW_COMMENT.getKey())) {
- BugzillaVersion bugzillaVersion = null;
- if (repositoryConfiguration != null) {
- bugzillaVersion = repositoryConfiguration.getInstallVersion();
- } else {
- bugzillaVersion = BugzillaVersion.MIN_VERSION;
- }
if (bugzillaVersion.compareMajorMinorOnly(BugzillaVersion.BUGZILLA_2_18) == 0) {
a.setValue(formatTextToLineWrap(a.getValue(), true));
}
@@ -1206,7 +1206,11 @@ public class BugzillaClient {
} else if (id != null && id.compareTo("") != 0) { //$NON-NLS-1$
String value = a.getValue();
if (id.equals(BugzillaAttribute.DELTA_TS.getKey())) {
- value = stripTimeZone(value);
+ if (bugzillaVersion.compareTo(BugzillaVersion.BUGZILLA_3_4_7) < 0
+ || (bugzillaVersion.compareTo(BugzillaVersion.BUGZILLA_3_5) >= 0)
+ && bugzillaVersion.compareTo(BugzillaVersion.BUGZILLA_3_6) < 0) {
+ value = stripTimeZone(value);
+ }
}
if (id.startsWith("task.common.kind.flag_type") && repositoryConfiguration != null) { //$NON-NLS-1$
List<BugzillaFlag> flags = repositoryConfiguration.getFlags();
@@ -1262,12 +1266,6 @@ public class BugzillaClient {
}
// add the operation to the bug post
- BugzillaVersion bugzillaVersion = null;
- if (repositoryConfiguration != null) {
- bugzillaVersion = repositoryConfiguration.getInstallVersion();
- } else {
- bugzillaVersion = BugzillaVersion.MIN_VERSION;
- }
if (bugzillaVersion.compareTo(BugzillaVersion.BUGZILLA_3_2) < 0) {
TaskAttribute attributeOperation = model.getRoot().getMappedAttribute(TaskAttribute.OPERATION);
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaVersion.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaVersion.java
index 0842358ca..2568f948d 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaVersion.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaVersion.java
@@ -32,7 +32,13 @@ public class BugzillaVersion implements Comparable<BugzillaVersion>, Serializabl
public final static BugzillaVersion BUGZILLA_3_4 = new BugzillaVersion("3.4"); //$NON-NLS-1$
- public final static BugzillaVersion MAX_VERSION = new BugzillaVersion("3.4"); //$NON-NLS-1$
+ public final static BugzillaVersion BUGZILLA_3_4_7 = new BugzillaVersion("3.4.7"); //$NON-NLS-1$
+
+ public final static BugzillaVersion BUGZILLA_3_5 = new BugzillaVersion("3.5"); //$NON-NLS-1$
+
+ public final static BugzillaVersion BUGZILLA_3_6 = new BugzillaVersion("3.6"); //$NON-NLS-1$
+
+ public final static BugzillaVersion MAX_VERSION = new BugzillaVersion("3.6"); //$NON-NLS-1$
private final int major;

Back to the top