diff options
author | mkersten | 2007-03-31 05:28:22 +0000 |
---|---|---|
committer | mkersten | 2007-03-31 05:28:22 +0000 |
commit | ccf58ab0c448c4f90cd4cc1d4fc4a516aad4a99d (patch) | |
tree | d5b41b49a257a1aa1f8f066d82add0da5554b5d8 | |
parent | f34d45f2caff045ff2287b58dab49f52fd9c17f6 (diff) | |
download | org.eclipse.mylyn.tasks-ccf58ab0c448c4f90cd4cc1d4fc4a516aad4a99d.tar.gz org.eclipse.mylyn.tasks-ccf58ab0c448c4f90cd4cc1d4fc4a516aad4a99d.tar.xz org.eclipse.mylyn.tasks-ccf58ab0c448c4f90cd4cc1d4fc4a516aad4a99d.zip |
Version update
9 files changed, 53 insertions, 26 deletions
diff --git a/org.eclipse.mylyn-feature/feature.xml b/org.eclipse.mylyn-feature/feature.xml index 7c4051745..7dc29e379 100644 --- a/org.eclipse.mylyn-feature/feature.xml +++ b/org.eclipse.mylyn-feature/feature.xml @@ -231,6 +231,8 @@ litigation. <import plugin="org.eclipse.ui.ide"/> <import plugin="org.eclipse.search"/> <import feature="org.eclipse.platform" version="3.2.0" match="equivalent"/> + <import plugin="org.eclipse.swt"/> + <import plugin="org.eclipse.jface"/> </requires> <plugin 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 55bd68e14..a781d0827 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 @@ -453,7 +453,8 @@ public class BugzillaClient { if (responseTypeHeader.getValue().toLowerCase(Locale.ENGLISH).contains(type)) { RepositoryQueryResultsFactory queryFactory = new RepositoryQueryResultsFactory(method .getResponseBodyAsStream(), characterEncoding); - queryFactory.performQuery(taskList, repositoryUrl.toString(), collector, QueryHitCollector.MAX_HITS); + queryFactory.performQuery(taskList, repositoryUrl.toString(), collector, + QueryHitCollector.MAX_HITS); return; } } @@ -470,7 +471,8 @@ public class BugzillaClient { public static void setupExistingBugAttributes(String serverUrl, RepositoryTaskData existingReport) { // ordered list of elements as they appear in UI // and additional elements that may not appear in the incoming xml - // stream but need to be present for bug submission + // stream but need to be present for bug submission / not always dirty + // state handling BugzillaReportElement[] reportElements = { BugzillaReportElement.SHORT_DESC, BugzillaReportElement.BUG_STATUS, BugzillaReportElement.RESOLUTION, BugzillaReportElement.BUG_ID, BugzillaReportElement.REP_PLATFORM, BugzillaReportElement.PRODUCT, BugzillaReportElement.OP_SYS, BugzillaReportElement.COMPONENT, @@ -478,7 +480,8 @@ public class BugzillaClient { BugzillaReportElement.ASSIGNED_TO, BugzillaReportElement.TARGET_MILESTONE, BugzillaReportElement.REPORTER, BugzillaReportElement.DEPENDSON, BugzillaReportElement.BLOCKED, BugzillaReportElement.BUG_FILE_LOC, BugzillaReportElement.NEWCC, BugzillaReportElement.KEYWORDS, - BugzillaReportElement.CC, BugzillaReportElement.NEW_COMMENT, BugzillaReportElement.QA_CONTACT }; + BugzillaReportElement.CC, BugzillaReportElement.NEW_COMMENT, BugzillaReportElement.QA_CONTACT, + BugzillaReportElement.STATUS_WHITEBOARD, BugzillaReportElement.DEADLINE }; for (BugzillaReportElement element : reportElements) { RepositoryTaskAttribute reportAttribute = BugzillaClient.makeNewAttribute(element); @@ -994,7 +997,7 @@ public class BugzillaClient { try { // TODO: Handle too long of url (IBugzillaConstants.MAX_URL_LENGTH) - + String requestUrl = repositoryUrl + IBugzillaConstants.URL_GET_SHOW_BUG_XML_NOID; HashMap<String, RepositoryTaskData> taskDataMap = new HashMap<String, RepositoryTaskData>(); diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.java index b1862042a..54bba3d3b 100644 --- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.java +++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.java @@ -20,6 +20,7 @@ package org.eclipse.mylar.internal.bugzilla.core; public enum BugzillaReportElement { // Format: ENUM ( "pretty name", "xml key", <hidden: true/false>, <readonly: true/false>) // Hidden elements are not automatically displayed in ui + STATUS_WHITEBOARD ("Status Whiteboard:", "status_whiteboard", true, false), ACTUAL_TIME ("Hours Worked:", "actual_time", true), ADD_COMMENT ("Additional Comments:", "comment", true, false), ASSIGNED_TO ("Assigned to:", "assigned_to", true, true), diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java index f70d3fa88..709e6c499 100644 --- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java +++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java @@ -53,7 +53,7 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector { private static final String CHANGED_BUGS_CGI_QUERY = "/buglist.cgi?query_format=advanced&chfieldfrom="; - private static final String CLIENT_LABEL = "Bugzilla (supports uncustomized 2.18-2.22)"; + private static final String CLIENT_LABEL = "Bugzilla (supports uncustomized 2.18-3.0)"; private BugzillaAttachmentHandler attachmentHandler; diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java index 3e17f9cc7..c35a83b76 100644 --- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java +++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java @@ -19,7 +19,6 @@ import java.util.List; import org.eclipse.mylar.core.MylarStatusHandler; import org.eclipse.mylar.tasks.core.AbstractRepositoryTask; -import org.eclipse.mylar.tasks.core.RepositoryTaskData; import org.eclipse.mylar.tasks.core.TaskComment; /** @@ -27,9 +26,9 @@ import org.eclipse.mylar.tasks.core.TaskComment; */ public class BugzillaTask extends AbstractRepositoryTask { - private static final String COMMENT_FORMAT = "yyyy-MM-dd HH:mm"; + private static final String DEADLINE_FORMAT = "yyyy-MM-dd"; - private static SimpleDateFormat comment_creation_ts_format = new SimpleDateFormat(COMMENT_FORMAT); + private static final String COMMENT_FORMAT = "yyyy-MM-dd HH:mm"; public BugzillaTask(String repositoryUrl, String id, String label, boolean newTask) { super(repositoryUrl, id, label, newTask); @@ -64,14 +63,8 @@ public class BugzillaTask extends AbstractRepositoryTask { return super.getSummary(); } else { if (isSynchronizing()) { - // return - // AbstractRepositoryTask.getTaskId(getHandleIdentifier()) + ": - // <synchronizing>"; return "<synchronizing>"; } else { - // return - // AbstractRepositoryTask.getTaskId(getHandleIdentifier()) + ": - // "; return ""; } } @@ -107,20 +100,15 @@ public class BugzillaTask extends AbstractRepositoryTask { try { if (taskData != null) { if (isCompleted()) { - // if (taskData.isResolved()) { List<TaskComment> taskComments = taskData.getComments(); if (taskComments != null && !taskComments.isEmpty()) { // TODO: fix not to be based on comment - return comment_creation_ts_format.parse(taskComments.get(taskComments.size() - 1).getCreated()); - // return - // offlineHandler.getDateForAttributeType(RepositoryTaskAttribute.COMMENT_DATE, - // (taskComments.get(taskComments.size() - - // 1).getCreated())); + return new SimpleDateFormat(COMMENT_FORMAT).parse(taskComments.get(taskComments.size() - 1) + .getCreated()); } } } } catch (Exception e) { - // MylarStatusHandler.log(e, "BugzillaTask.getCompletionDate()"); return null; } return super.getCompletionDate(); @@ -149,8 +137,23 @@ public class BugzillaTask extends AbstractRepositoryTask { } } - public RepositoryTaskData getOldTaskData() { - // ignore - return null; + @Override + public Date getDueDate() { + + if (taskData != null && taskData.getAttribute(BugzillaReportElement.ESTIMATED_TIME.getKeyString()) != null) { + // HACK: if estimated_time field exists, time tracking is enabled + try { + String dueStr = taskData.getAttributeValue(BugzillaReportElement.DEADLINE.getKeyString()); + if (dueStr != null) { + return new SimpleDateFormat(DEADLINE_FORMAT).parse(dueStr); + } + } catch (Exception e) { + return null; + } + return null; + } else { + return super.getDueDate(); + } + } } diff --git a/org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF b/org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF index 457ff0663..67375372a 100644 --- a/org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF +++ b/org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Mylar Bugzilla Client Ui Plug-in Bundle-SymbolicName: org.eclipse.mylar.bugzilla.ui; singleton:=true -Bundle-Version: 2.0.0.v20070330-0800 +Bundle-Version: 2.0.0.v20070330-2000 Bundle-Activator: org.eclipse.mylar.internal.bugzilla.ui.BugzillaUiPlugin Bundle-Vendor: Eclipse.org Require-Bundle: org.eclipse.ui, diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java index 5d3713d9d..40d07ee3f 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java @@ -212,6 +212,18 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor { Text urlField = createTextField(composite, attribute, SWT.FLAT); GridDataFactory.fillDefaults().hint(135, SWT.DEFAULT).applyTo(urlField); } + + attribute = this.taskData.getAttribute(BugzillaReportElement.STATUS_WHITEBOARD.getKeyString()); + if(attribute == null){ + this.taskData.setAttributeValue(BugzillaReportElement.STATUS_WHITEBOARD.getKeyString(), ""); + attribute = this.taskData.getAttribute(BugzillaReportElement.STATUS_WHITEBOARD.getKeyString()); + } + if (attribute != null && !attribute.isReadOnly()) { + Label label = createLabel(composite, attribute); + GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label); + Text whiteboardField = createTextField(composite, attribute, SWT.FLAT); + GridDataFactory.fillDefaults().hint(135, SWT.DEFAULT).applyTo(whiteboardField); + } addVoting(composite); @@ -235,7 +247,8 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor { BugzillaReportElement.CCLIST_ACCESSIBLE.getKeyString(), BugzillaReportElement.ESTIMATED_TIME.getKeyString(), BugzillaReportElement.REMAINING_TIME.getKeyString(), BugzillaReportElement.ACTUAL_TIME.getKeyString(), - BugzillaReportElement.DEADLINE.getKeyString() }; + BugzillaReportElement.DEADLINE.getKeyString(), + BugzillaReportElement.STATUS_WHITEBOARD.getKeyString()}; for (String key : customAttributeKeys) { RepositoryTaskAttribute attribute = taskData.getAttribute(key); if (hasChanged(attribute)) { diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTest.java index b3faa2838..8162764dc 100644 --- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTest.java +++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTest.java @@ -95,6 +95,7 @@ public class TaskActivityTest extends TestCase { assertEquals(2, testContainer.getDateRangeDelegates().size()); testContainer .addTask(new DateRangeActivityDelegate(testContainer, task2, currentTaskStart, currentTaskEnd, 10)); + assertEquals(30, testContainer.getTotalElapsed()); // assertEquals(3 * (currentEndMili - currentStartMili), // testContainer.getTotalElapsed()); diff --git a/org.eclipse.mylyn.trac-feature/feature.xml b/org.eclipse.mylyn.trac-feature/feature.xml index ef52e7071..90a811a30 100644 --- a/org.eclipse.mylyn.trac-feature/feature.xml +++ b/org.eclipse.mylyn.trac-feature/feature.xml @@ -228,6 +228,10 @@ litigation. <import plugin="org.eclipse.mylar" version="2.0.0.v20070216" match="greaterOrEqual"/> <import plugin="org.eclipse.mylar.monitor.core"/> <import feature="org.eclipse.mylar_feature" version="2.0.0.v20070330-2000" match="greaterOrEqual"/> + <import plugin="org.eclipse.ui.editors"/> + <import plugin="org.eclipse.jface.text"/> + <import plugin="org.eclipse.core.resources"/> + <import plugin="org.eclipse.ui.workbench.texteditor"/> </requires> <plugin |