Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi,

These 2 patches fix 2 bugs of the bugzilla-assistant:
- *Bug 53082* <https://bugs.freedesktop.org/show_bug.cgi?id=53082> -BUGZILLAASSISTANT: Improve exception handling for unavailable Bugzilla - *Bug 50851* <https://bugs.freedesktop.org/show_bug.cgi?id=50851> -BUGZILLAASSISTANT: Error message should be in focus

Please add them to the repository (with the 1 I send earlier today) and update the BSA.
From b027776d5a886e0c6a6209085ad2e3113f9a830e Mon Sep 17 00:00:00 2001
From: Rob Snelders <programming@ertai.nl>
Date: Wed, 15 Aug 2012 22:08:00 +0200
Subject: [PATCH] fdo#50851 - BUGZILLAASSISTANT: Error message should be in
 focus

---
 bug/bug/bug.js |    1 +
 1 file changed, 1 insertion(+)

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index 8e7cc0a..fdd14ec 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -42,6 +42,7 @@
                     message += 'statusText = ' + error.statusText + ' ';
                 }
                 $.bug.error_set(message);
+                window.scrollTo(0,0);
                 throw error;
             });
         },
-- 
1.7.9.5

From 8bf699575bbb4c8231ec757a5a19550e97efb147 Mon Sep 17 00:00:00 2001
From: Rob Snelders <programming@ertai.nl>
Date: Wed, 15 Aug 2012 22:30:39 +0200
Subject: [PATCH] fdo#53082 - BUGZILLAASSISTANT: Improve exception handling
 for unavailable Bugzilla

---
 bug/bug/bug.js |   28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index fdd14ec..0565d84 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -32,15 +32,25 @@
                } else {
                  message = url + '(' + $.param(args) + ') XHR error. ';
                }
-                if('status' in error) {
-                    message += 'status = ' + error.status + ' ';
-                }
-                if('responseText' in error) {
-                    message += 'responseText = ' + error.responseText + ' ';
-                }
-                if('statusText' in error) {
-                    message += 'statusText = ' + error.statusText + ' ';
-                }
+
+               if (url == "/enter_bug.cgi" && 'status' in error && (error.status == 404 || 
error.status == 0)) {
+                 message = "It seems there is a problem to connect with Bugzilla. Please try again 
later.";
+               }
+               else
+               {
+                    if('status' in error) {
+                       if(error.status == 404 || error.status == 0) {
+                           message += "Cannot find the URL specified.\n\n";
+                       }
+                        message += 'status = ' + error.status + ' ';
+                    }
+                    if('responseText' in error) {
+                        message += 'responseText = ' + error.responseText + ' ';
+                    }
+                    if('statusText' in error) {
+                        message += 'statusText = ' + error.statusText + ' ';
+                    }
+               }
                 $.bug.error_set(message);
                 window.scrollTo(0,0);
                 throw error;
-- 
1.7.9.5


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.