From: Andreas Putzo <andreas@putzo.net>
Subject: Include Debian version number and BTS link
Forwarded: not-needed

Bugs for the Josm version present in Debian have to be filed in Debian's
BTS and not upstream. Also include the Debian version number for better
bug triaging.

---
 src/org/openstreetmap/josm/actions/AboutAction.java             |    7 ++-
 src/org/openstreetmap/josm/actions/ShowStatusReportAction.java  |    3 -
 src/org/openstreetmap/josm/data/Version.java                    |    7 +++
 src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java |   23 ++--------
 4 files changed, 20 insertions(+), 20 deletions(-)

--- a/src/org/openstreetmap/josm/actions/AboutAction.java
+++ b/src/org/openstreetmap/josm/actions/AboutAction.java
@@ -8,6 +8,9 @@ import java.awt.GridBagLayout;
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
 
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 import javax.swing.BorderFactory;
 import javax.swing.JLabel;
 import javax.swing.JOptionPane;
@@ -79,6 +82,8 @@ public class AboutAction extends JosmAct
                 "<p style='font-size:75%'></p>" +
                 "<p>" + tr("Version {0}", version.getVersionString()) + "</p>" +
                 "<p style='font-size:50%'></p>" +
+                "<p>" + tr("Debian release {0}", version.getDebianVersionString()) + "</p>" +
+                "<p style='font-size:50%'></p>" +
                 "<p>" + tr("Last change at {0}", version.getTime()) + "</p>" +
                 "<p style='font-size:50%'></p>" +
                 "<p>" + tr("Java Version {0}", System.getProperty("java.version")) + "</p>" +
@@ -89,7 +94,7 @@ public class AboutAction extends JosmAct
         info.add(new UrlLabel(Main.getJOSMWebsite(),2), GBC.eol().fill(GBC.HORIZONTAL));
         info.add(GBC.glue(0,5), GBC.eol());
         info.add(new JLabel(tr("Bug Reports")), GBC.std().insets(10,0,10,0));
-        info.add(BugReportExceptionHandler.getBugReportUrlLabel(Utils.strip(ShowStatusReportAction.getReportHeader())), GBC.eol().fill(GBC.HORIZONTAL));
+        info.add(new UrlLabel("http://bugs.debian.org", 2), GBC.eol().fill(GBC.HORIZONTAL));
 
         about.addTab(tr("Info"), info);
         about.addTab(tr("Readme"), createScrollPane(readme));
--- a/src/org/openstreetmap/josm/data/Version.java
+++ b/src/org/openstreetmap/josm/data/Version.java
@@ -66,6 +66,7 @@ public class Version {
 
     private int version;
     private String releaseDescription;
+    private String debianVersion;
     private String time;
     private String buildName;
     private boolean isLocalBuild;
@@ -116,6 +117,8 @@ public class Version {
             version = JOSM_UNKNOWN_VERSION;
         }
 
+        debianVersion = properties.get("Debian-Release");
+
         // the last changed data
         //
         time = properties.get("Last Changed Date");
@@ -172,6 +175,10 @@ public class Version {
         return  version == 0 ? tr("UNKNOWN") : Integer.toString(version);
     }
 
+    public String getDebianVersionString() {
+        return  debianVersion;
+    }
+
     /**
      * Replies a text with the release attributes
      *
--- a/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
+++ b/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
@@ -68,8 +68,8 @@ public final class BugReportExceptionHan
                         String[] buttonIcons = new String[] {"cancel", "bug"};
                         int defaultButtonIdx = 1;
                         String message = tr("An unexpected exception occurred.<br>" +
-                                "This is always a coding error. If you are running the latest<br>" +
-                                "version of JOSM, please consider being kind and file a bug report."
+                                "Please consider being kind and file a bug report.<br>" +
+                                "See http://bugs.debian.org for a guide how to do this."
                                 );
                         // Check user is running current tested version, the error may already be fixed
                         int josmVersion = Version.getInstance().getVersion();
@@ -200,24 +200,13 @@ public final class BugReportExceptionHan
 
             JPanel p = new JPanel(new GridBagLayout());
             p.add(new JMultilineLabel(
-                    tr("You have encountered an error in JOSM. Before you file a bug report " +
-                            "make sure you have updated to the latest version of JOSM here:")),
-                            GBC.eol().fill(GridBagConstraints.HORIZONTAL));
-            p.add(new UrlLabel(Main.getJOSMWebsite(),2), GBC.eop().insets(8,0,0,0));
+                    tr("Please report a bug against JOSM.")), GBC.eol());
             p.add(new JMultilineLabel(
-                    tr("You should also update your plugins. If neither of those help please " +
-                            "file a bug report in our bugtracker using this link:")),
-                            GBC.eol().fill(GridBagConstraints.HORIZONTAL));
-            p.add(getBugReportUrlLabel(urltext), GBC.eop().insets(8,0,0,0));
+                    tr("Include your steps to get to the error (as detailed as possible)!")), GBC.eol());
             p.add(new JMultilineLabel(
-                    tr("There the error information provided below should already be " +
-                            "filled in for you. Please include information on how to reproduce " +
-                            "the error and try to supply as much detail as possible.")),
-                            GBC.eop().fill(GridBagConstraints.HORIZONTAL));
+                    tr("Try updating to the newest version of JOSM and all plugins before reporting a bug.")), GBC.eol());
             p.add(new JMultilineLabel(
-                    tr("Alternatively, if that does not work you can manually fill in the information " +
-                            "below at this URL:")), GBC.eol().fill(GridBagConstraints.HORIZONTAL));
-            p.add(new UrlLabel(Main.getJOSMWebsite()+"/newticket",2), GBC.eop().insets(8,0,0,0));
+                    tr("Be sure to include the following information:")), GBC.eop());
 
             // Wiki formatting for manual copy-paste
             text = "{{{\n"+text+"}}}";
--- a/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
+++ b/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
@@ -28,6 +28,7 @@ import org.openstreetmap.josm.data.osm.D
 import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.gui.widgets.JosmTextArea;
 import org.openstreetmap.josm.plugins.PluginHandler;
+import org.openstreetmap.josm.tools.OpenBrowser;
 import org.openstreetmap.josm.tools.PlatformHookUnixoid;
 import org.openstreetmap.josm.tools.Shortcut;
 import org.openstreetmap.josm.tools.Utils;
@@ -199,7 +200,7 @@ public final class ShowStatusReportActio
 
         switch (ed.showDialog().getValue()) {
             case 1: Utils.copyToClipboard(text.toString()); break;
-            case 2: ReportBugAction.reportBug(reportHeader) ; break;
+            case 2: OpenBrowser.displayUrl("http://bugs.debian.org"); break;
         }
     }
 }
