Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2011-10-28 20:01:09 +0000
committerFrank Becker2011-10-28 20:01:09 +0000
commit2f46636bfd6b9dc48e6485ec674ed57d86cc52e9 (patch)
treec19d6bb1786b53bc2241c4d9727f7ed262e573dd /org.eclipse.mylyn.bugzilla.core
parentaa897429c6f89c872ffc23c8a69d4ccd42b63250 (diff)
downloadorg.eclipse.mylyn.tasks-2f46636bfd6b9dc48e6485ec674ed57d86cc52e9.tar.gz
org.eclipse.mylyn.tasks-2f46636bfd6b9dc48e6485ec674ed57d86cc52e9.tar.xz
org.eclipse.mylyn.tasks-2f46636bfd6b9dc48e6485ec674ed57d86cc52e9.zip
ASSIGNED - bug 346882: [upstream] unable to update tickets with Bugzilla
4.0 and Mylyn https://bugs.eclipse.org/bugs/show_bug.cgi?id=346882
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.core')
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java10
1 files changed, 8 insertions, 2 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 87863f3dc..9e3c22949 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
@@ -1699,8 +1699,13 @@ public class BugzillaClient {
inStream = getResponseStream(getMethod, monitor);
HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(new BufferedReader(new InputStreamReader(
inStream, getCharacterEncoding())), null);
+ String formName = null;
for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == Tag.INPUT
+ if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == Tag.FORM
+ && !((HtmlTag) (token.getValue())).isEndTag()) {
+ HtmlTag tag = (HtmlTag) token.getValue();
+ formName = tag.getAttribute("id"); //$NON-NLS-1$
+ } else if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == Tag.INPUT
&& !((HtmlTag) (token.getValue())).isEndTag()) {
HtmlTag tag = (HtmlTag) token.getValue();
// String name = tag.getAttribute("name");
@@ -1712,7 +1717,8 @@ public class BugzillaClient {
if (type != null && type.equalsIgnoreCase("checkbox") && id != null && id.startsWith("bit-")) { //$NON-NLS-1$ //$NON-NLS-2$
htmlInfo.getGroups().put(id, checkedValue);
} else if (name != null && name.equalsIgnoreCase(BugzillaAttribute.TOKEN.getKey())
- && value != null && value.length() > 0) {
+ && value != null && value.length() > 0 && formName != null
+ && formName.equals("changeform")) { //$NON-NLS-1$
htmlInfo.setToken(value);
}
}

Back to the top