Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2009-12-02 19:57:30 -0500
committerspingel2009-12-02 19:57:30 -0500
commit029e5ba9b22cfbee65bf727ef32922113b3211d8 (patch)
tree5bf04649240c65802959cb1f93693dace7fc8c63
parentd62a1663d02e030f0fd40a15545b50220fe6105e (diff)
downloadorg.eclipse.mylyn.tasks-029e5ba9b22cfbee65bf727ef32922113b3211d8.tar.gz
org.eclipse.mylyn.tasks-029e5ba9b22cfbee65bf727ef32922113b3211d8.tar.xz
org.eclipse.mylyn.tasks-029e5ba9b22cfbee65bf727ef32922113b3211d8.zip
RESOLVED - bug 296760: prepend bug prefix to text that is generated by copy details
https://bugs.eclipse.org/bugs/show_bug.cgi?id=296760
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CopyDetailsActionTest.java3
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTask.java10
2 files changed, 10 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CopyDetailsActionTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CopyDetailsActionTest.java
index 02dfc6ebb..347abe12e 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CopyDetailsActionTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CopyDetailsActionTest.java
@@ -29,9 +29,10 @@ public class CopyDetailsActionTest extends TestCase {
MockTask task = new MockTask("123");
task.setSummary("abc");
+ task.setTaskKey("123");
connector.setTaskIdPrefix("task");
String text = CopyTaskDetailsAction.getTextForTask(task);
- assertEquals("task 123: abc", text.substring(0, 13));
+ assertEquals("task 123: abc", text);
connector.setTaskIdPrefix("#");
assertEquals("#123: abc", CopyTaskDetailsAction.getTextForTask(task));
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTask.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTask.java
index b511a3e89..fbedfa595 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTask.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTask.java
@@ -21,15 +21,16 @@ public class MockTask extends AbstractTask {
private String ownerId;
public MockTask(String taskId) {
- super(MockRepositoryConnector.REPOSITORY_URL, taskId, taskId);
+ this(MockRepositoryConnector.REPOSITORY_URL, taskId, taskId);
}
public MockTask(String repositoryUrl, String taskId) {
- super(repositoryUrl, taskId, taskId);
+ this(repositoryUrl, taskId, taskId);
}
public MockTask(String repositoryUrl, String taskId, String summary) {
super(repositoryUrl, taskId, summary);
+ setTaskKey(taskId);
}
@Override
@@ -63,4 +64,9 @@ public class MockTask extends AbstractTask {
return false;
}
+ @Override
+ public String getTaskKey() {
+ return taskKey;
+ }
+
}

Back to the top