Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java7
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaRepositoryConnectorStandaloneTest.java15
2 files changed, 22 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java
index aedf7d494..62956b958 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java
@@ -244,6 +244,13 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
}
String parsedText = characters.toString();
+ if (parsedText.equals("")) { //$NON-NLS-1$
+ // bug 367861: avoid showing incomings for fields that were previously not part of the schema when empty
+ if (localName.equals("resolution") || localName.equals("bug_file_loc") //$NON-NLS-1$ //$NON-NLS-2$
+ || localName.equals("status_whiteboard") || localName.equals("keywords")) { //$NON-NLS-1$ //$NON-NLS-2$
+ return;
+ }
+ }
if (localName.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
TaskAttribute endAttribute = repositoryTaskData.getRoot().getAttribute(localName);
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaRepositoryConnectorStandaloneTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaRepositoryConnectorStandaloneTest.java
index 5201c75b5..935314069 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaRepositoryConnectorStandaloneTest.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/core/BugzillaRepositoryConnectorStandaloneTest.java
@@ -497,4 +497,19 @@ public class BugzillaRepositoryConnectorStandaloneTest extends TestCase {
assertEquals(PriorityLevel.P3, mapping.getPriorityLevel());
}
}
+
+ public void testEmptyTags() throws Exception {
+ TaskData taskDataNew = BugzillaFixture.current().getTask("1", client);
+ List<String> list = taskDataNew.getRoot().getAttribute(BugzillaAttribute.RESOLUTION.getKey()).getValues();
+ assertEquals(0, list.size());
+ assertEquals("", taskDataNew.getRoot().getAttribute(BugzillaAttribute.RESOLUTION.getKey()).getValue());
+ assertEquals("", taskDataNew.getRoot().getAttribute(BugzillaAttribute.BUG_FILE_LOC.getKey()).getValue());
+ list = taskDataNew.getRoot().getAttribute(BugzillaAttribute.KEYWORDS.getKey()).getValues();
+ assertEquals(0, list.size());
+ assertEquals("", taskDataNew.getRoot().getAttribute(BugzillaAttribute.KEYWORDS.getKey()).getValue());
+ list = taskDataNew.getRoot().getAttribute(BugzillaAttribute.STATUS_WHITEBOARD.getKey()).getValues();
+ assertEquals(0, list.size());
+ assertEquals("", taskDataNew.getRoot().getAttribute(BugzillaAttribute.STATUS_WHITEBOARD.getKey()).getValue());
+ }
+
} \ No newline at end of file

Back to the top