diff options
author | fbecker | 2011-05-29 06:22:19 +0000 |
---|---|---|
committer | fbecker | 2011-05-29 06:22:19 +0000 |
commit | 293e1f6cf4284f2c5465175460e765826637d1c8 (patch) | |
tree | 86b3ba156c85b595328eb53efa7095b351045e98 /org.eclipse.mylyn.bugzilla.core | |
parent | 8caeddb9195362d83d1a23bbc6e3a0be7374549e (diff) | |
download | org.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.java | 32 |
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()); |