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 324007
Collapse All | Expand All

(-)src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaUtil.java (-11 / +14 lines)
Lines 41-60 Link Here
41
		} else {
41
		} else {
42
			attribute.addValue(parsedText);
42
			attribute.addValue(parsedText);
43
		}
43
		}
44
		String useParam = repositoryTaskData.getAttributeMapper().getTaskRepository().getProperty(propertyName);
44
		if (BugzillaAttribute.QA_CONTACT.equals(tag)) {
45
		if (defaultWhenNull) {
45
			attribute.getMetaData().setKind(null);
46
			if (useParam == null || (useParam != null && useParam.equals("true"))) { //$NON-NLS-1$
47
				attribute.getMetaData().setKind(TaskAttribute.KIND_DEFAULT);
48
			} else {
49
				attribute.getMetaData().setKind(null);
50
			}
51
		} else {
46
		} else {
52
			if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$
47
			String useParam = repositoryTaskData.getAttributeMapper().getTaskRepository().getProperty(propertyName);
53
				attribute.getMetaData().setKind(TaskAttribute.KIND_DEFAULT);
48
			if (defaultWhenNull) {
49
				if (useParam == null || (useParam != null && useParam.equals("true"))) { //$NON-NLS-1$
50
					attribute.getMetaData().setKind(TaskAttribute.KIND_DEFAULT);
51
				} else {
52
					attribute.getMetaData().setKind(null);
53
				}
54
			} else {
54
			} else {
55
				attribute.getMetaData().setKind(null);
55
				if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$
56
					attribute.getMetaData().setKind(TaskAttribute.KIND_DEFAULT);
57
				} else {
58
					attribute.getMetaData().setKind(null);
59
				}
56
			}
60
			}
57
		}
61
		}
58
59
	}
62
	}
60
}
63
}
(-)src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPeoplePart.java (-8 / +18 lines)
Lines 14-19 Link Here
14
import org.eclipse.jface.layout.GridDataFactory;
14
import org.eclipse.jface.layout.GridDataFactory;
15
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
15
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute;
16
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTaskDataHandler;
16
import org.eclipse.mylyn.internal.bugzilla.core.BugzillaTaskDataHandler;
17
import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
17
import org.eclipse.mylyn.tasks.core.TaskRepository;
18
import org.eclipse.mylyn.tasks.core.TaskRepository;
18
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
19
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
19
import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
20
import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor;
Lines 40-52 Link Here
40
		AbstractAttributeEditor editor = createAttributeEditor(attribute);
41
		AbstractAttributeEditor editor = createAttributeEditor(attribute);
41
		if (editor != null) {
42
		if (editor != null) {
42
			editor.createLabelControl(composite, toolkit);
43
			editor.createLabelControl(composite, toolkit);
43
			GridDataFactory.defaultsFor(editor.getLabelControl()).indent(COLUMN_MARGIN, 0).applyTo(
44
			GridDataFactory.defaultsFor(editor.getLabelControl())
44
					editor.getLabelControl());
45
					.indent(COLUMN_MARGIN, 0)
46
					.applyTo(editor.getLabelControl());
45
			editor.createControl(composite, toolkit);
47
			editor.createControl(composite, toolkit);
46
			getTaskEditorPage().getAttributeEditorToolkit().adapt(editor);
48
			getTaskEditorPage().getAttributeEditorToolkit().adapt(editor);
47
			if (attribute.getId().equals(BugzillaAttribute.CC.getKey())) {
49
			if (attribute.getId().equals(BugzillaAttribute.CC.getKey())) {
48
				GridDataFactory.fillDefaults().grab(true, true).align(SWT.FILL, SWT.FILL).hint(130, 95).applyTo(
50
				GridDataFactory.fillDefaults()
49
						editor.getControl());
51
						.grab(true, true)
52
						.align(SWT.FILL, SWT.FILL)
53
						.hint(130, 95)
54
						.applyTo(editor.getControl());
50
			} else {
55
			} else {
51
				GridDataFactory.fillDefaults()
56
				GridDataFactory.fillDefaults()
52
						.grab(true, false)
57
						.grab(true, false)
Lines 71-80 Link Here
71
			addAttribute(peopleComposite, toolkit, assignee);
76
			addAttribute(peopleComposite, toolkit, assignee);
72
		}
77
		}
73
		addAttribute(peopleComposite, toolkit, getTaskData().getRoot().getMappedAttribute(TaskAttribute.USER_REPORTER));
78
		addAttribute(peopleComposite, toolkit, getTaskData().getRoot().getMappedAttribute(TaskAttribute.USER_REPORTER));
74
		addAttribute(peopleComposite, toolkit, getTaskData().getRoot().getMappedAttribute(
79
		String useParam = getTaskData().getAttributeMapper()
75
				BugzillaAttribute.QA_CONTACT.getKey()));
80
				.getTaskRepository()
76
		addAttribute(peopleComposite, toolkit, getTaskData().getRoot().getMappedAttribute(
81
				.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT);
77
				BugzillaAttribute.NEWCC.getKey()));
82
		if (useParam == null || (useParam != null && useParam.equals("true"))) { //$NON-NLS-1$
83
			addAttribute(peopleComposite, toolkit,
84
					getTaskData().getRoot().getMappedAttribute(BugzillaAttribute.QA_CONTACT.getKey()));
85
		}
86
		addAttribute(peopleComposite, toolkit,
87
				getTaskData().getRoot().getMappedAttribute(BugzillaAttribute.NEWCC.getKey()));
78
		addSelfToCC(peopleComposite);
88
		addSelfToCC(peopleComposite);
79
		TaskAttribute cc = getTaskData().getRoot().getMappedAttribute(BugzillaAttribute.CC.getKey());
89
		TaskAttribute cc = getTaskData().getRoot().getMappedAttribute(BugzillaAttribute.CC.getKey());
80
		if (cc != null) {
90
		if (cc != null) {

Return to bug 324007