diff options
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui')
3 files changed, 31 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java index 4d83153a8..0040bff01 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java @@ -212,6 +212,34 @@ public class BugzillaTaskEditorPage extends AbstractTaskEditorPage { return; } + TaskAttribute attributeOperation = getModel().getTaskData().getRoot().getMappedAttribute( + TaskAttribute.OPERATION); + if (attributeOperation != null) { + if ("duplicate".equals(attributeOperation.getValue())) { //$NON-NLS-1$ + TaskAttribute originalOperation = getModel().getTaskData().getRoot().getAttribute( + TaskAttribute.PREFIX_OPERATION + attributeOperation.getValue()); + String inputAttributeId = originalOperation.getMetaData().getValue( + TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID); + if (inputAttributeId != null && !inputAttributeId.equals("")) { //$NON-NLS-1$ + TaskAttribute inputAttribute = attributeOperation.getTaskData().getRoot().getAttribute( + inputAttributeId); + if (inputAttribute != null) { + String dupValue = inputAttribute.getValue(); + if (dupValue == null || dupValue.equals("")) { //$NON-NLS-1$ + getTaskEditor().setMessage( + Messages.BugzillaTaskEditorPage_Please_enter_a_bugid_for_duplicate_of_before_submitting, + IMessageProvider.ERROR); + AbstractTaskEditorPart part = getPart(ID_PART_ACTIONS); + if (part != null) { + part.setFocus(); + } + return; + } + } + } + } + } + if (getModel().getTaskData().isNew()) { TaskAttribute productAttribute = getModel().getTaskData().getRoot().getMappedAttribute( TaskAttribute.PRODUCT); diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/Messages.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/Messages.java index ce0552166..d7b1bbfd8 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/Messages.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/Messages.java @@ -49,6 +49,8 @@ public class Messages extends NLS { public static String BugzillaTaskEditorPage_Please_select_a_component_before_submitting; + public static String BugzillaTaskEditorPage_Please_enter_a_bugid_for_duplicate_of_before_submitting; + public static String BugzillaVotesEditor_Show_votes; public static String BugzillaVotesEditor_Vote; diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties index d1e7238b0..9426f2905 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties @@ -22,6 +22,7 @@ BugzillaTaskEditorPage_Changes_Submitted_Message=Changes submitted BugzillaTaskEditorPage_Please_enter_a_description_before_submitting=Please enter a description before submitting BugzillaTaskEditorPage_Please_enter_a_short_summary_before_submitting=Please enter a short summary before submitting BugzillaTaskEditorPage_Please_select_a_component_before_submitting=Please select a component before submitting +BugzillaTaskEditorPage_Please_enter_a_bugid_for_duplicate_of_before_submitting=Please enter a bugid for \"duplicate of\" before submitting BugzillaVotesEditor_Show_votes=Show votes BugzillaVotesEditor_Vote=Vote |