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/BugzillaAttributeFactory.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java24
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskComment.java2
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java2
4 files changed, 14 insertions, 16 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeFactory.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeFactory.java
index e2fbb0215..7906151b0 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeFactory.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeFactory.java
@@ -48,7 +48,7 @@ public class BugzillaAttributeFactory extends AbstractAttributeFactory {
return BugzillaReportElement.NEWCC.getKeyString();
} else if (key.equals(RepositoryTaskAttribute.COMMENT_DATE)) {
return BugzillaReportElement.BUG_WHEN.getKeyString();
- } else if (key.equals(RepositoryTaskAttribute.USER_OWNER)) {
+ } else if (key.equals(RepositoryTaskAttribute.COMMENT_AUTHOR)) { // was USER_OWNER
return BugzillaReportElement.WHO.getKeyString();
} else if (key.equals(RepositoryTaskAttribute.USER_CC)) {
return BugzillaReportElement.CC.getKeyString();
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 96311fad3..6eccd0b8c 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
@@ -45,13 +45,13 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
private RepositoryAttachment attachment;
private Map<String, RepositoryTaskData> taskDataMap;
-
+
private RepositoryTaskData repositoryTaskData;
private String errorMessage = null;
private AbstractAttributeFactory attributeFactory;
-
+
private int retrieved = 0;
public SaxMultiBugReportContentHandler(AbstractAttributeFactory factory, Map<String, RepositoryTaskData> taskDataMap) {
@@ -111,8 +111,8 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
attachment = new RepositoryAttachment(attributeFactory);
if (attributes != null) {
if ("1".equals(attributes.getValue(BugzillaReportElement.IS_OBSOLETE.getKeyString()))) {
- attachment.addAttribute(BugzillaReportElement.IS_OBSOLETE.getKeyString(), attributeFactory
- .createAttribute(BugzillaReportElement.IS_OBSOLETE.getKeyString()));
+ attachment.addAttribute(BugzillaReportElement.IS_OBSOLETE.getKeyString(),
+ attributeFactory.createAttribute(BugzillaReportElement.IS_OBSOLETE.getKeyString()));
attachment.setObsolete(true);
}
if ("1".equals(attributes.getValue(BugzillaReportElement.IS_PATCH.getKeyString()))) {
@@ -144,7 +144,7 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
try {
repositoryTaskData = taskDataMap.get(parsedText.trim());
if (repositoryTaskData == null) {
- errorMessage = parsedText+" id not found.";
+ errorMessage = parsedText + " id not found.";
}
} catch (Exception e) {
errorMessage = "Bug id from server did not match requested id.";
@@ -227,11 +227,9 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
case BUG:
// Reached end of bug. Need to set LONGDESCLENGTH to number of
// comments
- RepositoryTaskAttribute numCommentsAttribute = repositoryTaskData
- .getAttribute(BugzillaReportElement.LONGDESCLENGTH.getKeyString());
+ RepositoryTaskAttribute numCommentsAttribute = repositoryTaskData.getAttribute(BugzillaReportElement.LONGDESCLENGTH.getKeyString());
if (numCommentsAttribute == null) {
- numCommentsAttribute = attributeFactory.createAttribute(BugzillaReportElement.LONGDESCLENGTH
- .getKeyString());
+ numCommentsAttribute = attributeFactory.createAttribute(BugzillaReportElement.LONGDESCLENGTH.getKeyString());
numCommentsAttribute.setValue("" + repositoryTaskData.getComments().size());
repositoryTaskData.addAttribute(BugzillaReportElement.LONGDESCLENGTH.getKeyString(),
numCommentsAttribute);
@@ -243,11 +241,11 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
for (RepositoryAttachment attachment : repositoryTaskData.getAttachments()) {
TaskComment taskComment = attachIdToComment.get(attachment.getId());
if (taskComment != null) {
- attachment.setCreator(taskComment.getAuthor());
+ attachment.setCreator(taskComment.getAuthor());
}
- attachment.setAttributeValue(RepositoryTaskAttribute.ATTACHMENT_URL, repositoryTaskData
- .getRepositoryUrl()
- + IBugzillaConstants.URL_GET_ATTACHMENT_SUFFIX + attachment.getId());
+ attachment.setAttributeValue(RepositoryTaskAttribute.ATTACHMENT_URL,
+ repositoryTaskData.getRepositoryUrl() + IBugzillaConstants.URL_GET_ATTACHMENT_SUFFIX
+ + attachment.getId());
attachment.setRepositoryKind(repositoryTaskData.getRepositoryKind());
attachment.setRepositoryUrl(repositoryTaskData.getRepositoryUrl());
attachment.setTaskId(repositoryTaskData.getId());
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskComment.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskComment.java
index 85e3af3f9..a0334205a 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskComment.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskComment.java
@@ -58,7 +58,7 @@ public class TaskComment extends AttributeContainer implements Serializable {
* @return The comments author
*/
public String getAuthor() {
- return getAttributeValue(RepositoryTaskAttribute.USER_OWNER);
+ return getAttributeValue(RepositoryTaskAttribute.COMMENT_AUTHOR);
}
/**
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java
index 0c3ab3355..848f28761 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracTaskDataHandler.java
@@ -132,7 +132,7 @@ public class TracTaskDataHandler extends AbstractTaskDataHandler {
}
TaskComment taskComment = new TaskComment(factory, data.getComments().size() + 1);
- taskComment.setAttributeValue(RepositoryTaskAttribute.USER_OWNER, comments[i].getAuthor());
+ taskComment.setAttributeValue(RepositoryTaskAttribute.COMMENT_AUTHOR, comments[i].getAuthor());
taskComment
.setAttributeValue(RepositoryTaskAttribute.COMMENT_DATE, comments[i].getCreated().toString());
taskComment.setAttributeValue(RepositoryTaskAttribute.COMMENT_TEXT, comments[i].getNewValue());

Back to the top