Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2011-05-29 06:22:19 +0000
committerfbecker2011-05-29 06:22:19 +0000
commit293e1f6cf4284f2c5465175460e765826637d1c8 (patch)
tree86b3ba156c85b595328eb53efa7095b351045e98 /org.eclipse.mylyn.bugzilla.core
parent8caeddb9195362d83d1a23bbc6e3a0be7374549e (diff)
downloadorg.eclipse.mylyn.tasks-293e1f6cf4284f2c5465175460e765826637d1c8.tar.gz
org.eclipse.mylyn.tasks-293e1f6cf4284f2c5465175460e765826637d1c8.tar.xz
org.eclipse.mylyn.tasks-293e1f6cf4284f2c5465175460e765826637d1c8.zip
ASSIGNED - bug 347566: can not create new tasks when use xmlrpc.cgi is active
https://bugs.eclipse.org/bugs/show_bug.cgi?id=347566
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.core')
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java32
1 files changed, 20 insertions, 12 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java
index 2403d62d1..5140c5144 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java
@@ -681,20 +681,28 @@ public class RepositoryConfiguration implements Serializable {
}
if (validTransitions != null && attributeStatus != null && validTransitions.isValid()) {
//Handle custom operations. Currently only tuned for transitions based on default status names
- addOperation(bugReport, BugzillaOperation.none);
- for (AbstractBugzillaOperation b : validTransitions.getValidTransitions(attributeStatus.getValue())) {
- //Special case: the CLOSED status needs a Resolution input.
- //This happens automatically if current status is RESOLVED, else we need to supply one
- if (b.toString().equals(BugzillaOperation.close.toString())) {
- if (attributeStatus.getValue().equals("RESOLVED") && b.getInputId() != null) { //$NON-NLS-1$
- //Do not add close with resolution operation if status is RESOLVED
- continue;
- } else if (!attributeStatus.getValue().equals("RESOLVED") && b.getInputId() == null) { //$NON-NLS-1$
- //Do not add normal 'close' operation if status is not currently RESOLVED
- continue;
+ if (attributeStatus.getValue().equals("START")) { //$NON-NLS-1$
+ addOperation(bugReport, BugzillaOperation.new_default);
+ TaskAttribute operationAttribute = bugReport.getRoot().getAttribute(TaskAttribute.OPERATION);
+ TaskOperation.applyTo(operationAttribute, BugzillaOperation.new_default.toString(),
+ IBugzillaConstants.BUGZILLA_REPORT_STATUS_4_0.START.toString());
+
+ } else {
+ addOperation(bugReport, BugzillaOperation.none);
+ for (AbstractBugzillaOperation b : validTransitions.getValidTransitions(attributeStatus.getValue())) {
+ //Special case: the CLOSED status needs a Resolution input.
+ //This happens automatically if current status is RESOLVED, else we need to supply one
+ if (b.toString().equals(BugzillaOperation.close.toString())) {
+ if (attributeStatus.getValue().equals("RESOLVED") && b.getInputId() != null) { //$NON-NLS-1$
+ //Do not add close with resolution operation if status is RESOLVED
+ continue;
+ } else if (!attributeStatus.getValue().equals("RESOLVED") && b.getInputId() == null) { //$NON-NLS-1$
+ //Do not add normal 'close' operation if status is not currently RESOLVED
+ continue;
+ }
}
+ addOperation(bugReport, b);
}
- addOperation(bugReport, b);
}
} else {
TaskAttribute everConfirmed = bugReport.getRoot().getAttribute(BugzillaAttribute.EVERCONFIRMED.getKey());

Back to the top