|
Lines 38-47
Link Here
|
| 38 |
import org.eclipse.mylyn.internal.tasks.ui.util.AttachmentUtil; |
38 |
import org.eclipse.mylyn.internal.tasks.ui.util.AttachmentUtil; |
| 39 |
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal; |
39 |
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal; |
| 40 |
import org.eclipse.mylyn.tasks.core.ITask; |
40 |
import org.eclipse.mylyn.tasks.core.ITask; |
| 41 |
import org.eclipse.mylyn.tasks.core.RepositoryResponse; |
|
|
| 42 |
import org.eclipse.mylyn.tasks.core.TaskMapping; |
| 43 |
import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState; |
41 |
import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState; |
|
|
42 |
import org.eclipse.mylyn.tasks.core.RepositoryResponse; |
| 44 |
import org.eclipse.mylyn.tasks.core.RepositoryResponse.ResponseKind; |
43 |
import org.eclipse.mylyn.tasks.core.RepositoryResponse.ResponseKind; |
|
|
44 |
import org.eclipse.mylyn.tasks.core.TaskMapping; |
| 45 |
import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy; |
45 |
import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy; |
| 46 |
import org.eclipse.mylyn.tasks.core.data.TaskAttribute; |
46 |
import org.eclipse.mylyn.tasks.core.data.TaskAttribute; |
| 47 |
import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper; |
47 |
import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper; |
|
Lines 344-351
Link Here
|
| 344 |
// } |
344 |
// } |
| 345 |
// |
345 |
// |
| 346 |
public void testStdWorkflow32() throws Exception { |
346 |
public void testStdWorkflow32() throws Exception { |
| 347 |
// init32(); |
347 |
if (BugzillaFixture.current() != BugzillaFixture.BUGS_3_6_CUSTOM) { |
| 348 |
doStdWorkflow("3"); |
348 |
doStdWorkflow("3"); |
|
|
349 |
} |
| 349 |
} |
350 |
} |
| 350 |
|
351 |
|
| 351 |
private void doStdWorkflow(String DupBugID) throws Exception { |
352 |
private void doStdWorkflow(String DupBugID) throws Exception { |
|
Lines 776-783
Link Here
|
| 776 |
taskData.getRoot().getAttribute(BugzillaAttribute.DEADLINE.getKey()).setValue("" + deadline); |
777 |
taskData.getRoot().getAttribute(BugzillaAttribute.DEADLINE.getKey()).setValue("" + deadline); |
| 777 |
} |
778 |
} |
| 778 |
|
779 |
|
| 779 |
taskData.getRoot().getAttribute(BugzillaAttribute.NEW_COMMENT.getKey()).setValue( |
780 |
taskData.getRoot() |
| 780 |
"New Estimate: " + estimatedTime + "\nNew Remaining: " + remainingTime + "\nAdd: " + addTime); |
781 |
.getAttribute(BugzillaAttribute.NEW_COMMENT.getKey()) |
|
|
782 |
.setValue("New Estimate: " + estimatedTime + "\nNew Remaining: " + remainingTime + "\nAdd: " + addTime); |
| 781 |
Set<TaskAttribute> changed = new HashSet<TaskAttribute>(); |
783 |
Set<TaskAttribute> changed = new HashSet<TaskAttribute>(); |
| 782 |
changed.add(taskData.getRoot().getAttribute(BugzillaAttribute.ESTIMATED_TIME.getKey())); |
784 |
changed.add(taskData.getRoot().getAttribute(BugzillaAttribute.ESTIMATED_TIME.getKey())); |
| 783 |
changed.add(taskData.getRoot().getAttribute(BugzillaAttribute.REMAINING_TIME.getKey())); |
785 |
changed.add(taskData.getRoot().getAttribute(BugzillaAttribute.REMAINING_TIME.getKey())); |
|
Lines 793-804
Link Here
|
| 793 |
model = createModel(task); |
795 |
model = createModel(task); |
| 794 |
taskData = model.getTaskData(); |
796 |
taskData = model.getTaskData(); |
| 795 |
|
797 |
|
| 796 |
assertEquals(estimatedTime, Float.parseFloat(taskData.getRoot().getAttribute( |
798 |
assertEquals(estimatedTime, |
| 797 |
BugzillaAttribute.ESTIMATED_TIME.getKey()).getValue())); |
799 |
Float.parseFloat(taskData.getRoot().getAttribute(BugzillaAttribute.ESTIMATED_TIME.getKey()).getValue())); |
| 798 |
assertEquals(remainingTime, Float.parseFloat(taskData.getRoot().getAttribute( |
800 |
assertEquals(remainingTime, |
| 799 |
BugzillaAttribute.REMAINING_TIME.getKey()).getValue())); |
801 |
Float.parseFloat(taskData.getRoot().getAttribute(BugzillaAttribute.REMAINING_TIME.getKey()).getValue())); |
| 800 |
assertEquals(actualTime + addTime, Float.parseFloat(taskData.getRoot().getAttribute( |
802 |
assertEquals(actualTime + addTime, |
| 801 |
BugzillaAttribute.ACTUAL_TIME.getKey()).getValue())); |
803 |
Float.parseFloat(taskData.getRoot().getAttribute(BugzillaAttribute.ACTUAL_TIME.getKey()).getValue())); |
| 802 |
if (enableDeadline) { |
804 |
if (enableDeadline) { |
| 803 |
assertEquals(deadline, taskData.getRoot().getAttribute(BugzillaAttribute.DEADLINE.getKey()).getValue()); |
805 |
assertEquals(deadline, taskData.getRoot().getAttribute(BugzillaAttribute.DEADLINE.getKey()).getValue()); |
| 804 |
} |
806 |
} |
|
Lines 892-901
Link Here
|
| 892 |
event.setTaskRepository(repository); |
894 |
event.setTaskRepository(repository); |
| 893 |
event.setFullSynchronization(true); |
895 |
event.setFullSynchronization(true); |
| 894 |
connector.preSynchronization(event, null); |
896 |
connector.preSynchronization(event, null); |
| 895 |
assertTrue("Expected " + task4.getTaskId() + ", got: " + event.getStaleTasks(), event.getStaleTasks().contains( |
897 |
assertTrue("Expected " + task4.getTaskId() + ", got: " + event.getStaleTasks(), |
| 896 |
task4)); |
898 |
event.getStaleTasks().contains(task4)); |
| 897 |
assertTrue("Expected " + task5.getTaskId() + ", got: " + event.getStaleTasks(), event.getStaleTasks().contains( |
899 |
assertTrue("Expected " + task5.getTaskId() + ", got: " + event.getStaleTasks(), |
| 898 |
task5)); |
900 |
event.getStaleTasks().contains(task5)); |
| 899 |
|
901 |
|
| 900 |
TasksUiInternal.synchronizeTasks(connector, tasks, true, null); |
902 |
TasksUiInternal.synchronizeTasks(connector, tasks, true, null); |
| 901 |
|
903 |
|