Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2011-02-10 20:45:28 +0000
committerfbecker2011-02-10 20:45:28 +0000
commit5236bde3a4db4a3f87181482260d3bca94d2e3fa (patch)
tree4f2b0d96979cef256c18c4613fcbf80116343b43 /org.eclipse.mylyn.bugzilla.core
parent3cc71dc5de45bf5f9b17e05ed54279740c9adb0a (diff)
downloadorg.eclipse.mylyn.tasks-5236bde3a4db4a3f87181482260d3bca94d2e3fa.tar.gz
org.eclipse.mylyn.tasks-5236bde3a4db4a3f87181482260d3bca94d2e3fa.tar.xz
org.eclipse.mylyn.tasks-5236bde3a4db4a3f87181482260d3bca94d2e3fa.zip
NEW - bug 335278: enhance search result handler to handle additional attributes
https://bugs.eclipse.org/bugs/show_bug.cgi?id=335278
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.core')
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java
index 4e1d43f67..2cc7b0dcd 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java
@@ -61,7 +61,18 @@ public class SaxBugzillaQueryContentHandler extends DefaultHandler {
String parsedText = characters.toString();
BugzillaAttribute tag = BugzillaAttribute.UNKNOWN;
try {
- tag = BugzillaAttribute.valueOf(localName.trim().toUpperCase(Locale.ENGLISH));
+ String tagName = localName.trim().toUpperCase(Locale.ENGLISH);
+ try {
+ tag = BugzillaAttribute.valueOf(tagName);
+ } catch (IllegalArgumentException e) {
+ if (tagName.equals("ASSIGNED_TO_REALNAME")) { //$NON-NLS-1$
+ tag = BugzillaAttribute.ASSIGNED_TO_NAME;
+ } else if (tagName.equals("REPORTER_REALNAME")) { //$NON-NLS-1$
+ tag = BugzillaAttribute.REPORTER_NAME;
+ } else {
+ throw e;
+ }
+ }
switch (tag) {
case QUERY_TIMESTAMP:
if (collector instanceof BugzillaTaskDataCollector) {

Back to the top