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

(-)src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java (-1 / +32 lines)
Lines 73-78 Link Here
73
 * @author Jeff Pound (Attachment work)
73
 * @author Jeff Pound (Attachment work)
74
 */
74
 */
75
public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor {
75
public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor {
76
	
77
	private Button defaultAssignee;
76
78
77
	private static final String LABEL_TIME_TRACKING = "Bugzilla Time Tracking";
79
	private static final String LABEL_TIME_TRACKING = "Bugzilla Time Tracking";
78
80
Lines 651-657 Link Here
651
				taskData.setAttributeValue(BugzillaReportElement.SET_DEFAULT_ASSIGNEE.getKeyString(), "0");
653
				taskData.setAttributeValue(BugzillaReportElement.SET_DEFAULT_ASSIGNEE.getKeyString(), "0");
652
				attribute = taskData.getAttribute(BugzillaReportElement.SET_DEFAULT_ASSIGNEE.getKeyString());
654
				attribute = taskData.getAttribute(BugzillaReportElement.SET_DEFAULT_ASSIGNEE.getKeyString());
653
			}
655
			}
654
			addButtonField(peopleComposite, attribute, SWT.CHECK);
656
			defaultAssignee = addButtonField(peopleComposite, attribute, SWT.CHECK);
655
		}
657
		}
656
	}
658
	}
657
659
Lines 666-671 Link Here
666
				attribute.setValue(BugzillaUiPlugin.formatTextToLineWrap(attribute.getValue(), true));
668
				attribute.setValue(BugzillaUiPlugin.formatTextToLineWrap(attribute.getValue(), true));
667
			}
669
			}
668
		}
670
		}
671
672
		if (attribute.getId().equals(BugzillaReportElement.PRODUCT.getKeyString()) || attribute.getId().equals(BugzillaReportElement.COMPONENT.getKeyString())) {
673
			String bugzillaVersion;
674
			try {
675
				bugzillaVersion = BugzillaCorePlugin.getRepositoryConfiguration(repository, false).getInstallVersion();
676
			} catch (CoreException e1) {
677
				// ignore
678
				bugzillaVersion = "2.18";
679
			}
680
			if (bugzillaVersion.compareTo("3.1") < 0) {
681
				for (int i = 0; i < radios.length; i++) {
682
					RepositoryOperation o = taskData.getOperation(radios[i].getText());
683
					if (o.getKnobName().equals(BUGZILLA_OPERATION.reassignbycomponent.toString())) {
684
						radios[i].setSelection(true); 
685
						taskData.setSelectedOperation(o);
686
						markDirty(true);
687
					} else {
688
						radios[i].setSelection(false);
689
					}
690
				}
691
			} else {
692
				RepositoryTaskAttribute defaultAssignee_attribute = taskData.getAttribute(BugzillaReportElement.SET_DEFAULT_ASSIGNEE.getKeyString());
693
				if (defaultAssignee_attribute != null) {
694
					taskData.setAttributeValue(BugzillaReportElement.SET_DEFAULT_ASSIGNEE.getKeyString(), "1");
695
					defaultAssignee.setSelection(true);
696
					super.attributeChanged(defaultAssignee_attribute);
697
				}
698
			}
699
		}
669
		return super.attributeChanged(attribute);
700
		return super.attributeChanged(attribute);
670
	}
701
	}
671
702
(-)src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java (-3 / +5 lines)
Lines 1071-1078 Link Here
1071
					public void widgetSelected(SelectionEvent event) {
1071
					public void widgetSelected(SelectionEvent event) {
1072
						if (attributeCombo.getSelectionIndex() > -1) {
1072
						if (attributeCombo.getSelectionIndex() > -1) {
1073
							String sel = attributeCombo.getItem(attributeCombo.getSelectionIndex());
1073
							String sel = attributeCombo.getItem(attributeCombo.getSelectionIndex());
1074
							attribute.setValue(sel);
1074
							if (!attribute.getValue().equals(sel)) {
1075
							attributeChanged(attribute);
1075
								attribute.setValue(sel);
1076
								attributeChanged(attribute);
1077
							}
1076
							attributeCombo.clearSelection();
1078
							attributeCombo.clearSelection();
1077
						}
1079
						}
1078
					}
1080
					}
Lines 3149-3155 Link Here
3149
		return outlinePage;
3151
		return outlinePage;
3150
	}
3152
	}
3151
3153
3152
	private Button[] radios;
3154
	protected Button[] radios;
3153
3155
3154
	private Control[] radioOptions;
3156
	private Control[] radioOptions;
3155
3157

Return to bug 219911