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 177162 Details for
Bug 322867
[regression] target milestone field disappeared for Eclipse.org bugs
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]
commited patch
patch322867V2.txt (text/plain), 14.27 KB, created by
Frank Becker
on 2010-08-21 15:38:23 EDT
(
hide
)
Description:
commited patch
Filename:
MIME Type:
Creator:
Frank Becker
Created:
2010-08-21 15:38:23 EDT
Size:
14.27 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.bugzilla.core >Index: src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java,v >retrieving revision 1.256 >diff -u -r1.256 BugzillaClient.java >--- src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java 17 Aug 2010 20:03:51 -0000 1.256 >+++ src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java 21 Aug 2010 19:36:06 -0000 >@@ -611,33 +611,21 @@ > BugzillaTaskDataHandler.createAttribute(existingReport, element); > } > String useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USETARGETMILESTONE); >- if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$ >- BugzillaTaskDataHandler.createAttribute(existingReport, BugzillaAttribute.TARGET_MILESTONE); >- } >+ BugzillaUtil.addAttributeIfUsed(BugzillaAttribute.TARGET_MILESTONE, >+ IBugzillaConstants.BUGZILLA_PARAM_USETARGETMILESTONE, taskRepository, existingReport, true); > for (BugzillaAttribute element : reportElements2) { > BugzillaTaskDataHandler.createAttribute(existingReport, element); > } >- useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT); >- if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$ >- BugzillaTaskDataHandler.createAttribute(existingReport, BugzillaAttribute.QA_CONTACT); >- } >- useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USESTATUSWHITEBOARD); >- if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$ >- BugzillaTaskDataHandler.createAttribute(existingReport, BugzillaAttribute.STATUS_WHITEBOARD); >- } >- useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEBUGALIASES); >- if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$ >- BugzillaTaskDataHandler.createAttribute(existingReport, BugzillaAttribute.ALIAS); >- } >- useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USECLASSIFICATION); >- if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$ >- BugzillaTaskDataHandler.createAttribute(existingReport, BugzillaAttribute.CLASSIFICATION); >- } >- useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USE_SEE_ALSO); >- if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$ >- BugzillaTaskDataHandler.createAttribute(existingReport, BugzillaAttribute.SEE_ALSO); >- } >- >+ BugzillaUtil.addAttributeIfUsed(BugzillaAttribute.QA_CONTACT, IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT, >+ taskRepository, existingReport, true); >+ BugzillaUtil.addAttributeIfUsed(BugzillaAttribute.STATUS_WHITEBOARD, >+ IBugzillaConstants.BUGZILLA_PARAM_USESTATUSWHITEBOARD, taskRepository, existingReport, true); >+ BugzillaUtil.addAttributeIfUsed(BugzillaAttribute.ALIAS, IBugzillaConstants.BUGZILLA_PARAM_USEBUGALIASES, >+ taskRepository, existingReport, false); >+ BugzillaUtil.addAttributeIfUsed(BugzillaAttribute.CLASSIFICATION, >+ IBugzillaConstants.BUGZILLA_PARAM_USECLASSIFICATION, taskRepository, existingReport, false); >+ BugzillaUtil.addAttributeIfUsed(BugzillaAttribute.SEE_ALSO, IBugzillaConstants.BUGZILLA_PARAM_USE_SEE_ALSO, >+ taskRepository, existingReport, false); > } > > public static String getBugUrlWithoutLogin(String repositoryUrl, String id) { >Index: src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaUtil.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaUtil.java >diff -N src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaUtil.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaUtil.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,67 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 Frank Becker and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Frank Becker - initial API and implementation >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.internal.bugzilla.core; >+ >+import org.eclipse.mylyn.tasks.core.TaskRepository; >+import org.eclipse.mylyn.tasks.core.data.TaskAttribute; >+import org.eclipse.mylyn.tasks.core.data.TaskData; >+ >+public class BugzillaUtil { >+ public static void addAttributeIfUsed(BugzillaAttribute constant, String propertyName, >+ TaskRepository taskRepository, TaskData existingReport, boolean createWhenNull) { >+ String useParam = taskRepository.getProperty(propertyName); >+ if (createWhenNull) { >+ if (useParam == null || (useParam != null && useParam.equals("true"))) { //$NON-NLS-1$ >+ BugzillaTaskDataHandler.createAttribute(existingReport, constant); >+ } >+ } else { >+ if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$ >+ BugzillaTaskDataHandler.createAttribute(existingReport, constant); >+ } >+ >+ } >+ } >+ >+ public static void createAttributeWithKindDefaultIfUsed(String parsedText, BugzillaAttribute tag, >+ TaskData repositoryTaskData, String propertyName, boolean defaultWhenNull) { >+ >+ TaskAttribute attribute = repositoryTaskData.getRoot().getMappedAttribute(tag.getKey()); >+ if (attribute == null) { >+ attribute = BugzillaTaskDataHandler.createAttribute(repositoryTaskData, tag); >+ attribute.setValue(parsedText); >+ } else { >+ attribute.addValue(parsedText); >+ } >+// TaskRepository repository = repositoryTaskData.getAttributeMapper().getTaskRepository(); >+// repository.removeProperty(IBugzillaConstants.BUGZILLA_PARAM_USE_SEE_ALSO); >+// repository.removeProperty(IBugzillaConstants.BUGZILLA_PARAM_USEBUGALIASES); >+// repository.removeProperty(IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT); >+// repository.removeProperty(IBugzillaConstants.BUGZILLA_PARAM_USESTATUSWHITEBOARD); >+// repository.removeProperty(IBugzillaConstants.BUGZILLA_PARAM_USETARGETMILESTONE); >+// repository.removeProperty(IBugzillaConstants.BUGZILLA_PARAM_USECLASSIFICATION); >+ String useParam = repositoryTaskData.getAttributeMapper().getTaskRepository().getProperty(propertyName); >+ if (defaultWhenNull) { >+ if (useParam == null || (useParam != null && useParam.equals("true"))) { //$NON-NLS-1$ >+ attribute.getMetaData().setKind(TaskAttribute.KIND_DEFAULT); >+ } else { >+ attribute.getMetaData().setKind(null); >+ } >+ } else { >+ if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$ >+ attribute.getMetaData().setKind(TaskAttribute.KIND_DEFAULT); >+ } else { >+ attribute.getMetaData().setKind(null); >+ } >+ } >+ >+ } >+} >Index: src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java,v >retrieving revision 1.57 >diff -u -r1.57 SaxMultiBugReportContentHandler.java >--- src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java 9 Aug 2010 19:46:40 -0000 1.57 >+++ src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java 21 Aug 2010 19:36:07 -0000 >@@ -487,46 +487,29 @@ > attachment.setAuthor(author); > } > break; >- case CLASSIFICATION: > case TARGET_MILESTONE: >+ BugzillaUtil.createAttributeWithKindDefaultIfUsed(parsedText, tag, repositoryTaskData, >+ IBugzillaConstants.BUGZILLA_PARAM_USETARGETMILESTONE, true); >+ break; > case QA_CONTACT: >+ BugzillaUtil.createAttributeWithKindDefaultIfUsed(parsedText, tag, repositoryTaskData, >+ IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT, true); >+ break; > case STATUS_WHITEBOARD: >+ BugzillaUtil.createAttributeWithKindDefaultIfUsed(parsedText, tag, repositoryTaskData, >+ IBugzillaConstants.BUGZILLA_PARAM_USESTATUSWHITEBOARD, true); >+ break; >+ case CLASSIFICATION: >+ BugzillaUtil.createAttributeWithKindDefaultIfUsed(parsedText, tag, repositoryTaskData, >+ IBugzillaConstants.BUGZILLA_PARAM_USECLASSIFICATION, false); >+ break; > case ALIAS: >+ BugzillaUtil.createAttributeWithKindDefaultIfUsed(parsedText, tag, repositoryTaskData, >+ IBugzillaConstants.BUGZILLA_PARAM_USEBUGALIASES, false); >+ break; > case SEE_ALSO: >- TaskAttribute suppressAttribute = createAttrribute(parsedText, tag); >- String propertyName = null; >- switch (tag) { >- case CLASSIFICATION: >- propertyName = IBugzillaConstants.BUGZILLA_PARAM_USECLASSIFICATION; >- break; >- case TARGET_MILESTONE: >- propertyName = IBugzillaConstants.BUGZILLA_PARAM_USETARGETMILESTONE; >- break; >- case QA_CONTACT: >- propertyName = IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT; >- break; >- case STATUS_WHITEBOARD: >- propertyName = IBugzillaConstants.BUGZILLA_PARAM_USESTATUSWHITEBOARD; >- break; >- case ALIAS: >- propertyName = IBugzillaConstants.BUGZILLA_PARAM_USEBUGALIASES; >- break; >- case SEE_ALSO: >- propertyName = IBugzillaConstants.BUGZILLA_PARAM_USE_SEE_ALSO; >- break; >- default: >- propertyName = null; >- break; >- } >- String useParam = repositoryTaskData.getAttributeMapper().getTaskRepository().getProperty(propertyName); >- if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$ >- suppressAttribute.getMetaData().setKind(TaskAttribute.KIND_DEFAULT); >- if (BugzillaAttribute.CLASSIFICATION.equals(tag)) { >- suppressAttribute.getMetaData().setReadOnly(true); >- } >- } else { >- suppressAttribute.getMetaData().setKind(null); >- } >+ BugzillaUtil.createAttributeWithKindDefaultIfUsed(parsedText, tag, repositoryTaskData, >+ IBugzillaConstants.BUGZILLA_PARAM_USE_SEE_ALSO, false); > break; > default: > createAttrribute(parsedText, tag); >#P org.eclipse.mylyn.bugzilla.ide >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.ide/plugin.xml,v >retrieving revision 1.32 >diff -u -r1.32 plugin.xml >--- plugin.xml 9 Aug 2010 19:46:36 -0000 1.32 >+++ plugin.xml 21 Aug 2010 19:36:08 -0000 >@@ -20,7 +20,7 @@ > repositoryKind="bugzilla" > urlRepository="https://bugs.eclipse.org/bugs" > version="3.4.4"> >- <attribute name="useclassification" value="true"/> >+ <attribute name="useclassification" value="false"/> > <attribute name="usetargetmilestone" value="true"/> > <attribute name="useqacontact" value="true"/> > <attribute name="usestatuswhiteboard" value="true"/> >#P org.eclipse.mylyn.bugzilla.ui >Index: src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java,v >retrieving revision 1.108 >diff -u -r1.108 BugzillaRepositorySettingsPage.java >--- src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java 13 Aug 2010 19:32:56 -0000 1.108 >+++ src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java 21 Aug 2010 19:36:09 -0000 >@@ -151,7 +151,6 @@ > @Override > protected void createAdditionalControls(Composite parent) { > addRepositoryTemplatesToServerUrlCombo(); >- > Label shortLoginLabel = new Label(parent, SWT.NONE); > shortLoginLabel.setText(LABEL_SHORT_LOGINS); > cleanQAContact = new Button(parent, SWT.CHECK | SWT.LEFT); >@@ -360,25 +359,32 @@ > break; > } > } >- >- } >- if (myTemplate != null) { >- // we have an Template but no values in the Repository so we use the Template values >- boolean value = Boolean.parseBoolean(myTemplate.getAttribute("useclassification")); //$NON-NLS-1$ >- useclassification.setSelection(!value); >- value = Boolean.parseBoolean(myTemplate.getAttribute("usetargetmilestone")); //$NON-NLS-1$ >- usetargetmilestone.setSelection(!value); >- value = Boolean.parseBoolean(myTemplate.getAttribute("useqacontact")); //$NON-NLS-1$ >- useqacontact.setSelection(!value); >- value = Boolean.parseBoolean(myTemplate.getAttribute("usestatuswhiteboard")); //$NON-NLS-1$ >- usestatuswhiteboard.setSelection(!value); >- value = Boolean.parseBoolean(myTemplate.getAttribute("usebugaliases")); //$NON-NLS-1$ >- usebugaliases.setSelection(!value); >- value = Boolean.parseBoolean(myTemplate.getAttribute("use_see_also")); //$NON-NLS-1$ >- use_see_also.setSelection(!value); >- >- value = Boolean.parseBoolean(myTemplate.getAttribute("useXMLRPC")); //$NON-NLS-1$ >- useXMLRPCstatusTransitions.setSelection(value); >+ if (myTemplate != null) { >+ // we have an Template but no values in the Repository so we use the Template values >+ boolean value = Boolean.parseBoolean(myTemplate.getAttribute("useclassification")); //$NON-NLS-1$ >+ useclassification.setSelection(!value); >+ value = Boolean.parseBoolean(myTemplate.getAttribute("usetargetmilestone")); //$NON-NLS-1$ >+ usetargetmilestone.setSelection(!value); >+ value = Boolean.parseBoolean(myTemplate.getAttribute("useqacontact")); //$NON-NLS-1$ >+ useqacontact.setSelection(!value); >+ value = Boolean.parseBoolean(myTemplate.getAttribute("usestatuswhiteboard")); //$NON-NLS-1$ >+ usestatuswhiteboard.setSelection(!value); >+ value = Boolean.parseBoolean(myTemplate.getAttribute("usebugaliases")); //$NON-NLS-1$ >+ usebugaliases.setSelection(!value); >+ value = Boolean.parseBoolean(myTemplate.getAttribute("use_see_also")); //$NON-NLS-1$ >+ use_see_also.setSelection(!value); >+ >+ value = Boolean.parseBoolean(myTemplate.getAttribute("useXMLRPC")); //$NON-NLS-1$ >+ useXMLRPCstatusTransitions.setSelection(value); >+ } else { >+ useclassification.setSelection(true); >+ usetargetmilestone.setSelection(false); >+ useqacontact.setSelection(false); >+ usestatuswhiteboard.setSelection(false); >+ usebugaliases.setSelection(true); >+ use_see_also.setSelection(true); >+ useXMLRPCstatusTransitions.setSelection(true); >+ } > } else { > // we use the repository values > boolean value = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USECLASSIFICATION));
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 322867
:
177049
|
177050
| 177162 |
177163
|
178004
|
178005