|
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 |
|