Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 198027 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java (-8 / +11 lines)
Lines 1799-1812 Link Here
1799
		peopleComposite.setLayout(layout);
1799
		peopleComposite.setLayout(layout);
1800
		GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(peopleComposite);
1800
		GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(peopleComposite);
1801
1801
1802
		RepositoryTaskAttribute assignedAttribute = taskData.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED);
1802
		addAssignedTo(peopleComposite);
1803
		if (assignedAttribute != null) {
1803
		
1804
			Label label = createLabel(peopleComposite, assignedAttribute);
1805
			GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
1806
			Text textField = createTextField(peopleComposite, assignedAttribute, SWT.FLAT | SWT.READ_ONLY);
1807
			GridDataFactory.fillDefaults().hint(150, SWT.DEFAULT).applyTo(textField);
1808
		}
1809
1810
		RepositoryTaskAttribute reporterAttribute = taskData.getAttribute(RepositoryTaskAttribute.USER_REPORTER);
1804
		RepositoryTaskAttribute reporterAttribute = taskData.getAttribute(RepositoryTaskAttribute.USER_REPORTER);
1811
		if (reporterAttribute != null) {
1805
		if (reporterAttribute != null) {
1812
1806
Lines 3482-3485 Link Here
3482
		controlBySelectableObject.remove(item);
3476
		controlBySelectableObject.remove(item);
3483
	}
3477
	}
3484
3478
3479
	protected void addAssignedTo(Composite peopleComposite) {
3480
		RepositoryTaskAttribute assignedAttribute = taskData.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED);
3481
		if (assignedAttribute != null) {
3482
			Label label = createLabel(peopleComposite, assignedAttribute);
3483
			GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
3484
			Text textField = createTextField(peopleComposite, assignedAttribute, SWT.FLAT | SWT.READ_ONLY);
3485
			GridDataFactory.fillDefaults().hint(150, SWT.DEFAULT).applyTo(textField);			
3486
		}
3487
	}
3485
}
3488
}
(-)src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java (-4 lines)
Lines 198-212 Link Here
198
			addOperation(bugReport, BUGZILLA_OPERATION.accept, userName);
198
			addOperation(bugReport, BUGZILLA_OPERATION.accept, userName);
199
			addOperation(bugReport, BUGZILLA_OPERATION.resolve, userName);
199
			addOperation(bugReport, BUGZILLA_OPERATION.resolve, userName);
200
			addOperation(bugReport, BUGZILLA_OPERATION.duplicate, userName);
200
			addOperation(bugReport, BUGZILLA_OPERATION.duplicate, userName);
201
			addOperation(bugReport, BUGZILLA_OPERATION.reassign, userName);
202
			addOperation(bugReport, BUGZILLA_OPERATION.reassignbycomponent, userName);
203
			break;
201
			break;
204
		case ASSIGNED:
202
		case ASSIGNED:
205
			addOperation(bugReport, BUGZILLA_OPERATION.none, userName);
203
			addOperation(bugReport, BUGZILLA_OPERATION.none, userName);
206
			addOperation(bugReport, BUGZILLA_OPERATION.resolve, userName);
204
			addOperation(bugReport, BUGZILLA_OPERATION.resolve, userName);
207
			addOperation(bugReport, BUGZILLA_OPERATION.duplicate, userName);
205
			addOperation(bugReport, BUGZILLA_OPERATION.duplicate, userName);
208
			addOperation(bugReport, BUGZILLA_OPERATION.reassign, userName);
209
			addOperation(bugReport, BUGZILLA_OPERATION.reassignbycomponent, userName);
210
			break;
206
			break;
211
		case RESOLVED:
207
		case RESOLVED:
212
			addOperation(bugReport, BUGZILLA_OPERATION.none, userName);
208
			addOperation(bugReport, BUGZILLA_OPERATION.none, userName);
(-)src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.java (-1 / +1 lines)
Lines 35-41 Link Here
35
			false), PRIORITY("Priority:", "priority", false, false), PRODUCT("Product:", "product", false), REP_PLATFORM(
35
			false), PRIORITY("Priority:", "priority", false, false), PRODUCT("Product:", "product", false), REP_PLATFORM(
36
			"Platform:", "rep_platform", false), REPORTER("Reporter:", "reporter", true, true), REPORTER_ACCESSIBLE(
36
			"Platform:", "rep_platform", false), REPORTER("Reporter:", "reporter", true, true), REPORTER_ACCESSIBLE(
37
			"Reporter", "reporter_accessible", true), RESOLUTION("Resolution:", "resolution", false, true), // Exiting bug field, new cc
37
			"Reporter", "reporter_accessible", true), RESOLUTION("Resolution:", "resolution", false, true), // Exiting bug field, new cc
