Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2012-02-25 11:46:23 +0000
committerSteffen Pingel2012-02-25 11:46:23 +0000
commit42f7b35ec92b3984b0491f8f135e0fc31a31bc14 (patch)
tree08649c8fffe92086c639bf0cff4146ac06701e1e
parent0327a83facb27aed3e74f2f1feccbd02392f4657 (diff)
downloadorg.eclipse.mylyn.tasks-42f7b35ec92b3984b0491f8f135e0fc31a31bc14.tar.gz
org.eclipse.mylyn.tasks-42f7b35ec92b3984b0491f8f135e0fc31a31bc14.tar.xz
org.eclipse.mylyn.tasks-42f7b35ec92b3984b0491f8f135e0fc31a31bc14.zip
REOPENED - bug 367861: fields marked as incoming on Eclipse.org that had
no changes https://bugs.eclipse.org/bugs/show_bug.cgi?id=367861 Change-Id: I01722015aed08c6fc5ded72d19a4ff93a34b1c50
-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