| 1 |
Description: Include Debian version number and BTS link. |
| 2 |
Bugs for the JOSM version present in Debian have to be filed in Debian's |
| 3 |
BTS and not upstream. Also include the Debian version number for better |
| 4 |
bug triaging. |
| 5 |
Author: Andreas Putzo <[email protected]> |
| 6 |
Forwarded: not-needed |
| 7 |
|
| 8 |
--- a/src/org/openstreetmap/josm/actions/AboutAction.java |
| 9 |
+++ b/src/org/openstreetmap/josm/actions/AboutAction.java |
| 10 |
@@ -101,6 +101,8 @@ public final class AboutAction extends J |
| 11 |
"<p style='font-size:75%'></p>" + |
| 12 |
"<p>" + tr("Version {0}", version.getVersionString()) + "</p>" + |
| 13 |
"<p style='font-size:50%'></p>" + |
| 14 |
+ "<p>" + tr("Debian release {0}", version.getDebianVersionString()) + "</p>" + |
| 15 |
+ "<p style='font-size:50%'></p>" + |
| 16 |
"<p>" + tr("Last change at {0}", version.getTime()) + "</p>" + |
| 17 |
"<p style='font-size:50%'></p>" + |
| 18 |
"<p>" + tr("Java Version {0}", getSystemProperty("java.version")) + "</p>" + |
| 19 |
--- a/src/org/openstreetmap/josm/data/Version.java |
| 20 |
+++ b/src/org/openstreetmap/josm/data/Version.java |
| 21 |
@@ -40,6 +40,7 @@ public class Version { |
| 22 |
|
| 23 |
private int version; |
| 24 |
private String releaseDescription; |
| 25 |
+ private String debianVersion; |
| 26 |
private String time; |
| 27 |
private String buildName; |
| 28 |
private boolean isLocalBuild; |
| 29 |
@@ -75,6 +76,8 @@ public class Version { |
| 30 |
version = JOSM_UNKNOWN_VERSION; |
| 31 |
} |
| 32 |
|
| 33 |
+ debianVersion = properties.getProperty("Debian-Release"); |
| 34 |
+ |
| 35 |
// the last changed data |
| 36 |
// |
| 37 |
time = properties.getProperty("Last Changed Date"); |
| 38 |
@@ -125,6 +128,10 @@ public class Version { |
| 39 |
return version == 0 ? tr("UNKNOWN") : Integer.toString(version); |
| 40 |
} |
| 41 |
|
| 42 |
+ public String getDebianVersionString() { |
| 43 |
+ return debianVersion; |
| 44 |
+ } |
| 45 |
+ |
| 46 |
/** |
| 47 |
* Replies a text with the release attributes |
| 48 |
* |
| 49 |
--- a/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java |
| 50 |
+++ b/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java |
| 51 |
@@ -48,6 +48,7 @@ import org.openstreetmap.josm.io.OsmApi; |
| 52 |
import org.openstreetmap.josm.plugins.PluginHandler; |
| 53 |
import org.openstreetmap.josm.spi.preferences.Config; |
| 54 |
import org.openstreetmap.josm.tools.Logging; |
| 55 |
+import org.openstreetmap.josm.tools.OpenBrowser; |
| 56 |
import org.openstreetmap.josm.tools.PlatformHookUnixoid; |
| 57 |
import org.openstreetmap.josm.tools.PlatformManager; |
| 58 |
import org.openstreetmap.josm.tools.Shortcut; |
| 59 |
@@ -360,7 +361,7 @@ public final class ShowStatusReportActio |
| 60 |
|
| 61 |
switch (ed.showDialog().getValue()) { |
| 62 |
case 1: ta.copyToClipboard(); break; |
| 63 |
|
| 64 |
+ case 2: OpenBrowser.displayUrl("https://bugs.debian.org/"); break; |
| 65 |
default: // do nothing |
| 66 |
} |
| 67 |
GuiHelper.destroyComponents(ed, false); |
| 68 |
--- a/src/org/openstreetmap/josm/gui/bugreport/BugReportDialog.java |
| 69 |
+++ b/src/org/openstreetmap/josm/gui/bugreport/BugReportDialog.java |
| 70 |
@@ -93,7 +93,8 @@ public class BugReportDialog extends JDi |
| 71 |
private void addMessageSection() { |
| 72 |
String message = tr( |
| 73 |
"An unexpected exception occurred.\n" + "This is always a coding error. If you are running the latest " |
| 74 |
|
| 75 |
+ + "version of JOSM, please consider being kind and file a bug report." |
| 76 |
+ + "See https://bugs.debian.org/ for a guide how to do this."); |
| 77 |
Icon icon = UIManager.getIcon("OptionPane.errorIcon"); |
| 78 |
|
| 79 |
JPanel panel = new JPanel(new GridBagLayout()); |
| 80 |
@@ -111,7 +112,7 @@ public class BugReportDialog extends JDi |
| 81 |
panel.add(textPanel, GBC.eop().fill()); |
| 82 |
|
| 83 |
panel.add(new JLabel(tr("Manually report at:")+' '), GBC.std()); |
| 84 |
|
| 85 |
+ panel.add(new UrlLabel("https://bugs.debian.org/"), GBC.std().fill(GBC.HORIZONTAL)); |
| 86 |
JButton copy = new JButton("Copy to clipboard"); |
| 87 |
copy.addActionListener(e -> textPanel.copyToClipboard()); |
| 88 |
panel.add(copy, GBC.eol().anchor(GBC.EAST)); |
| 89 |
@@ -131,8 +132,7 @@ public class BugReportDialog extends JDi |
| 90 |
JMultilineLabel helpText = new JMultilineLabel( |
| 91 |
tr("If you are running the latest version of JOSM and the plugins, " |
| 92 |
+ "please file a bug report in our bugtracker.\n" |
| 93 |
|
| 94 |
|
| 95 |
+ + "Please include information on how to reproduce " |
| 96 |
+ "the error and try to supply as much detail as possible.")); |
| 97 |
helpText.setMaxWidth(MAX_MESSAGE_SIZE); |
| 98 |
panel.add(helpText, GBC.eop().fill(GridBagConstraints.HORIZONTAL)); |
| 99 |
@@ -144,9 +144,6 @@ public class BugReportDialog extends JDi |
| 100 |
} |
| 101 |
panel.add(settings); |
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
content.add(panel, GBC.eop().fill(GBC.HORIZONTAL)); |
| 107 |
} |
| 108 |
|
| 109 |
--- a/src/org/openstreetmap/josm/tools/bugreport/BugReportSender.java |
| 110 |
+++ b/src/org/openstreetmap/josm/tools/bugreport/BugReportSender.java |
| 111 |
@@ -88,9 +88,7 @@ public class BugReportSender extends Thr |
| 112 |
@Override |
| 113 |
public void run() { |
| 114 |
try { |
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
+ String bugUrl = "https://bugs.debian.org/"; |
| 119 |
|
| 120 |
// then notify handler |
| 121 |
errorMessage = handler.sendingBugReport(bugUrl, statusText); |
| 122 |
@@ -98,7 +96,7 @@ public class BugReportSender extends Thr |
| 123 |
Logging.warn(errorMessage); |
| 124 |
handler.failed(errorMessage, statusText); |
| 125 |
} |
| 126 |
|
| 127 |
+ } catch (Exception e) { |
| 128 |
Logging.warn(e); |
| 129 |
errorMessage = e.getMessage(); |
| 130 |
handler.failed(errorMessage, statusText); |
| 131 |
@@ -134,7 +132,7 @@ public class BugReportSender extends Thr |
| 132 |
} |
| 133 |
|
| 134 |
private static String getJOSMTicketURL() { |
| 135 |
|
| 136 |
+ return "https://bugs.debian.org/"; |
| 137 |
} |
| 138 |
|
| 139 |
private static String retrieveDebugToken(Document document) throws XPathExpressionException, BugReportSenderException { |
| 140 |
--- a/src/org/openstreetmap/josm/gui/bugreport/DefaultBugReportSendingHandler.java |
| 141 |
+++ b/src/org/openstreetmap/josm/gui/bugreport/DefaultBugReportSendingHandler.java |
| 142 |
@@ -37,7 +37,7 @@ public class DefaultBugReportSendingHand |
| 143 |
errorPanel.add(new JMultilineLabel( |
| 144 |
tr("Opening the bug report failed. Please report manually using this website:")), |
| 145 |
GBC.eol().fill(GridBagConstraints.HORIZONTAL)); |
| 146 |
|
| 147 |
+ errorPanel.add(new UrlLabel("https://bugs.debian.org/", 2), GBC.eop().insets(8, 0, 0, 0)); |
| 148 |
errorPanel.add(new DebugTextDisplay(statusText)); |
| 149 |
|
| 150 |
JOptionPane.showMessageDialog(MainApplication.getMainFrame(), errorPanel, tr("You have encountered a bug in JOSM"), |