Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 76819 Details for
Bug 161457
Support Bugzilla 3.0 custom resolutions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
new patch for comment#22
clipboard.txt (text/plain), 7.14 KB, created by
Frank Becker
on 2007-08-23 17:08:11 EDT
(
hide
)
Description:
new patch for comment#22
Filename:
MIME Type:
Creator:
Frank Becker
Created:
2007-08-23 17:08:11 EDT
Size:
7.14 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.bugzilla.core >Index: src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java,v >retrieving revision 1.29 >diff -u -r1.29 BugzillaTaskDataHandler.java >--- src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java 22 Aug 2007 20:50:00 -0000 1.29 >+++ src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java 23 Aug 2007 21:07:42 -0000 >@@ -18,7 +18,8 @@ > import org.eclipse.core.runtime.IStatus; > import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BUGZILLA_OPERATION; > import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BUGZILLA_REPORT_STATUS; >-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BUGZILLA_RESOLUTION; >+import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BUGZILLA_RESOLUTION_2_0; >+import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BUGZILLA_RESOLUTION_3_0; > import org.eclipse.mylyn.monitor.core.StatusHandler; > import org.eclipse.mylyn.tasks.core.AbstractAttributeFactory; > import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler; >@@ -195,30 +196,30 @@ > case UNCONFIRMED: > case REOPENED: > case NEW: >- addOperation(bugReport, BUGZILLA_OPERATION.none, userName); >- addOperation(bugReport, BUGZILLA_OPERATION.accept, userName); >- addOperation(bugReport, BUGZILLA_OPERATION.resolve, userName); >- addOperation(bugReport, BUGZILLA_OPERATION.duplicate, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.none, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.accept, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.resolve, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.duplicate, userName); > break; > case ASSIGNED: >- addOperation(bugReport, BUGZILLA_OPERATION.none, userName); >- addOperation(bugReport, BUGZILLA_OPERATION.resolve, userName); >- addOperation(bugReport, BUGZILLA_OPERATION.duplicate, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.none, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.resolve, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.duplicate, userName); > break; > case RESOLVED: >- addOperation(bugReport, BUGZILLA_OPERATION.none, userName); >- addOperation(bugReport, BUGZILLA_OPERATION.reopen, userName); >- addOperation(bugReport, BUGZILLA_OPERATION.verify, userName); >- addOperation(bugReport, BUGZILLA_OPERATION.close, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.none, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.reopen, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.verify, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.close, userName); > break; > case CLOSED: >- addOperation(bugReport, BUGZILLA_OPERATION.none, userName); >- addOperation(bugReport, BUGZILLA_OPERATION.reopen, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.none, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.reopen, userName); > break; > case VERIFIED: >- addOperation(bugReport, BUGZILLA_OPERATION.none, userName); >- addOperation(bugReport, BUGZILLA_OPERATION.reopen, userName); >- addOperation(bugReport, BUGZILLA_OPERATION.close, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.none, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.reopen, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.close, userName); > } > String bugzillaVersion; > try { >@@ -230,12 +231,13 @@ > if (bugzillaVersion.compareTo("3.1") < 0 > && (status == BUGZILLA_REPORT_STATUS.NEW || status == BUGZILLA_REPORT_STATUS.ASSIGNED)) { > // old bugzilla workflow is used >- addOperation(bugReport, BUGZILLA_OPERATION.reassign, userName); >- addOperation(bugReport, BUGZILLA_OPERATION.reassignbycomponent, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.reassign, userName); >+ addOperation(repository, bugReport, BUGZILLA_OPERATION.reassignbycomponent, userName); > } > } > >- private void addOperation(RepositoryTaskData bugReport, BUGZILLA_OPERATION opcode, String userName) { >+ private void addOperation(TaskRepository repository, RepositoryTaskData bugReport, BUGZILLA_OPERATION opcode, >+ String userName) { > RepositoryOperation newOperation = null; > switch (opcode) { > case none: >@@ -249,8 +251,30 @@ > case resolve: > newOperation = new RepositoryOperation(opcode.toString(), OPERATION_LABEL_RESOLVE); > newOperation.setUpOptions(OPERATION_OPTION_RESOLUTION); >- for (BUGZILLA_RESOLUTION resolution : BUGZILLA_RESOLUTION.values()) { >- newOperation.addOption(resolution.toString(), resolution.toString()); >+ RepositoryConfiguration config; >+ try { >+ config = BugzillaCorePlugin.getRepositoryConfiguration(repository, false); >+ } catch (CoreException e) { >+ config = null; >+ } >+ if (config != null) { >+ for (String resolution : config.getResolutions()) { >+ // DUPLICATE and MOVED have special meanings so do not show as resolution >+ if (resolution.compareTo("DUPLICATE")!= 0 && resolution.compareTo("MOVED")!= 0) >+ newOperation.addOption(resolution, resolution); >+ } >+ } else { >+ // LATER and REMIND must not be there in Bugzilla >= 3.0 is used >+ //If getVersion() returns "Automatic (Use Validate Settings)" we use the Version 3 Resolution >+ if (repository.getVersion().compareTo("3.0")>= 0) { >+ for (BUGZILLA_RESOLUTION_3_0 resolution : BUGZILLA_RESOLUTION_3_0.values()) { >+ newOperation.addOption(resolution.toString(), resolution.toString()); >+ } >+ } else { >+ for (BUGZILLA_RESOLUTION_2_0 resolution : BUGZILLA_RESOLUTION_2_0.values()) { >+ newOperation.addOption(resolution.toString(), resolution.toString()); >+ } >+ } > } > break; > case duplicate: >Index: src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java,v >retrieving revision 1.46 >diff -u -r1.46 IBugzillaConstants.java >--- src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java 31 Jul 2007 20:08:51 -0000 1.46 >+++ src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java 23 Aug 2007 21:07:43 -0000 >@@ -227,10 +227,14 @@ > UNCONFIRMED, NEW, ASSIGNED, REOPENED, RESOLVED, VERIFIED, CLOSED, SCHEDULED; > } > >- public static enum BUGZILLA_RESOLUTION { >+ public static enum BUGZILLA_RESOLUTION_2_0 { > FIXED, INVALID, WONTFIX, LATER, REMIND, WORKSFORME; > } > >+ public static enum BUGZILLA_RESOLUTION_3_0 { >+ FIXED, INVALID, WONTFIX, WORKSFORME; >+ } >+ > public static final String ERROR_MSG_OP_NOT_PERMITTED = "The requested operation is not permitted."; > > public static final String ERROR_MSG_INVALID_BUG_ID = "Invalid bug id. The requested bug id does not exist.";
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 161457
:
76709
|
76710
|
76715
|
76716
|
76736
|
76809
|
76810
| 76819 |
76820