aboutsummaryrefslogtreecommitdiffstats
path: root/lib/util.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-06-23 15:11:44 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-06-23 15:11:44 +0200
commitd3a21445ad2f70565d10f632aa9d522e190f9e00 (patch)
treebb2d112daddb98d8394e81b6f4712754fbed58ed /lib/util.js
parent5f4a854cf9497d07745ebd9d4c65a3b954c494ec (diff)
downloadbugzilla-triage-d3a21445ad2f70565d10f632aa9d522e190f9e00.tar.gz
Fix timesheet generation with bad URLs and get activated on the Freedesktop bugzilla as well
Diffstat (limited to 'lib/util.js')
-rw-r--r--lib/util.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/util.js b/lib/util.js
index b165567..b2a093c 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -36,15 +36,17 @@ exports.heir = function heir(p) {
exports.getBugNo = function getBugNo(url) {
+ console.log("url = " + url);
var re = new RegExp(".*id=([0-9]+).*$");
var bugNo = null;
if (!url) {
throw new Error("Missing URL value!");
}
var reResult = re.exec(url);
- if (reResult[1]) {
+ if (reResult && reResult[1]) {
bugNo = reResult[1];
}
+ console.log("bugNo = " + bugNo);
return bugNo;
};