38
	REMAINING_TIME("Hours Left:", "remaining_time", true), SHORT_DESC("Summary:", "short_desc", true), TARGET_MILESTONE(
38
	REMAINING_TIME("Hours Left:", "remaining_time", true), SET_DEFAULT_ASSIGNEE("Reassign to default assignee", "set_default_assignee", false), SHORT_DESC("Summary:", "short_desc", true), TARGET_MILESTONE(
39
			"Target milestone:", "target_milestone", false), THETEXT("thetext", "thetext", false, true), TYPE("type",
39
			"Target milestone:", "target_milestone", false), THETEXT("thetext", "thetext", false, true), TYPE("type",
40
			"type"), UNKNOWN("UNKNOWN", "UNKNOWN"), VERSION("Version:", "version", false), INSTALL_VERSION(
40
			"type"), UNKNOWN("UNKNOWN", "UNKNOWN"), VERSION("Version:", "version", false), INSTALL_VERSION(
41
			"version of bugzilla installed", "install_version", true), VOTES("Votes:", "votes", true, true), WORK_TIME(
41
			"version of bugzilla installed", "install_version", true), VOTES("Votes:", "votes", true, true), WORK_TIME(
(-)src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java (-1 / +1 lines)
Lines 886-892 Link Here
886
			} else if (a.getId().equals(BugzillaReportElement.CC.getKeyString())
886
			} else if (a.getId().equals(BugzillaReportElement.CC.getKeyString())
887
					|| a.getId().equals(RepositoryTaskAttribute.REMOVE_CC)
887
					|| a.getId().equals(RepositoryTaskAttribute.REMOVE_CC)
888
					|| a.getId().equals(BugzillaReportElement.REPORTER.getKeyString())
888
					|| a.getId().equals(BugzillaReportElement.REPORTER.getKeyString())
889
					|| a.getId().equals(BugzillaReportElement.ASSIGNED_TO.getKeyString())
889
//					|| a.getId().equals(BugzillaReportElement.ASSIGNED_TO.getKeyString())
890
					|| a.getId().equals(BugzillaReportElement.CREATION_TS.getKeyString())) {
890
					|| a.getId().equals(BugzillaReportElement.CREATION_TS.getKeyString())) {
891
				continue;
891
				continue;
892
			} else if (a.getId() != null && a.getId().compareTo("") != 0) {
892
			} else if (a.getId() != null && a.getId().compareTo("") != 0) {
(-)src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java (+45 lines)
Lines 16-21 Link Here
16
import java.util.List;
16
import java.util.List;
17
import java.util.Set;
17
import java.util.Set;
18
18
19
import org.eclipse.core.runtime.CoreException;
19
import org.eclipse.jface.dialogs.Dialog;
20
import org.eclipse.jface.dialogs.Dialog;
20
import org.eclipse.jface.dialogs.MessageDialog;
21
import org.eclipse.jface.dialogs.MessageDialog;
21
import org.eclipse.jface.layout.GridDataFactory;
22
import org.eclipse.jface.layout.GridDataFactory;
Lines 88-93 Link Here
88
89
89
	protected Text votesText;
90
	protected Text votesText;
90
91
92
	protected Text assignedTo;
93
91
	/**
94
	/**
92
	 * Creates a new <code>ExistingBugEditor</code>.
95
	 * Creates a new <code>ExistingBugEditor</code>.
93
	 */
96
	 */
Lines 634-637 Link Here
634
		}
637
		}
635
		return bugzillaDuplicateDetectors;
638
		return bugzillaDuplicateDetectors;
636
	}
639
	}
640
641
	@Override
642
	protected void addAssignedTo(Composite peopleComposite) {
643
		RepositoryTaskAttribute assignedAttribute = taskData.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED);
644
		if (assignedAttribute != null) {
645
			String bugzillaVersion;
646
			try {
647
				bugzillaVersion = BugzillaCorePlugin.getRepositoryConfiguration(repository, false).getInstallVersion();
648
			} catch (CoreException e1) {
649
				// ignore
650
				bugzillaVersion = "2.18";
651
			}
652
			if (bugzillaVersion.compareTo("3.1")<0) {
653
				// old bugzilla workflow is used
654
				super.addAssignedTo(peopleComposite);
655
				return;
656
			}
657
			Label label = createLabel(peopleComposite, assignedAttribute);
658
			GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
659
			assignedTo = createTextField(peopleComposite, assignedAttribute, SWT.FLAT);
660
			GridDataFactory.fillDefaults().hint(150, SWT.DEFAULT).applyTo(assignedTo);
661
			assignedTo.addModifyListener(new ModifyListener() {
662
				public void modifyText(ModifyEvent e) {
663
					String sel = assignedTo.getText();
664
					RepositoryTaskAttribute a = taskData.getAttribute(RepositoryTaskAttribute.USER_ASSIGNED);
665
					if (!(a.getValue().equals(sel))) {
666
						a.setValue(sel);
667
						markDirty(true);
668
					}
669
				}
670
			});
671
			FormToolkit toolkit = getManagedForm().getToolkit();
672
			Label dummylabel = toolkit.createLabel(peopleComposite, "");
673
			GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(dummylabel);
674
			RepositoryTaskAttribute attribute = taskData.getAttribute(BugzillaReportElement.SET_DEFAULT_ASSIGNEE.getKeyString());
675
			if (attribute == null) {
676
				taskData.setAttributeValue(BugzillaReportElement.SET_DEFAULT_ASSIGNEE.getKeyString(), "0");
677
				attribute = taskData.getAttribute(BugzillaReportElement.SET_DEFAULT_ASSIGNEE.getKeyString());
678
			}
679
			addButtonField(peopleComposite, attribute, SWT.CHECK);
680
		}
681
	}
637
}
682
}

Return to bug 198027